CC-3870 : Now playing -> "Add n items" displays wrong "n" when drag and drop tracks to Time Line
This commit is contained in:
parent
0c233c3346
commit
bf614dd729
|
@ -48,14 +48,20 @@ var AIRTIME = (function(AIRTIME){
|
|||
$('#library_display tr.lib-audio').draggable({
|
||||
helper: function(){
|
||||
|
||||
var selected = mod.getChosenAudioFilesLength(),
|
||||
var $el = $(this),
|
||||
selected = mod.getChosenAudioFilesLength(),
|
||||
container,
|
||||
message,
|
||||
li = $("#side_playlist ul li:first"),
|
||||
width = li.width(),
|
||||
height = li.height();
|
||||
|
||||
//dragging an element that has an unselected checkbox.
|
||||
if (mod.isChosenItem($el) === false) {
|
||||
selected++;
|
||||
}
|
||||
|
||||
if (selected === 0 || selected === 1) {
|
||||
if (selected === 1) {
|
||||
message = "Adding 1 Item.";
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -48,14 +48,20 @@ var AIRTIME = (function(AIRTIME){
|
|||
$('#library_display tr.lib-audio, tr.lib-pl').draggable({
|
||||
helper: function(){
|
||||
|
||||
var selected = mod.getChosenItemsLength(),
|
||||
var $el = $(this),
|
||||
selected = mod.getChosenItemsLength(),
|
||||
container,
|
||||
thead = $("#show_builder_table thead"),
|
||||
colspan = thead.find("th").length,
|
||||
width = thead.find("tr:first").width(),
|
||||
message;
|
||||
|
||||
if (selected === 0 || selected === 1) {
|
||||
//dragging an element that has an unselected checkbox.
|
||||
if (mod.isChosenItem($el) === false) {
|
||||
selected++;
|
||||
}
|
||||
|
||||
if (selected === 1) {
|
||||
message = "Adding 1 Item.";
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -98,6 +98,13 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
};
|
||||
|
||||
mod.isChosenItem = function($el) {
|
||||
var id = $el.attr("id"),
|
||||
item = chosenItems[id];
|
||||
|
||||
return item !== undefined ? true : false;
|
||||
};
|
||||
|
||||
mod.addToChosen = function($el) {
|
||||
var id = $el.attr("id");
|
||||
|
||||
|
|
Loading…
Reference in New Issue