CC-3806 : "n" of Add n items increases unexpectly

This commit is contained in:
Naomi Aro 2012-05-11 11:04:16 +02:00
parent 670c786924
commit 4e2aee83fd
4 changed files with 9 additions and 9 deletions

View File

@ -47,9 +47,7 @@ var AIRTIME = (function(AIRTIME){
$('#library_display tr.lib-audio').draggable({
helper: function(){
mod.addToChosen($(this));
var selected = mod.getChosenAudioFilesLength(),
container,
message,
@ -57,8 +55,8 @@ var AIRTIME = (function(AIRTIME){
width = li.width(),
height = li.height();
if (selected === 1) {
message = "Adding "+selected+" Item.";
if (selected === 0 || selected === 1) {
message = "Adding 1 Item.";
}
else {
message = "Adding "+selected+" Items.";

View File

@ -48,8 +48,6 @@ var AIRTIME = (function(AIRTIME){
$('#library_display tr.lib-audio, tr.lib-pl').draggable({
helper: function(){
mod.addToChosen($(this));
var selected = mod.getChosenItemsLength(),
container,
thead = $("#show_builder_table thead"),
@ -57,8 +55,8 @@ var AIRTIME = (function(AIRTIME){
width = thead.find("tr:first").width(),
message;
if (selected === 1) {
message = "Adding "+selected+" Item.";
if (selected === 0 || selected === 1) {
message = "Adding 1 Item.";
}
else {
message = "Adding "+selected+" Items.";

View File

@ -522,6 +522,8 @@ var AIRTIME = (function(AIRTIME){
i,
length;
AIRTIME.library.addToChosen(ui.item);
//filter out anything that isn't an audiofile.
aSelected = AIRTIME.library.getSelectedData();

View File

@ -697,6 +697,8 @@ var AIRTIME = (function(AIRTIME){
fnReceive = function(event, ui) {
var aItems = [];
AIRTIME.library.addToChosen(ui.item);
aItems = AIRTIME.library.getSelectedData();
origTrs = aItems;