CC-3997: Now Playing -> Time Line: different behaviour between 'delete'
button and 'delete' menu items - added confirm box on clicking delete button on now playing table - also added confirm box on library delete button as well
This commit is contained in:
parent
4af43c7a10
commit
31d643cee1
2 changed files with 24 additions and 19 deletions
|
@ -252,20 +252,22 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.fnDeleteSelectedItems = function() {
|
mod.fnDeleteSelectedItems = function() {
|
||||||
var aData = AIRTIME.library.getSelectedData(),
|
if (confirm('Are you sure you want to delete the selected item(s)?')) {
|
||||||
item,
|
var aData = AIRTIME.library.getSelectedData(),
|
||||||
temp,
|
item,
|
||||||
aMedia = [];
|
temp,
|
||||||
|
aMedia = [];
|
||||||
//process selected files/playlists.
|
|
||||||
for (item in aData) {
|
//process selected files/playlists.
|
||||||
temp = aData[item];
|
for (item in aData) {
|
||||||
if (temp !== null && temp.hasOwnProperty('id') ) {
|
temp = aData[item];
|
||||||
aMedia.push({"id": temp.id, "type": temp.ftype});
|
if (temp !== null && temp.hasOwnProperty('id') ) {
|
||||||
}
|
aMedia.push({"id": temp.id, "type": temp.ftype});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
AIRTIME.library.fnDeleteItems(aMedia);
|
|
||||||
|
AIRTIME.library.fnDeleteItems(aMedia);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
libraryInit = function() {
|
libraryInit = function() {
|
||||||
|
|
|
@ -243,11 +243,14 @@ var AIRTIME = (function(AIRTIME){
|
||||||
mod.fnRemove = function(aItems) {
|
mod.fnRemove = function(aItems) {
|
||||||
|
|
||||||
mod.disableUI();
|
mod.disableUI();
|
||||||
|
if (confirm("Delete selected item(s)?")) {
|
||||||
$.post( "/showbuilder/schedule-remove",
|
$.post( "/showbuilder/schedule-remove",
|
||||||
{"items": aItems, "format": "json"},
|
{"items": aItems, "format": "json"},
|
||||||
mod.fnItemCallback
|
mod.fnItemCallback
|
||||||
);
|
);
|
||||||
|
}else{
|
||||||
|
mod.enableUI();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.fnRemoveSelectedItems = function() {
|
mod.fnRemoveSelectedItems = function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue