From 0fe4478bb5d2b7d4c2bd6b2ce44bef36836970ab Mon Sep 17 00:00:00 2001 From: James Date: Thu, 26 Apr 2012 10:56:08 -0400 Subject: [PATCH 1/3] CC-3478: Calendar->Show has some inconsistencies on special Days (e.g. switching to Daylight Saving Time) - added exception handling --- .../controllers/ScheduleController.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index e97b2d7fc..9ce53ca02 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -900,15 +900,19 @@ class ScheduleController extends Zend_Controller_Action $startParam = $this->_getParam('startTime'); $endParam = $this->_getParam('endTime'); - $startDateTime = new DateTime($startParam); - $endDateTime = new DateTime($endParam); + try{ + $startDateTime = new DateTime($startParam); + $endDateTime = new DateTime($endParam); - $UTCStartDateTime = $startDateTime->setTimezone(new DateTimeZone('UTC')); - $UTCEndDateTime = $endDateTime->setTimezone(new DateTimeZone('UTC')); + $UTCStartDateTime = $startDateTime->setTimezone(new DateTimeZone('UTC')); + $UTCEndDateTime = $endDateTime->setTimezone(new DateTimeZone('UTC')); - $duration = $UTCEndDateTime->diff($UTCStartDateTime); + $duration = $UTCEndDateTime->diff($UTCStartDateTime); - $result = $duration->format('%r%Hh %Im'); + $result = $duration->format('%r%Hh %Im'); + }catch (Exception $e){ + $result = "Invalid Date"; + } echo Zend_Json::encode($result); exit(); From cf4101cdcd4caca46b6a0b5880d93ce8dc31b8df Mon Sep 17 00:00:00 2001 From: James Date: Thu, 26 Apr 2012 11:22:57 -0400 Subject: [PATCH 2/3] CC-3720: Switch order of streams in dashboard - done --- .../views/scripts/partialviews/header.phtml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/views/scripts/partialviews/header.phtml b/airtime_mvc/application/views/scripts/partialviews/header.phtml index 5e427d670..af6ae2b86 100644 --- a/airtime_mvc/application/views/scripts/partialviews/header.phtml +++ b/airtime_mvc/application/views/scripts/partialviews/header.phtml @@ -24,9 +24,12 @@

Source Streams

From c9df8e8b150aa240a7a30a6f0284146a3ac9bce0 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 26 Apr 2012 11:56:14 -0400 Subject: [PATCH 3/3] CC-3722: Create loading indicator for AJAX call when calculating Show length - done --- .../views/scripts/form/add-show-when.phtml | 1 + airtime_mvc/public/css/images/loader-small.gif | Bin 0 -> 673 bytes .../public/js/airtime/schedule/add-show.js | 5 ++++- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 airtime_mvc/public/css/images/loader-small.gif diff --git a/airtime_mvc/application/views/scripts/form/add-show-when.phtml b/airtime_mvc/application/views/scripts/form/add-show-when.phtml index 6f3591ac6..124aebee3 100644 --- a/airtime_mvc/application/views/scripts/form/add-show-when.phtml +++ b/airtime_mvc/application/views/scripts/form/add-show-when.phtml @@ -46,6 +46,7 @@
element->getElement('add_show_duration') ?> +
element->getElement('add_show_duration')->hasErrors()){ ?>
    diff --git a/airtime_mvc/public/css/images/loader-small.gif b/airtime_mvc/public/css/images/loader-small.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0bce1542342e912da81a2c260562df172f30d73 GIT binary patch literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nnmm28Kh24mmkF0U1e2Nli^nlO|14{Lk&@8WQa67~pE8 zXTZz|lvDgC+Z`3#dv5h=E26FfcG1 zbL_hF&)}42ws10s6^G;;cE1^EoUR)U5A70}d2pLv!jVIT7j&Z~EblI3x0K*v_sV|m z0kj3v921Z^em#l`(k(o@H$3ZdDRc@9NidXDNbqrumReCGv$gd8+e8WW28HVqkJ_9i zH>s*<31KtHjANIPvi2#*6BEu%3Dak5O_t&NBI)H?V$TxT}#l{vOTn5naXTfF^&~Hhq+NX@#Ccc>y7T?;vjI&jdhsDsPJyAw*m0Qz>i}K7# zL9w50Ng{fT}A5JUe8lRK1h7_Y2;BWJDd=c6f&i?Wv5(5q?6|P zQw{>maxZP<537OA37Uk}7@%_$4o$EWe_Zl>&#id|lE-BpDC#+Fn|msJ%_2h{Hg1vP z#N8WAzfWasG}yq|xqE)DrWaOofX=z|?*pgc%{ig5vl!pqDlC|q&~Z0$&Rvsft&VO- z4MZj+%-+Vx%W}v;V76hyp=;+R;x+~t^Q%*xuFTQAF2})fSfTHDAs>sO!OBw`)&)o$ c0!CNZt))x~rAZP^^P&YOFfdqy5)K#u0POD40{{R3 literal 0 HcmV?d00001 diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index e7cd05b96..f784e6ce1 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -460,9 +460,12 @@ function setAddShowEvents() { }) function calculateDuration(endDateTime, startDateTime){ - var duration; + var loadingIcon = $('#icon-loader-small'); + + loadingIcon.show(); $.post("/Schedule/calculate-duration", {startTime: startDateTime, endTime: endDateTime}, function(data){ $('#add_show_duration').val(JSON.parse(data)); + loadingIcon.hide(); }); } }