update list items by id
This commit is contained in:
parent
8c0f68e2d5
commit
d58f5bd61b
2 changed files with 7 additions and 8 deletions
|
@ -314,7 +314,7 @@ oml.ui.folders = function() {
|
|||
|
||||
};
|
||||
|
||||
that.updateItems = function(items) {
|
||||
that.updateItems = function(list, items) {
|
||||
var $list;
|
||||
if (arguments.length == 0) {
|
||||
oml.getLists(function(lists) {
|
||||
|
@ -326,12 +326,11 @@ oml.ui.folders = function() {
|
|||
});
|
||||
});
|
||||
} else {
|
||||
$list = $lists.filter(function($list) {
|
||||
return $list.options('selected').length;
|
||||
})[0];
|
||||
if ($list && !Ox.isEmpty($list.value(ui._list))) {
|
||||
$list.value(ui._list, 'items', items);
|
||||
$lists.forEach(function($list) {
|
||||
if (!Ox.isEmpty($list.value(list))) {
|
||||
$list.value(list, 'items', items);
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ oml.ui.list = function() {
|
|||
&& ui.find.conditions[0].key == 'list'
|
||||
&& ui.find.conditions[0].operator == '=='
|
||||
)) {
|
||||
oml.$ui.folders.updateItems(data.items);
|
||||
oml.$ui.folders.updateItems(ui.find.conditions[0].value, data.items);
|
||||
}
|
||||
oml.$ui.statusbar.set('total', data);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue