From 9b7acb24c6abc57e50d0038397c56ad13a01b57e Mon Sep 17 00:00:00 2001 From: drigato Date: Wed, 22 Apr 2015 12:46:41 -0400 Subject: [PATCH] SAAS-728: Make schedule widgets embeddable --- .../controllers/EmbedController.php | 24 +++++++++++++++ .../scripts/embed/current-day-program.phtml | 26 +++++++++++++++++ .../views/scripts/embed/weekly-program.phtml | 29 +++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 airtime_mvc/application/views/scripts/embed/current-day-program.phtml create mode 100644 airtime_mvc/application/views/scripts/embed/weekly-program.phtml diff --git a/airtime_mvc/application/controllers/EmbedController.php b/airtime_mvc/application/controllers/EmbedController.php index 3212c8e5d..08f83aaad 100644 --- a/airtime_mvc/application/controllers/EmbedController.php +++ b/airtime_mvc/application/controllers/EmbedController.php @@ -54,4 +54,28 @@ class EmbedController extends Zend_Controller_Action $this->view->availableMobileStreams = json_encode($availableMobileStreams); $this->view->availableDesktopStreams = json_encode($availableDesktopStreams); } + + public function currentDayProgramAction() + { + $this->view->layout()->disableLayout(); + + $CC_CONFIG = Config::getConfig(); + + $this->view->css = Application_Common_HTTPHelper::getStationUrl() . "widgets/css/airtime-widgets.css?".$CC_CONFIG['airtime_version']; + $this->view->jquery = Application_Common_HTTPHelper::getStationUrl() . "widgets/js/jquery-1.6.1.min.js?".$CC_CONFIG['airtime_version']; + $this->view->jquery_custom = Application_Common_HTTPHelper::getStationUrl() . "widgets/js/jquery-ui-1.8.10.custom.min.js?".$CC_CONFIG['airtime_version']; + $this->view->widget_js = Application_Common_HTTPHelper::getStationUrl() . "widgets/js/jquery.showinfo.js?".$CC_CONFIG['airtime_version']; + } + + public function weeklyProgramAction() + { + $this->view->layout()->disableLayout(); + + $CC_CONFIG = Config::getConfig(); + + $this->view->css = Application_Common_HTTPHelper::getStationUrl() . "widgets/css/airtime-widgets.css?".$CC_CONFIG['airtime_version']; + $this->view->jquery = Application_Common_HTTPHelper::getStationUrl() . "widgets/js/jquery-1.6.1.min.js?".$CC_CONFIG['airtime_version']; + $this->view->jquery_custom = Application_Common_HTTPHelper::getStationUrl() . "widgets/js/jquery-ui-1.8.10.custom.min.js?".$CC_CONFIG['airtime_version']; + $this->view->widget_js = Application_Common_HTTPHelper::getStationUrl() . "widgets/js/jquery.showinfo.js?".$CC_CONFIG['airtime_version']; + } } diff --git a/airtime_mvc/application/views/scripts/embed/current-day-program.phtml b/airtime_mvc/application/views/scripts/embed/current-day-program.phtml new file mode 100644 index 000000000..a4dbd3872 --- /dev/null +++ b/airtime_mvc/application/views/scripts/embed/current-day-program.phtml @@ -0,0 +1,26 @@ + + + + + + + + + + + + +
+ + + + diff --git a/airtime_mvc/application/views/scripts/embed/weekly-program.phtml b/airtime_mvc/application/views/scripts/embed/weekly-program.phtml new file mode 100644 index 000000000..a932a86e6 --- /dev/null +++ b/airtime_mvc/application/views/scripts/embed/weekly-program.phtml @@ -0,0 +1,29 @@ + + + + + + + + + + + + +
+ + + + +