Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI DVR: Add more informative questions for the delete operation
  • Loading branch information
perexg committed Dec 5, 2014
1 parent da2ae27 commit 5ba389b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/webui/static/app/dvr.js
Expand Up @@ -267,6 +267,8 @@ tvheadend.dvr_finished = function(panel, index) {
iconCls: 'finishedRec',
tabIndex: index,
del: true,
delquestion: 'Do you really want to delete the selected recordings?<br/><br/>' +
'The associated file will be removed from the storage.',
list: 'disp_title,episode,start_real,stop_real,' +
'duration,filesize,channelname,creator,' +
'sched_status,url,comment',
Expand Down Expand Up @@ -345,6 +347,8 @@ tvheadend.dvr_failed = function(panel, index) {
iconCls: 'exclamation',
tabIndex: index,
del: true,
delquestion: 'Do you really want to delete the selected recordings?<br/><br/>' +
'The associated file will be removed from the storage.',

This comment has been minimized.

Copy link
@mpmc

mpmc Dec 6, 2014

Contributor

@perexg
I'd change this to something like

Really delete the selected recording(s) <b>and associated file(s)<b>?

list: 'disp_title,episode,start_real,stop_real,' +
'duration,filesize,channelname,creator,' +
'status,sched_status,url,comment',
Expand Down
14 changes: 10 additions & 4 deletions src/webui/static/app/idnode.js
Expand Up @@ -1162,7 +1162,7 @@ tvheadend.idnode_grid = function(panel, conf)
var uuids = [];
for (var i = 0; i < r.length; i++)
uuids.push(r[i].id);
tvheadend.AjaxConfirm({
c = {
url: 'api/idnode/delete',
params: {
uuid: Ext.encode(uuids)
Expand All @@ -1172,7 +1172,10 @@ tvheadend.idnode_grid = function(panel, conf)
if (!auto.getValue())
store.reload();
}
});
};
if (conf.delquestion)
c['question'] = conf.delquestion;
tvheadend.AjaxConfirm(c);
}
}
});
Expand Down Expand Up @@ -1644,7 +1647,7 @@ tvheadend.idnode_form_grid = function(panel, conf)
disabled: true,
handler: function() {
if (current) {
tvheadend.AjaxConfirm({
var c = {
url: 'api/idnode/delete',
params: {
uuid: current.uuid
Expand All @@ -1653,7 +1656,10 @@ tvheadend.idnode_form_grid = function(panel, conf)
roweditor_destroy();
store.reload();
}
});
};
if (conf.delquestion)
c['delquestion'] = conf.delquestion;
tvheadend.AjaxConfirm(c);
}
}
});
Expand Down

0 comments on commit 5ba389b

Please sign in to comment.