From da7e44a78ccaac455a1a7dc560f9bb3a15c786f6 Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 7 Jun 2012 16:09:51 -0400 Subject: [PATCH 1/2] CC-3940: Calendar displays highlighting with regards to date and time of server instead of adjusting to the Timezone settings -fixed --- .../public/js/fullcalendar/fullcalendar.js | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/fullcalendar/fullcalendar.js b/airtime_mvc/public/js/fullcalendar/fullcalendar.js index 779a313c7..6604f977f 100644 --- a/airtime_mvc/public/js/fullcalendar/fullcalendar.js +++ b/airtime_mvc/public/js/fullcalendar/fullcalendar.js @@ -2187,11 +2187,18 @@ function BasicView(element, calendar, viewName) { }else{ clearEvents(); } - updateCells(firstTime); + getOffset(); } - - + function getOffset() { + var timezoneOffset; + $.ajax({ url: "/Api/calendar-init/format/json", dataType:"json", success:function(data) { + timezoneOffset = data.calendarInit.timezoneOffset*1000; + var firstTime = !body; + updateCells(firstTime, timezoneOffset); + }, error:function(jqXHR, textStatus, errorThrown){}}); + } + function updateOptions() { rtl = opt('isRTL'); if (rtl) { @@ -2272,15 +2279,17 @@ function BasicView(element, calendar, viewName) { .appendTo(element); } - - - function updateCells(firstTime) { + function updateCells(firstTime, timezoneOffset) { var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating? var month = t.start.getMonth(); - var today = clearTime(new Date()); var cell; var date; var row; + + var today = new Date(); + var utc = today.getTime() + (today.getTimezoneOffset()*60000); + var userTime = new Date(utc + timezoneOffset); + today = clearTime(userTime); if (dowDirty) { headCells.each(function(i, _cell) { From 8fae454db66f694a17698108bc2b45498dfa5ee9 Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 7 Jun 2012 17:04:31 -0400 Subject: [PATCH 2/2] CC-3901: DJ not assigned to Show, Guest: selection dialog populated upon clicking on "Select All" button in Now Playing -fixed --- airtime_mvc/public/js/airtime/showbuilder/builder.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index b43438307..6681eee49 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -301,6 +301,9 @@ var AIRTIME = (function(AIRTIME){ if (!$el.hasClass("ui-state-disabled")) { $el.addClass("ui-state-hover"); + } + else { + $("#show_builder .ui-icon-document-b").contextMenu(false); } }); $sbContent.on("mouseleave", ".fg-toolbar ul li", function(ev) {