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);
|
||||
},
|
||||
placeholder: function() {
|
||||
if (self.options.items.length == 0) {
|
||||
self.$items[0].options({placeholder: self.options.placeholder});
|
||||
}
|
||||
},
|
||||
selected: function() {
|
||||
selectItem(self.options.selected);
|
||||
},
|
||||
|
@ -130,7 +135,7 @@ Ox.ArrayEditable = function(options, self) {
|
|||
}
|
||||
that.empty();
|
||||
if (self.options.items.length == 0) {
|
||||
Ox.Editable({
|
||||
self.$items[0] = Ox.Editable({
|
||||
editable: false,
|
||||
type: self.options.type,
|
||||
value: self.options.placeholder
|
||||
|
|
|
@ -60,6 +60,9 @@ Ox.Editable = function(options, self) {
|
|||
highlight: function() {
|
||||
self.$value.html(formatValue());
|
||||
},
|
||||
placeholder: function() {
|
||||
self.$value.html(formatValue());
|
||||
},
|
||||
value: function() {
|
||||
self.$value.html(formatValue());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue