CC-3174 : showbuilder
fixing order of scheduled/playlist data when added via group dragging.
This commit is contained in:
parent
f39afe9503
commit
5257711866
4 changed files with 32 additions and 25 deletions
|
@ -506,18 +506,25 @@ var AIRTIME = (function(AIRTIME){
|
|||
fnUpdate;
|
||||
|
||||
fnReceive = function(event, ui) {
|
||||
var selected = $('#library_display tr[id^="au"] input:checked').parents('tr'),
|
||||
aItems = [];
|
||||
|
||||
var aItems = [],
|
||||
aSelected,
|
||||
oLibTT = TableTools.fnGetInstance('library_display'),
|
||||
i,
|
||||
length;
|
||||
|
||||
//filter out anything that isn't an audiofile.
|
||||
aSelected = oLibTT.fnGetSelectedData();
|
||||
//if nothing is checked select the dragged item.
|
||||
if (selected.length === 0) {
|
||||
selected = ui.item;
|
||||
if (aSelected.length === 0) {
|
||||
aSelected.push(ui.item.data("aData"));
|
||||
}
|
||||
|
||||
selected.each(function(i, el) {
|
||||
aItems.push($(el).data("aData").id);
|
||||
});
|
||||
|
||||
for (i = 0, length = aSelected.length; i < length; i++) {
|
||||
if (aSelected[i].ftype === "audioclip") {
|
||||
aItems.push(aSelected[i].id);
|
||||
}
|
||||
}
|
||||
|
||||
aReceiveItems = aItems;
|
||||
html = ui.helper.html();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue