SAAS-991 - initial playlist editor redesign

This commit is contained in:
Duncan Sommerville 2015-08-06 19:16:04 -04:00
parent cc36fcd37b
commit 02d96d7bd0
10 changed files with 190 additions and 145 deletions

View file

@ -303,19 +303,23 @@ var AIRTIME = (function(AIRTIME) {
return;
}
var data = $(".lib-selected:first").data("aData");
var selected = $(".lib-selected");
if (data.ftype === "audioclip") {
$.get(baseUrl + "library/edit-file-md/id/" + data.id, {format: "json"}, function(json){
AIRTIME.playlist.fileMdEdit(json);
//buildEditMetadataDialog(json);
});
} else if (data.ftype === "playlist" || data.ftype === "block") {
AIRTIME.playlist.fnEdit(data.id, data.ftype, baseUrl+'new-playlist/edit');
AIRTIME.playlist.validatePlaylistElements();
} else if (data.ftype === "stream") {
AIRTIME.playlist.fnEdit(data.id, data.ftype, baseUrl + 'new-webstream/edit');
}
selected.each(function(i, el) {
var data = $(el).data("aData");
if (data.ftype === "audioclip") {
$.get(baseUrl + "library/edit-file-md/id/" + data.id, {format: "json"}, function(json){
AIRTIME.playlist.fileMdEdit(json);
//buildEditMetadataDialog(json);
});
} else if (data.ftype === "playlist" || data.ftype === "block") {
AIRTIME.playlist.fnEdit(data.id, data.ftype, baseUrl+'new-playlist/edit');
AIRTIME.playlist.validatePlaylistElements();
} else if (data.ftype === "stream") {
AIRTIME.playlist.fnEdit(data.id, data.ftype, baseUrl + 'new-webstream/edit');
}
});
});
mod.createToolbarDropDown();