From 20a5649dbe45932725d857f7d906a81ebf8f489c Mon Sep 17 00:00:00 2001 From: drigato Date: Thu, 21 Aug 2014 17:12:54 -0400 Subject: [PATCH] Removed unused code. Changed linked show warning message in the edit show form. --- .../application/services/SchedulerService.php | 34 ------------------- .../public/js/airtime/schedule/add-show.js | 2 +- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/airtime_mvc/application/services/SchedulerService.php b/airtime_mvc/application/services/SchedulerService.php index 60509390a..a31bd380a 100644 --- a/airtime_mvc/application/services/SchedulerService.php +++ b/airtime_mvc/application/services/SchedulerService.php @@ -207,40 +207,6 @@ class Application_Service_SchedulerService */ public static function fillLinkedInstances($ccShow, $instanceIdsToFill, $instanceId=null) { - //TODO can we remove the code until line 216 ?? - - /* - $instanceIds = $ccShow->getInstanceIdsSortedByMostRecentStartTime(); - if (count($instanceIds) == 0) { - return; - } - - //First check if any linked instances have content - //If all instances are empty then we don't need to fill - //any other instances with content - $doesAnyShowInstanceHaveContent = false; - foreach ($instanceIds as $instanceId) - { - $schedule_sql = "SELECT instance_id FROM cc_schedule ". - "WHERE instance_id=$instanceId";//#IN (".implode($instanceIds, ",").")"; - $ccSchedules = Application_Common_Database::prepareAndExecute( - $schedule_sql); - if (count($ccSchedules) > 0) { - $doesAnyShowInstanceHaveContent = true; - break; - } - } - //variable out of scope outside foreach loop - unset($ccSchedules); - - if ($doesAnyShowInstanceHaveContent == false) - { - //The linked shows are all empty, so there's nothing for us to do. - //(No content should be propagated to the other show instances... - return; - } - */ - //Get the "template" schedule for the linked show (contents of the linked show) that will be //copied into to all the new show instances. $linkedShowSchedule = self::getLinkedShowSchedule($ccShow->getDbId(), $instanceIdsToFill, $instanceId); diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 307a5c2c6..5e0ad5b37 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -277,7 +277,7 @@ function setAddShowEvents(form) { //only display the warning message if a show is being edited if ($(".button-bar.bottom").find(".ui-button-text").text() === "Update show") { if ($(this).attr("checked") && $("#show-link-warning").length === 0) { - $(this).parent().after(""); + $(this).parent().after(""); } if (!$(this).attr("checked") && $("#show-link-warning").length !== 0) {