remove items via delete button
This commit is contained in:
parent
8f059e373a
commit
ef916610a7
1 changed files with 22 additions and 0 deletions
|
|
@ -439,6 +439,28 @@ pandora.ui.list = function() {
|
||||||
pandora.UI.set({listSelection: []});
|
pandora.UI.set({listSelection: []});
|
||||||
pandora.reloadList();
|
pandora.reloadList();
|
||||||
});
|
});
|
||||||
|
} else if (
|
||||||
|
pandora.hasCapability('canRemoveItems')
|
||||||
|
&& pandora.user.ui._list == ''
|
||||||
|
&& data.ids.every(function(item) {
|
||||||
|
return pandora.$ui.list.value(item, 'editable');
|
||||||
|
})
|
||||||
|
) {
|
||||||
|
pandora.api.find({
|
||||||
|
query: {
|
||||||
|
conditions: ui.listSelection.map(function(id) {
|
||||||
|
return {key: 'id', value: id, operator: '=='}
|
||||||
|
}),
|
||||||
|
operator: '|'
|
||||||
|
},
|
||||||
|
keys: ['id', 'title'],
|
||||||
|
range: [0, ui.listSelection.length]
|
||||||
|
}, function(result) {
|
||||||
|
pandora.$ui.deleteItemsDialog = pandora.ui.deleteItemsDialog({
|
||||||
|
items: result.data.items
|
||||||
|
}).open();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
init: function(data) {
|
init: function(data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue