From f3c8f401832296a1940cb2717cc1bc3b92aa14cd Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Tue, 14 Apr 2015 17:39:52 -0400 Subject: [PATCH] Tweaks to fix up my optimizatinos * Fixed a rendering glitch with empty shows in the Now Playing screen * Changed drag and drop placeholder to show the track name. Reverted it from the default DataTables placeholder, which unfortunately gets the column widths wrong. --- .../public/js/airtime/showbuilder/builder.js | 17 +++++++++++++---- .../js/airtime/showbuilder/main_builder.js | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index cc1178752..8a090adaa 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -590,8 +590,7 @@ var AIRTIME = (function(AIRTIME){ //remove the column classes from all tds. $nRow.find('td').removeClass(); - //$node = $(nRow.children[0]).replaceWith(emptyNode);; - //$node.html(''); + $node = $(nRow.children[0]); if ($node) { $node.empty(); } @@ -1014,8 +1013,18 @@ var AIRTIME = (function(AIRTIME){ } if (selected.length === 1) { - //message = $.i18n._("Moving 1 Item"); - draggingContainer = item; + message = sprintf($.i18n._("Moving %s"), selected[0].title); + //draggingContainer = item; //Default DataTables drag and drop + draggingContainer = $('') + .addClass('sb-helper') + .append('') + .find("td") + .attr("colspan", colspan) + .width(width) + .height(height) + .addClass("ui-state-highlight") + .append(message) + .end(); } else { message = sprintf($.i18n._("Moving %s Items"), selected.length); diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index b29f32d68..cb211e573 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -168,7 +168,7 @@ AIRTIME = (function(AIRTIME) { $builder.find(dateStartId) .datepicker(oBaseDatePickerSettings) .blur(validateTimeRange); - + $builder.find(timeStartId) .timepicker(oBaseTimePickerSettings) .blur(validateTimeRange);