forked from 0x2620/oxjs
self.setOption ~> that.update
This commit is contained in:
parent
9ee0742b53
commit
005d50c389
56 changed files with 919 additions and 933 deletions
|
|
@ -69,6 +69,21 @@ Ox.TextList = function(options, self) {
|
|||
sums: []
|
||||
})
|
||||
.options(options || {})
|
||||
.update({
|
||||
items: function() {
|
||||
that.$body.options('items', self.options.items);
|
||||
},
|
||||
paste: function() {
|
||||
that.$body.options('paste', self.options.paste);
|
||||
},
|
||||
selected: function() {
|
||||
that.$body.options('selected', self.options.selected);
|
||||
},
|
||||
sort: function() {
|
||||
updateColumn();
|
||||
that.$body.options('sort', self.options.sort);
|
||||
}
|
||||
})
|
||||
.addClass('OxTextList')
|
||||
.bindEvent({
|
||||
key_left: function() {
|
||||
|
|
@ -816,20 +831,6 @@ Ox.TextList = function(options, self) {
|
|||
}
|
||||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
//Ox.Log('List', '---------------------------- TextList setOption', key, value)
|
||||
if (key == 'items') {
|
||||
that.$body.options(key, value);
|
||||
} else if (key == 'paste') {
|
||||
that.$body.options(key, value);
|
||||
} else if (key == 'selected') {
|
||||
that.$body.options(key, value);
|
||||
} else if (key == 'sort') {
|
||||
updateColumn();
|
||||
that.$body.options(key, value);
|
||||
}
|
||||
};
|
||||
|
||||
that.addItem = function(item) {
|
||||
/*
|
||||
self.options.items.push(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue