CC-3806 : "n" of Add n items increases unexpectly
This commit is contained in:
parent
670c786924
commit
4e2aee83fd
4 changed files with 9 additions and 9 deletions
|
@ -48,8 +48,6 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$('#library_display tr.lib-audio').draggable({
|
$('#library_display tr.lib-audio').draggable({
|
||||||
helper: function(){
|
helper: function(){
|
||||||
|
|
||||||
mod.addToChosen($(this));
|
|
||||||
|
|
||||||
var selected = mod.getChosenAudioFilesLength(),
|
var selected = mod.getChosenAudioFilesLength(),
|
||||||
container,
|
container,
|
||||||
message,
|
message,
|
||||||
|
@ -57,8 +55,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
width = li.width(),
|
width = li.width(),
|
||||||
height = li.height();
|
height = li.height();
|
||||||
|
|
||||||
if (selected === 1) {
|
if (selected === 0 || selected === 1) {
|
||||||
message = "Adding "+selected+" Item.";
|
message = "Adding 1 Item.";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message = "Adding "+selected+" Items.";
|
message = "Adding "+selected+" Items.";
|
||||||
|
|
|
@ -48,8 +48,6 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$('#library_display tr.lib-audio, tr.lib-pl').draggable({
|
$('#library_display tr.lib-audio, tr.lib-pl').draggable({
|
||||||
helper: function(){
|
helper: function(){
|
||||||
|
|
||||||
mod.addToChosen($(this));
|
|
||||||
|
|
||||||
var selected = mod.getChosenItemsLength(),
|
var selected = mod.getChosenItemsLength(),
|
||||||
container,
|
container,
|
||||||
thead = $("#show_builder_table thead"),
|
thead = $("#show_builder_table thead"),
|
||||||
|
@ -57,8 +55,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
width = thead.find("tr:first").width(),
|
width = thead.find("tr:first").width(),
|
||||||
message;
|
message;
|
||||||
|
|
||||||
if (selected === 1) {
|
if (selected === 0 || selected === 1) {
|
||||||
message = "Adding "+selected+" Item.";
|
message = "Adding 1 Item.";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message = "Adding "+selected+" Items.";
|
message = "Adding "+selected+" Items.";
|
||||||
|
|
|
@ -522,6 +522,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
i,
|
i,
|
||||||
length;
|
length;
|
||||||
|
|
||||||
|
AIRTIME.library.addToChosen(ui.item);
|
||||||
|
|
||||||
//filter out anything that isn't an audiofile.
|
//filter out anything that isn't an audiofile.
|
||||||
aSelected = AIRTIME.library.getSelectedData();
|
aSelected = AIRTIME.library.getSelectedData();
|
||||||
|
|
||||||
|
|
|
@ -698,6 +698,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
fnReceive = function(event, ui) {
|
fnReceive = function(event, ui) {
|
||||||
var aItems = [];
|
var aItems = [];
|
||||||
|
|
||||||
|
AIRTIME.library.addToChosen(ui.item);
|
||||||
|
|
||||||
aItems = AIRTIME.library.getSelectedData();
|
aItems = AIRTIME.library.getSelectedData();
|
||||||
origTrs = aItems;
|
origTrs = aItems;
|
||||||
html = ui.helper.html();
|
html = ui.helper.html();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue