Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[webui] remove the abort/delete buttons from the recording details di…
…alog in

favor of the new panel buttons
  • Loading branch information
Jalle19 authored and perexg committed Aug 6, 2014
1 parent b5642cb commit 582f289
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions src/webui/static/app/dvr.js
Expand Up @@ -105,64 +105,7 @@ tvheadend.dvrDetails = function(entry) {
html: content
});

switch (entry.schedstate) {
case 'scheduled':
win.addButton({
handler: cancelEvent,
text: "Remove from schedule"
});
break;

case 'recording':
case 'recordingError':
win.addButton({
handler: cancelEvent,
text: "Abort recording"
});
break;
case 'completedError':
case 'completed':
win.addButton({
handler: deleteEvent,
text: "Delete recording"
});
break;
}

win.show();

function cancelEvent() {
Ext.Ajax.request({
url: 'dvr',
params: {
entryId: entry.id,
op: 'cancelEntry'
},
success: function(response, options) {
win.close();
},
failure: function(response, options) {
Ext.MessageBox.alert('DVR', response.statusText);
}
});
}

function deleteEvent() {
Ext.Ajax.request({
url: 'dvr',
params: {
entryId: entry.id,
op: 'deleteEntry'
},
success: function(response, options) {
win.close();
},
failure: function(response, options) {
Ext.MessageBox.alert('DVR', response.statusText);
}
});
}

};

/**
Expand Down

0 comments on commit 582f289

Please sign in to comment.