From c18896e4261cab8119a03f8febd2516282094676 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 27 Feb 2015 16:33:20 +0530 Subject: [PATCH] hook up deletefromlibrary in main menu --- static/js/deleteItemsDialog.js | 4 ++++ static/js/mainMenu.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/static/js/deleteItemsDialog.js b/static/js/deleteItemsDialog.js index 6093311..cdc871c 100644 --- a/static/js/deleteItemsDialog.js +++ b/static/js/deleteItemsDialog.js @@ -28,6 +28,10 @@ oml.ui.deleteItemsDialog = function() { oml.UI.set({listSelection: []}); Ox.Request.clearCache(); // to much? oml.$ui.list.updateElement(); + oml.user.ui.item && oml.UI.set({ + item: '', + itemView: 'info' + }); }); }); diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index fd73aea..3be5005 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -377,6 +377,11 @@ oml.ui.mainMenu = function() { oml.addList(Ox.contains(id, 'smart'), Ox.contains(id, 'from')); } else if (id == 'duplicatelist') { oml.addList(ui._list); + } else if (id == 'deletefromlibrary') { + var listData = oml.getListData(); + if (listData.own) { + oml.ui.deleteItemsDialog().open(); + } } else if (id == 'editlist') { oml.ui.listDialog.open(); } else if (id == 'deletelist') {