ArrayEditable: properly set placeholder
This commit is contained in:
parent
0940d7317b
commit
0d0999805c
1 changed files with 6 additions and 11 deletions
|
@ -57,9 +57,10 @@ Ox.ArrayEditable = function(options, self) {
|
|||
},
|
||||
placeholder: function() {
|
||||
if (self.options.items.length == 0) {
|
||||
self.$items[0]
|
||||
.options({value: self.options.placeholder})
|
||||
.addClass('OxPlaceholder');
|
||||
self.$items[0].options({
|
||||
placeholder: self.options.placeholder,
|
||||
value: ''
|
||||
});
|
||||
}
|
||||
},
|
||||
selected: function() {
|
||||
|
@ -140,10 +141,10 @@ Ox.ArrayEditable = function(options, self) {
|
|||
if (self.options.items.length == 0) {
|
||||
self.$items[0] = Ox.Editable({
|
||||
editable: false,
|
||||
placeholder: self.options.placeholder,
|
||||
type: self.options.type,
|
||||
value: self.options.placeholder
|
||||
value: ''
|
||||
})
|
||||
.addClass('OxPlaceholder')
|
||||
.appendTo(that);
|
||||
} else {
|
||||
sortItems();
|
||||
|
@ -159,11 +160,6 @@ Ox.ArrayEditable = function(options, self) {
|
|||
clickLink: self.options.clickLink,
|
||||
editable: self.options.editable && item.editable,
|
||||
editing: self.editing && i == self.selected,
|
||||
/*
|
||||
format: function(value) {
|
||||
return value || ' '
|
||||
},
|
||||
*/
|
||||
globalAttributes: self.options.globalAttributes,
|
||||
highlight: self.options.highlight,
|
||||
maxHeight: self.options.maxHeight,
|
||||
|
@ -184,7 +180,6 @@ Ox.ArrayEditable = function(options, self) {
|
|||
width: self.options.type == 'input' ? 0 : self.options.width - 9
|
||||
})
|
||||
.addClass(item.id == self.options.selected ? 'OxSelected' : '')
|
||||
//.css(self.options.type == 'textarea' ? {padding: '4px'} : {})
|
||||
.data({id: item.id, position: i})
|
||||
.bindEvent({
|
||||
blur: function(data) {
|
||||
|
|
Loading…
Reference in a new issue