forked from 0x2620/oxjs
improve listmap editing functionality
This commit is contained in:
parent
02442a24f7
commit
b17e8a783b
6 changed files with 48 additions and 35 deletions
|
|
@ -1216,6 +1216,7 @@ Ox.List = function(options, self) {
|
|||
}
|
||||
|
||||
function updateSort(map) {
|
||||
Ox.print('start sort')
|
||||
var key = self.options.sort[0].key,
|
||||
operator = self.options.sort[0].operator;
|
||||
if (self.listLength > 1) {
|
||||
|
|
@ -1237,13 +1238,13 @@ Ox.List = function(options, self) {
|
|||
getPositions();
|
||||
}
|
||||
}
|
||||
Ox.print('end sort')
|
||||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
Ox.print('list setOption', key, value);
|
||||
//Ox.print('list setOption', key, value);
|
||||
if (key == 'items') {
|
||||
if (Ox.typeOf(value) == 'array') {
|
||||
loadItems();
|
||||
updateSort();
|
||||
} else {
|
||||
updateQuery();
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ Ox.TextList = function(options, self) {
|
|||
width: getItemWidth() + 'px'
|
||||
});
|
||||
self.visibleColumns.forEach(function(v, i) {
|
||||
//Ox.print(data[v.id], '(--value--)')
|
||||
var clickable = Ox.isBoolean(v.clickable) ? v.clickable : v.clickable(data),
|
||||
editable = Ox.isBoolean(v.editable) ? v.editable : v.editable(data),
|
||||
$cell = $('<div>')
|
||||
|
|
@ -626,7 +627,7 @@ Ox.TextList = function(options, self) {
|
|||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
Ox.print('---------------------------- TextList setOption', key, value)
|
||||
//Ox.print('---------------------------- TextList setOption', key, value)
|
||||
if (key == 'items') {
|
||||
that.$body.options(key, value);
|
||||
} else if (key == 'paste') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue