handle update of label option
This commit is contained in:
parent
3232762576
commit
15444fe5a9
4 changed files with 11 additions and 0 deletions
|
@ -37,6 +37,9 @@ Ox.Checkbox = function(options, self) {
|
|||
self.$button.options({disabled: disabled});
|
||||
self.$title && self.$title.options({disabled: disabled});
|
||||
},
|
||||
label: function() {
|
||||
self.$label.options({title: self.options.label});
|
||||
},
|
||||
title: function() {
|
||||
self.$title.options({title: self.options.title});
|
||||
},
|
||||
|
|
|
@ -122,6 +122,8 @@ Ox.Input = function(options, self) {
|
|||
} else if (key == 'height') {
|
||||
that.css({height: value + 'px'});
|
||||
self.$input.css({height: value - 6 + 'px'});
|
||||
} else if (key == 'label') {
|
||||
self.$label.options({title: value});
|
||||
} else if (key == 'labelWidth') {
|
||||
self.$label.options({width: value});
|
||||
inputWidth = getInputWidth();
|
||||
|
|
|
@ -53,6 +53,9 @@ Ox.Select = function(options, self) {
|
|||
// fixme: make default selection restorable
|
||||
.options(options)
|
||||
.update({
|
||||
label: function() {
|
||||
self.$label.options({title: self.options.label});
|
||||
},
|
||||
labelWidth: function() {
|
||||
self.$label.options({width: self.options.labelWidth});
|
||||
self.$title.css({width: getTitleWidth() + 'px'});
|
||||
|
|
|
@ -76,6 +76,9 @@ Ox.SelectInput = function(options, self) {
|
|||
width: self.options.width
|
||||
})
|
||||
.update({
|
||||
label: function() {
|
||||
self.$select.options({label: self.options.label});
|
||||
},
|
||||
value: function() {
|
||||
self.options.value = that.options('value');
|
||||
setValue();
|
||||
|
|
Loading…
Reference in a new issue