Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[webui] no need to check if we have selected any items when pressing …
…Delete,

the button is unclickable when nothing is selected
  • Loading branch information
Jalle19 authored and perexg committed Aug 6, 2014
1 parent e43b0e6 commit 073169a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/webui/static/app/tableeditor.js
Expand Up @@ -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') {
Expand Down

0 comments on commit 073169a

Please sign in to comment.