consolidate list reloading
This commit is contained in:
parent
16c0514809
commit
904ed06349
8 changed files with 21 additions and 33 deletions
|
|
@ -386,8 +386,7 @@ oml.ui.mainMenu = function() {
|
|||
if (listData.editable && listData.type == 'static') {
|
||||
oml.doHistory('delete', ui.listSelection, ui._list, function() {
|
||||
oml.UI.set({listSelection: []});
|
||||
oml.$ui.folders.updateItems();
|
||||
oml.$ui.list.updateElement();
|
||||
oml.reloadLists();
|
||||
});
|
||||
}
|
||||
} else if (id == 'deletefromlibrary') {
|
||||
|
|
@ -415,7 +414,7 @@ oml.ui.mainMenu = function() {
|
|||
oml.clipboard[action](ui.listSelection, 'item');
|
||||
oml.doHistory('cut', ui.listSelection, ui._list, function() {
|
||||
oml.UI.set({listSelection: []});
|
||||
oml.reloadList();
|
||||
oml.reloadLists();
|
||||
});
|
||||
} else if (Ox.contains(['copy', 'copyadd'], id)) {
|
||||
var action = data.id == 'copy' ? 'copy' : 'add';
|
||||
|
|
@ -425,14 +424,14 @@ oml.ui.mainMenu = function() {
|
|||
var items = oml.clipboard.paste();
|
||||
oml.doHistory('paste', items, ui._list, function() {
|
||||
oml.UI.set({listSelection: items});
|
||||
oml.reloadList();
|
||||
oml.reloadLists();
|
||||
});
|
||||
} else if (data.id == 'clearclipboard') {
|
||||
oml.clipboard.clear();
|
||||
} else if (data.id == 'delete') {
|
||||
oml.doHistory('delete', ui.listSelection, ui._list, function() {
|
||||
oml.UI.set({listSelection: []});
|
||||
oml.reloadList();
|
||||
oml.reloadLists();
|
||||
});
|
||||
} else if (data.id == 'editmetadata') {
|
||||
oml.$ui.editDialog = oml.ui.editDialog().open();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue