1
0
Fork 0
forked from 0x2620/oxjs

fix a bug where the interface of a block video timeline would be stacked above a dialog

This commit is contained in:
rlx 2011-11-02 09:03:11 +00:00
commit dfe12646e6
3 changed files with 37 additions and 22 deletions

View file

@ -95,14 +95,20 @@ Ox.Input = function(options, self) {
value: '',
width: 128
})
.options(options)
.options(options || {})
.addClass(
'OxInput OxMedium Ox' + Ox.toTitleCase(self.options.style) /*+ (
self.options.overlap != 'none' ?
' OxOverlap' + Ox.toTitleCase(self.options.overlap) : ''
)*/
)
.css({width: self.options.width + 'px'})
.css(
Ox.extend({
width: self.options.width + 'px'
}, self.options.type == 'textarea' ? {
height: self.options.height + 'px'
} : {})
)
.bindEvent(Ox.extend(self.options.type == 'textarea' ? {
key_shift_enter: submit
} : {
@ -113,10 +119,10 @@ Ox.Input = function(options, self) {
}));
if (
Ox.isArray(self.options.autocomplete) &&
self.options.autocompleteReplace &&
self.options.autocompleteReplaceCorrect &&
self.options.value === ''
Ox.isArray(self.options.autocomplete)
&& self.options.autocompleteReplace
&& self.options.autocompleteReplaceCorrect
&& self.options.value === ''
) {
self.options.value = self.options.autocomplete[0]
}
@ -211,18 +217,24 @@ Ox.Input = function(options, self) {
disabled: self.options.disabled,
type: self.options.type == 'password' ? 'password' : 'text'
})
.css(Ox.extend({
width: self.inputWidth + 'px',
textAlign: self.options.textAlign
}, self.options.type == 'textarea' ? {
height: self.options.height + 'px',
} : {}))
.css(
Ox.extend({
width: self.inputWidth + 'px',
textAlign: self.options.textAlign
}, self.options.type == 'textarea' ? {
height: self.options.height + 'px',
} : {})
)
.val(self.options.value)
.blur(blur)
.change(change)
.focus(focus)
.appendTo(that.$element);
if (self.options.type == 'textarea') {
Ox.print('TEXTAREA', self.options.width, self.options.height, '...', that.css('width'), that.css('height'), '...', self.$input.css('width'), self.$input.css('height'))
}
// fixme: is there a better way than this one?
// should at least go into ox.ui.theme.foo.js
// probably better: divs in the background