From 073169ae9c0f0153f0b47fbdf171282dff7b036f Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Tue, 5 Aug 2014 14:00:50 +0300 Subject: [PATCH] [webui] no need to check if we have selected any items when pressing Delete, the button is unclickable when nothing is selected --- src/webui/static/app/tableeditor.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/webui/static/app/tableeditor.js b/src/webui/static/app/tableeditor.js index 92782612..706e8d2e 100644 --- a/src/webui/static/app/tableeditor.js +++ b/src/webui/static/app/tableeditor.js @@ -43,17 +43,9 @@ tvheadend.tableEditor = function(title, dtable, cm, rec, plugins, store, ; function delSelected() { - var selectedKeys = grid.selModel.selections.keys; - if (selectedKeys.length > 0) { - Ext.MessageBox.confirm('Message', - 'Do you really want to delete selection?', deleteRecord); - } - else { - Ext.MessageBox.alert('Message', - 'Please select at least one item to delete'); - } - } - ; + Ext.MessageBox.confirm('Message', + 'Do you really want to delete selection?', deleteRecord); + }; function deleteRecord(btn) { if (btn === 'yes') {