editable/arrayeditable: support placeholder update
This commit is contained in:
parent
c5f75d98c9
commit
8e91501104
2 changed files with 9 additions and 1 deletions
|
@ -54,6 +54,11 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
}
|
}
|
||||||
renderItems(true);
|
renderItems(true);
|
||||||
},
|
},
|
||||||
|
placeholder: function() {
|
||||||
|
if (self.options.items.length == 0) {
|
||||||
|
self.$items[0].options({placeholder: self.options.placeholder});
|
||||||
|
}
|
||||||
|
},
|
||||||
selected: function() {
|
selected: function() {
|
||||||
selectItem(self.options.selected);
|
selectItem(self.options.selected);
|
||||||
},
|
},
|
||||||
|
@ -130,7 +135,7 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
}
|
}
|
||||||
that.empty();
|
that.empty();
|
||||||
if (self.options.items.length == 0) {
|
if (self.options.items.length == 0) {
|
||||||
Ox.Editable({
|
self.$items[0] = Ox.Editable({
|
||||||
editable: false,
|
editable: false,
|
||||||
type: self.options.type,
|
type: self.options.type,
|
||||||
value: self.options.placeholder
|
value: self.options.placeholder
|
||||||
|
|
|
@ -60,6 +60,9 @@ Ox.Editable = function(options, self) {
|
||||||
highlight: function() {
|
highlight: function() {
|
||||||
self.$value.html(formatValue());
|
self.$value.html(formatValue());
|
||||||
},
|
},
|
||||||
|
placeholder: function() {
|
||||||
|
self.$value.html(formatValue());
|
||||||
|
},
|
||||||
value: function() {
|
value: function() {
|
||||||
self.$value.html(formatValue());
|
self.$value.html(formatValue());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue