handle update of label option

This commit is contained in:
rolux 2014-02-16 07:06:48 +00:00
parent 3232762576
commit 15444fe5a9
4 changed files with 11 additions and 0 deletions

View file

@ -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});
},

View file

@ -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();

View file

@ -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'});

View file

@ -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();