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.$button.options({disabled: disabled});
|
||||||
self.$title && self.$title.options({disabled: disabled});
|
self.$title && self.$title.options({disabled: disabled});
|
||||||
},
|
},
|
||||||
|
label: function() {
|
||||||
|
self.$label.options({title: self.options.label});
|
||||||
|
},
|
||||||
title: function() {
|
title: function() {
|
||||||
self.$title.options({title: self.options.title});
|
self.$title.options({title: self.options.title});
|
||||||
},
|
},
|
||||||
|
|
|
@ -122,6 +122,8 @@ Ox.Input = function(options, self) {
|
||||||
} else if (key == 'height') {
|
} else if (key == 'height') {
|
||||||
that.css({height: value + 'px'});
|
that.css({height: value + 'px'});
|
||||||
self.$input.css({height: value - 6 + 'px'});
|
self.$input.css({height: value - 6 + 'px'});
|
||||||
|
} else if (key == 'label') {
|
||||||
|
self.$label.options({title: value});
|
||||||
} else if (key == 'labelWidth') {
|
} else if (key == 'labelWidth') {
|
||||||
self.$label.options({width: value});
|
self.$label.options({width: value});
|
||||||
inputWidth = getInputWidth();
|
inputWidth = getInputWidth();
|
||||||
|
|
|
@ -53,6 +53,9 @@ Ox.Select = function(options, self) {
|
||||||
// fixme: make default selection restorable
|
// fixme: make default selection restorable
|
||||||
.options(options)
|
.options(options)
|
||||||
.update({
|
.update({
|
||||||
|
label: function() {
|
||||||
|
self.$label.options({title: self.options.label});
|
||||||
|
},
|
||||||
labelWidth: function() {
|
labelWidth: function() {
|
||||||
self.$label.options({width: self.options.labelWidth});
|
self.$label.options({width: self.options.labelWidth});
|
||||||
self.$title.css({width: getTitleWidth() + 'px'});
|
self.$title.css({width: getTitleWidth() + 'px'});
|
||||||
|
|
|
@ -76,6 +76,9 @@ Ox.SelectInput = function(options, self) {
|
||||||
width: self.options.width
|
width: self.options.width
|
||||||
})
|
})
|
||||||
.update({
|
.update({
|
||||||
|
label: function() {
|
||||||
|
self.$select.options({label: self.options.label});
|
||||||
|
},
|
||||||
value: function() {
|
value: function() {
|
||||||
self.options.value = that.options('value');
|
self.options.value = that.options('value');
|
||||||
setValue();
|
setValue();
|
||||||
|
|
Loading…
Reference in a new issue