From fae3f3a03f31b62ccb48c68857b070f5bf8f7c19 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Mon, 14 Jan 2013 16:00:38 -0500 Subject: [PATCH] CC-2184: Hardcoded CSS path should be relative path instead -Make '/' the default root --- airtime_mvc/application/Bootstrap.php | 58 ++++++------- airtime_mvc/application/common/OsPath.php | 11 ++- .../controllers/AudiopreviewController.php | 39 ++++----- .../controllers/DashboardController.php | 4 +- .../controllers/LibraryController.php | 56 ++++++------ .../controllers/ListenerstatController.php | 16 ++-- .../controllers/LocaleController.php | 4 +- .../controllers/LoginController.php | 4 +- .../controllers/PlayouthistoryController.php | 26 +++--- .../controllers/PluploadController.php | 10 +-- .../controllers/PreferenceController.php | 10 +-- .../controllers/ScheduleController.php | 87 +++++++++---------- .../controllers/ShowbuilderController.php | 50 +++++------ .../controllers/SystemstatusController.php | 2 +- .../controllers/UserController.php | 8 +- .../application/layouts/scripts/layout.phtml | 2 +- airtime_mvc/application/models/StoredFile.php | 10 +-- .../views/scripts/library/library.phtml | 2 +- .../scripts/preference/support-setting.phtml | 2 +- .../airtime/audiopreview/preview_jplayer.js | 6 +- .../public/js/airtime/common/common.js | 6 +- .../public/js/airtime/dashboard/dashboard.js | 2 +- .../public/js/airtime/library/library.js | 24 ++--- .../public/js/airtime/library/plupload.js | 4 +- airtime_mvc/public/js/airtime/library/spl.js | 40 ++++----- .../js/airtime/listenerstat/listenerstat.js | 4 +- .../public/js/airtime/nowplaying/register.js | 6 +- .../js/airtime/playouthistory/historytable.js | 4 +- .../js/airtime/preferences/musicdirs.js | 16 ++-- .../js/airtime/preferences/preferences.js | 2 +- .../js/airtime/preferences/streamsetting.js | 12 +-- .../public/js/airtime/schedule/add-show.js | 10 +-- .../schedule/full-calendar-functions.js | 18 ++-- .../public/js/airtime/schedule/schedule.js | 12 +-- .../public/js/airtime/showbuilder/builder.js | 18 ++-- .../js/airtime/showbuilder/main_builder.js | 6 +- .../public/js/airtime/status/status.js | 2 +- airtime_mvc/public/js/airtime/user/user.js | 8 +- 38 files changed, 303 insertions(+), 298 deletions(-) diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index be772e009..cbb056f72 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -73,13 +73,13 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $baseUrl = Application_Common_OsPath::getBaseDir(); - $view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']); - $view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']); - $view->headLink()->appendStylesheet($baseUrl.'/css/qtip/jquery.qtip.min.css?'.$CC_CONFIG['airtime_version']); - $view->headLink()->appendStylesheet($baseUrl.'/css/styles.css?'.$CC_CONFIG['airtime_version']); - $view->headLink()->appendStylesheet($baseUrl.'/css/masterpanel.css?'.$CC_CONFIG['airtime_version']); - $view->headLink()->appendStylesheet($baseUrl.'/css/bootstrap.css?'.$CC_CONFIG['airtime_version']); - $view->headLink()->appendStylesheet($baseUrl.'/css/tipsy/jquery.tipsy.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/qtip/jquery.qtip.min.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/styles.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/masterpanel.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/bootstrap.css?'.$CC_CONFIG['airtime_version']); + $view->headLink()->appendStylesheet($baseUrl.'css/tipsy/jquery.tipsy.css?'.$CC_CONFIG['airtime_version']); } protected function _initHeadScript() @@ -90,29 +90,29 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $baseUrl = Application_Common_OsPath::getBaseDir(); - $view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/bootstrap/bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/cookie/jquery.cookie.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/i18n/jquery.i18n.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/locale/general-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/locale/datatables-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/bootstrap/bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/cookie/jquery.cookie.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/i18n/jquery.i18n.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'locale/general-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'locale/datatables-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendScript("$.i18n.setDictionary(general_dict)"); $view->headScript()->appendScript("var baseUrl='$baseUrl'"); //scripts for now playing bar - $view->headScript()->appendFile($baseUrl.'/js/airtime/airtime_bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/helperfunctions.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/dashboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/versiontooltip.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/tipsy/jquery.tipsy.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/airtime/airtime_bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/airtime/dashboard/helperfunctions.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/airtime/dashboard/dashboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/airtime/dashboard/versiontooltip.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/tipsy/jquery.tipsy.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/airtime/common/common.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $view->headScript()->appendFile($baseUrl.'/js/airtime/common/audioplaytest.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/airtime/common/common.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/airtime/common/audioplaytest.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $user = Application_Model_User::getCurrentUser(); if (!is_null($user)){ @@ -123,15 +123,15 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $view->headScript()->appendScript("var userType = '$userType';"); if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) { - $view->headScript()->appendFile($baseUrl.'/js/libs/google-analytics.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $view->headScript()->appendFile($baseUrl.'js/libs/google-analytics.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); } if (Application_Model_Preference::GetPlanLevel() != "disabled" - && !($_SERVER['REQUEST_URI'] == $baseUrl.'/Dashboard/stream-player' || - strncmp($_SERVER['REQUEST_URI'], $baseUrl.'/audiopreview/audio-preview', strlen($baseUrl.'/audiopreview/audio-preview'))==0)) { + && !($_SERVER['REQUEST_URI'] == $baseUrl.'Dashboard/stream-player' || + strncmp($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/audio-preview', strlen($baseUrl.'audiopreview/audio-preview'))==0)) { $client_id = Application_Model_Preference::GetClientId(); $view->headScript()->appendScript("var livechat_client_id = '$client_id';"); - $view->headScript()->appendFile($baseUrl . '/js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); } } diff --git a/airtime_mvc/application/common/OsPath.php b/airtime_mvc/application/common/OsPath.php index 029d96f03..64c1c1e4a 100644 --- a/airtime_mvc/application/common/OsPath.php +++ b/airtime_mvc/application/common/OsPath.php @@ -66,8 +66,15 @@ class Application_Common_OsPath{ public static function getBaseDir() { $baseUrl = dirname($_SERVER['SCRIPT_NAME']); - if (strcmp($baseUrl, '/') ==0) $baseUrl = ""; - + + if ($baseUrl[0] != "/") { + $baseUrl = "/".$baseUrl; + } + + if ($baseUrl[strlen($baseUrl) -1] != "/") { + $baseUrl = $baseUrl."/"; + } + return $baseUrl; } } diff --git a/airtime_mvc/application/controllers/AudiopreviewController.php b/airtime_mvc/application/controllers/AudiopreviewController.php index 2cf9e16df..003a1a68a 100644 --- a/airtime_mvc/application/controllers/AudiopreviewController.php +++ b/airtime_mvc/application/controllers/AudiopreviewController.php @@ -29,20 +29,20 @@ class AudiopreviewController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); $this->view->headScript()->appendFile( - $baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'], + $baseUrl.'js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile( - $baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'], + $baseUrl.'js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headLink()->appendStylesheet( - $baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); + $baseUrl.'js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); $this->_helper->layout->setLayout('audioPlayer'); $logo = Application_Model_Preference::GetStationLogo(); if ($logo) { $this->view->logo = "data:image/png;base64,$logo"; } else { - $this->view->logo = "$baseUrl/css/images/airtime_logo_jp.png"; + $this->view->logo = $baseUrl."css/images/airtime_logo_jp.png"; } if ($type == "audioclip") { @@ -80,16 +80,16 @@ class AudiopreviewController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); $this->_helper->layout->setLayout('audioPlayer'); $logo = Application_Model_Preference::GetStationLogo(); if ($logo) { $this->view->logo = "data:image/png;base64,$logo"; } else { - $this->view->logo = "$baseUrl/css/images/airtime_logo_jp.png"; + $this->view->logo = $baseUrl."css/images/airtime_logo_jp.png"; } $this->view->playlistIndex= $playlistIndex; $this->view->playlistID = $playlistID; @@ -106,16 +106,16 @@ class AudiopreviewController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); $this->_helper->layout->setLayout('audioPlayer'); $logo = Application_Model_Preference::GetStationLogo(); if ($logo) { $this->view->logo = "data:image/png;base64,$logo"; } else { - $this->view->logo = "$baseUrl/css/images/airtime_logo_jp.png"; + $this->view->logo = $baseUrl."css/images/airtime_logo_jp.png"; } $this->view->blockIndex= $blockIndex; $this->view->blockId = $blockId; @@ -212,7 +212,7 @@ class AudiopreviewController extends Zend_Controller_Action throw new Exception("Unknown file type: $mime"); } - $elementMap['uri'] = $baseUrl."/api/get-media/file/".$track['item_id']; + $elementMap['uri'] = $baseUrl."api/get-media/file/".$track['item_id']; } else { $elementMap['uri'] = $track['path']; } @@ -231,19 +231,18 @@ class AudiopreviewController extends Zend_Controller_Action $showID = $this->_getParam('showID'); $showIndex = $this->_getParam('showIndex'); - $baseUrl = dirname($_SERVER['SCRIPT_NAME']); - if (strcmp($baseUrl, '/') ==0) $baseUrl = ""; + $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']); $this->_helper->layout->setLayout('audioPlayer'); $logo = Application_Model_Preference::GetStationLogo(); if ($logo) { $this->view->logo = "data:image/png;base64,$logo"; } else { - $this->view->logo = "$baseUrl/css/images/airtime_logo_jp.png"; + $this->view->logo = $baseUrl."css/images/airtime_logo_jp.png"; } $this->view->showID = $showID; @@ -298,7 +297,7 @@ class AudiopreviewController extends Zend_Controller_Action throw new Exception("Unknown file type: $mime"); } - $elementMap['uri'] = $baseUrl."/api/get-media/file/".$track['item_id']; + $elementMap['uri'] = $baseUrl."api/get-media/file/".$track['item_id']; } else { $elementMap['uri'] = $track['filepath']; } diff --git a/airtime_mvc/application/controllers/DashboardController.php b/airtime_mvc/application/controllers/DashboardController.php index fe0a0e71c..cf3b9bc59 100644 --- a/airtime_mvc/application/controllers/DashboardController.php +++ b/airtime_mvc/application/controllers/DashboardController.php @@ -100,14 +100,14 @@ class DashboardController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.blue.monday.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'js/jplayer/skin/jplayer.blue.monday.css?'.$CC_CONFIG['airtime_version']); $this->_helper->layout->setLayout('bare'); $logo = Application_Model_Preference::GetStationLogo(); if ($logo) { $this->view->logo = "data:image/png;base64,$logo"; } else { - $this->view->logo = $baseUrl."/css/images/airtime_logo_jp.png"; + $this->view->logo = $baseUrl."css/images/airtime_logo_jp.png"; } } diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index fc3e37aec..896b74672 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -30,29 +30,29 @@ class LibraryController extends Zend_Controller_Action $request = $this->getRequest(); $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/events/library_playlistbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_playlistbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/media_library.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headLink()->appendStylesheet($baseUrl.'css/playlist_builder.css?'.$CC_CONFIG['airtime_version']); try { @@ -186,16 +186,16 @@ class LibraryController extends Zend_Controller_Action } } if ($isAdminOrPM || $file->getFileOwnerId() == $user->getId()) { - $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."/library/delete"); - $menu["edit"] = array("name"=> _("Edit Metadata"), "icon" => "edit", "url" => $baseUrl."/library/edit-file-md/id/{$id}"); + $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."library/delete"); + $menu["edit"] = array("name"=> _("Edit Metadata"), "icon" => "edit", "url" => $baseUrl."library/edit-file-md/id/{$id}"); } - $url = $file->getRelativeFileUrl($baseUrl).'/download/true'; + $url = $file->getRelativeFileUrl($baseUrl).'download/true'; $menu["download"] = array("name" => _("Download"), "icon" => "download", "url" => $url); } elseif ($type === "playlist" || $type === "block") { if ($type === 'playlist') { $obj = new Application_Model_Playlist($id); - $menu["duplicate"] = array("name" => _("Duplicate Playlist"), "icon" => "edit", "url" => $baseUrl."/library/duplicate"); + $menu["duplicate"] = array("name" => _("Duplicate Playlist"), "icon" => "edit", "url" => $baseUrl."library/duplicate"); } elseif ($type === 'block') { $obj = new Application_Model_Block($id); if (!$obj->isStatic()) { @@ -215,7 +215,7 @@ class LibraryController extends Zend_Controller_Action } if ($isAdminOrPM || $obj->getCreatorId() == $user->getId()) { - $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."/library/delete"); + $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."library/delete"); } } elseif ($type == "stream") { $webstream = CcWebstreamQuery::create()->findPK($id); @@ -232,9 +232,9 @@ class LibraryController extends Zend_Controller_Action } if ($isAdminOrPM || $obj->getCreatorId() == $user->getId()) { if ($screen == "playlist") { - $menu["edit"] = array("name"=> _("Edit"), "icon" => "edit", "url" => $baseUrl."/library/edit-file-md/id/{$id}"); + $menu["edit"] = array("name"=> _("Edit"), "icon" => "edit", "url" => $baseUrl."library/edit-file-md/id/{$id}"); } - $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."/library/delete"); + $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."library/delete"); } } @@ -260,7 +260,7 @@ class LibraryController extends Zend_Controller_Action $text = _("Upload to SoundCloud"); } - $menu["soundcloud"]["items"]["upload"] = array("name" => $text, "icon" => "soundcloud", "url" => $baseUrl."/library/upload-file-soundcloud/id/{$id}"); + $menu["soundcloud"]["items"]["upload"] = array("name" => $text, "icon" => "soundcloud", "url" => $baseUrl."library/upload-file-soundcloud/id/{$id}"); } if (empty($menu)) { diff --git a/airtime_mvc/application/controllers/ListenerstatController.php b/airtime_mvc/application/controllers/ListenerstatController.php index 0192eaec8..0027bcdb6 100644 --- a/airtime_mvc/application/controllers/ListenerstatController.php +++ b/airtime_mvc/application/controllers/ListenerstatController.php @@ -15,19 +15,19 @@ class ListenerstatController extends Zend_Controller_Action global $CC_CONFIG; $request = $this->getRequest(); - $baseUrl = $request->getBaseUrl(); + $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/flot/jquery.flot.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/flot/jquery.flot.crosshair.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/listenerstat/listenerstat.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/flot/jquery.flot.crosshair.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/listenerstat/listenerstat.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); - $this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); //default time is the last 24 hours. $now = time(); diff --git a/airtime_mvc/application/controllers/LocaleController.php b/airtime_mvc/application/controllers/LocaleController.php index 1af6efb4a..ac2ded2fe 100644 --- a/airtime_mvc/application/controllers/LocaleController.php +++ b/airtime_mvc/application/controllers/LocaleController.php @@ -22,7 +22,7 @@ class LocaleController extends Zend_Controller_Action file_get_contents(Application_Common_OsPath::join( $_SERVER["DOCUMENT_ROOT"], $baseUrl, - "/js/datatables/i18n/", + "js/datatables/i18n/", $locale.".txt") ); } @@ -391,4 +391,4 @@ class LocaleController extends Zend_Controller_Action echo "var general_dict=".json_encode($translations); } -} \ No newline at end of file +} diff --git a/airtime_mvc/application/controllers/LoginController.php b/airtime_mvc/application/controllers/LoginController.php index 926e49252..c9f69309a 100644 --- a/airtime_mvc/application/controllers/LoginController.php +++ b/airtime_mvc/application/controllers/LoginController.php @@ -27,7 +27,7 @@ class LoginController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/login/login.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/login/login.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $form = new Application_Form_Login(); @@ -106,7 +106,7 @@ class LoginController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/login/password-restore.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/login/password-restore.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); if (!Application_Model_Preference::GetEnableSystemEmail()) { $this->_redirect('login'); diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 39a518922..aeb9e08eb 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -38,23 +38,23 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->date_form = $form; - $this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/TableTools/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/TableTools/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); - $this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/historytable.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/js/datatables/plugin/TableTools/css/TableTools.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/playouthistory.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools/css/TableTools.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']); } public function playoutHistoryFeedAction() diff --git a/airtime_mvc/application/controllers/PluploadController.php b/airtime_mvc/application/controllers/PluploadController.php index eddf9b47c..902da6154 100644 --- a/airtime_mvc/application/controllers/PluploadController.php +++ b/airtime_mvc/application/controllers/PluploadController.php @@ -18,12 +18,12 @@ class PluploadController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); $locale = Application_Model_Preference::GetLocale(); - $this->view->headScript()->appendFile($baseUrl.'/js/plupload/plupload.full.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/plupload/jquery.plupload.queue.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/plupload.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/plupload/i18n/'.$locale.'.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/plupload/plupload.full.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/plupload/jquery.plupload.queue.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/plupload.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/plupload/i18n/'.$locale.'.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/plupload.queue.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/plupload.queue.css?'.$CC_CONFIG['airtime_version']); } public function uploadAction() diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index f799f1615..6e4075bff 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -27,7 +27,7 @@ class PreferenceController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/preferences.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/preferences/preferences.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->statusMsg = ""; $form = new Application_Form_Preferences(); @@ -86,7 +86,7 @@ class PreferenceController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/support-setting.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/preferences/support-setting.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->statusMsg = ""; $form = new Application_Form_SupportSettings(); @@ -142,8 +142,8 @@ class PreferenceController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/serverbrowse/serverbrowser.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/musicdirs.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/serverbrowse/serverbrowser.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/preferences/musicdirs.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $watched_dirs_pref = new Application_Form_WatchedDirPreferences(); @@ -159,7 +159,7 @@ class PreferenceController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/streamsetting.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/preferences/streamsetting.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); // get current settings diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index d368374f5..870822270 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -42,51 +42,50 @@ class ScheduleController extends Zend_Controller_Action { global $CC_CONFIG; - $request = $this->getRequest(); - $baseUrl = $request->getBaseUrl(); + $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); //full-calendar-functions.js requires this variable, so that datePicker widget can be offset to server time instead of client time $this->view->headScript()->appendScript("var timezoneOffset = ".date("Z")."; //in seconds"); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/schedule/full-calendar-functions.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/schedule/full-calendar-functions.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/fullcalendar/fullcalendar.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/fullcalendar/fullcalendar.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/colorpicker/js/colorpicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/schedule/add-show.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/schedule/schedule.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/schedule/add-show.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/schedule/schedule.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/fullcalendar.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/colorpicker/css/colorpicker.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/add-show.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/fullcalendar.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/colorpicker/css/colorpicker.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/add-show.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); //Start Show builder JS/CSS requirements - $this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/showbuilder/builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/TableTools.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/showbuilder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/media_library.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/TableTools.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']); //End Show builder JS/CSS requirements Application_Model_Schedule::createNewFormSections($this->view); @@ -251,7 +250,7 @@ class ScheduleController extends Zend_Controller_Action $fileId = $file->getId(); $menu["view_recorded"] = array("name" => _("View Recorded File Metadata"), "icon" => "overview", - "url" => $baseUrl."/library/edit-file-md/id/".$fileId); + "url" => $baseUrl."library/edit-file-md/id/".$fileId); } if ($epochNow < $showStartLocalDT->getTimestamp()) { @@ -260,16 +259,16 @@ class ScheduleController extends Zend_Controller_Action && !$instance->isRebroadcast()) { $menu["schedule"] = array("name"=> _("Add / Remove Content"), "icon" => "add-remove-content", - "url" => $baseUrl."/showbuilder/builder-dialog/"); + "url" => $baseUrl."showbuilder/builder-dialog/"); $menu["clear"] = array("name"=> _("Remove All Content"), "icon" => "remove-all-content", - "url" => $baseUrl."/schedule/clear-show"); + "url" => $baseUrl."schedule/clear-show"); } } if (!$instance->isRecorded()) { - $menu["content"] = array("name"=> _("Show Content"), "icon" => "overview", "url" => $baseUrl."/schedule/show-content-dialog"); + $menu["content"] = array("name"=> _("Show Content"), "icon" => "overview", "url" => $baseUrl."schedule/show-content-dialog"); } if ($showEndLocalDT->getTimestamp() <= $epochNow @@ -297,7 +296,7 @@ class ScheduleController extends Zend_Controller_Action } else { if (!$instance->isRebroadcast()) { - $menu["edit"] = array("name"=> _("Edit Show"), "icon" => "edit", "_type"=>"all", "url" => $baseUrl."/Schedule/populate-show-form"); + $menu["edit"] = array("name"=> _("Edit Show"), "icon" => "edit", "_type"=>"all", "url" => $baseUrl."Schedule/populate-show-form"); } $menu["cancel"] = array("name"=> _("Cancel Current Show"), "icon" => "delete"); @@ -307,7 +306,7 @@ class ScheduleController extends Zend_Controller_Action if ($epochNow < $showStartLocalDT->getTimestamp()) { if (!$instance->isRebroadcast() && $isAdminOrPM) { - $menu["edit"] = array("name"=> _("Edit Show"), "icon" => "edit", "_type"=>"all", "url" => $baseUrl."/Schedule/populate-show-form"); + $menu["edit"] = array("name"=> _("Edit Show"), "icon" => "edit", "_type"=>"all", "url" => $baseUrl."Schedule/populate-show-form"); } if ($instance->getShow()->isRepeating() && $isAdminOrPM) { @@ -315,12 +314,12 @@ class ScheduleController extends Zend_Controller_Action //create delete sub menu. $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "items" => array()); - $menu["del"]["items"]["single"] = array("name"=> _("Delete This Instance"), "icon" => "delete", "url" => $baseUrl."/schedule/delete-show"); + $menu["del"]["items"]["single"] = array("name"=> _("Delete This Instance"), "icon" => "delete", "url" => $baseUrl."schedule/delete-show"); - $menu["del"]["items"]["following"] = array("name"=> _("Delete This Instance and All Following"), "icon" => "delete", "url" => $baseUrl."/schedule/cancel-show"); + $menu["del"]["items"]["following"] = array("name"=> _("Delete This Instance and All Following"), "icon" => "delete", "url" => $baseUrl."schedule/cancel-show"); } elseif ($isAdminOrPM) { - $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."/schedule/delete-show"); + $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."schedule/delete-show"); } } @@ -895,7 +894,7 @@ class ScheduleController extends Zend_Controller_Action $file = Application_Model_StoredFile::Recall($file_id); $baseUrl = $this->getRequest()->getBaseUrl(); - $url = $file->getRelativeFileUrl($baseUrl).'/download/true'; + $url = $file->getRelativeFileUrl($baseUrl).'download/true'; $menu[] = array('action' => array('type' => 'gourl', 'url' => $url), 'title' => _('Download')); diff --git a/airtime_mvc/application/controllers/ShowbuilderController.php b/airtime_mvc/application/controllers/ShowbuilderController.php index 7760f8f07..c38c4b852 100644 --- a/airtime_mvc/application/controllers/ShowbuilderController.php +++ b/airtime_mvc/application/controllers/ShowbuilderController.php @@ -45,26 +45,26 @@ class ShowbuilderController extends Zend_Controller_Action $this->view->headScript()->appendScript("localStorage.setItem( 'datatables-timeline', '' );"); } - $this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColReorder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/media_library.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $refer_sses = new Zend_Session_Namespace('referrer'); if ($request->isPost()) { @@ -106,7 +106,7 @@ class ShowbuilderController extends Zend_Controller_Action $this->view->logoImg = $logo; } $this->view->dialog = $form; - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); } } @@ -121,7 +121,7 @@ class ShowbuilderController extends Zend_Controller_Action $this->view->logoImg = $logo; } $this->view->dialog = $form; - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); } //determine whether to remove/hide/display the library. @@ -164,12 +164,12 @@ class ShowbuilderController extends Zend_Controller_Action $offset = date("Z") * -1; $this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds"); - $this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/showbuilder/builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/showbuilder/main_builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/main_builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'/css/showbuilder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']); } public function contextMenuAction() @@ -195,7 +195,7 @@ class ShowbuilderController extends Zend_Controller_Action if ($now < floatval($item->getDbEnds("U.u")) && $user->canSchedule($instance->getDbShowId())) { //remove/truncate the item from the schedule - $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."/showbuilder/schedule-remove"); + $menu["del"] = array("name"=> _("Delete"), "icon" => "delete", "url" => $baseUrl."showbuilder/schedule-remove"); } $this->view->items = $menu; diff --git a/airtime_mvc/application/controllers/SystemstatusController.php b/airtime_mvc/application/controllers/SystemstatusController.php index 6032128f9..6915a4538 100644 --- a/airtime_mvc/application/controllers/SystemstatusController.php +++ b/airtime_mvc/application/controllers/SystemstatusController.php @@ -8,7 +8,7 @@ class SystemstatusController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); - $this->view->headScript()->appendFile($baseUrl.'/js/airtime/status/status.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); + $this->view->headScript()->appendFile($baseUrl.'js/airtime/status/status.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); } public function indexAction() diff --git a/airtime_mvc/application/controllers/UserController.php b/airtime_mvc/application/controllers/UserController.php index f0fd5b4ee..14a0f59ed 100644 --- a/airtime_mvc/application/controllers/UserController.php +++ b/airtime_mvc/application/controllers/UserController.php @@ -22,9 +22,9 @@ class UserController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); $js_files = array( - '/js/datatables/js/jquery.dataTables.js?', - '/js/datatables/plugin/dataTables.pluginAPI.js?', - '/js/airtime/user/user.js?' + 'js/datatables/js/jquery.dataTables.js?', + 'js/datatables/plugin/dataTables.pluginAPI.js?', + 'js/airtime/user/user.js?' ); foreach ($js_files as $js) { @@ -32,7 +32,7 @@ class UserController extends Zend_Controller_Action $baseUrl.$js.$CC_CONFIG['airtime_version'],'text/javascript'); } - $this->view->headLink()->appendStylesheet($baseUrl.'/css/users.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/users.css?'.$CC_CONFIG['airtime_version']); $form = new Application_Form_AddUser(); diff --git a/airtime_mvc/application/layouts/scripts/layout.phtml b/airtime_mvc/application/layouts/scripts/layout.phtml index 60732638d..29d04c0d6 100644 --- a/airtime_mvc/application/layouts/scripts/layout.phtml +++ b/airtime_mvc/application/layouts/scripts/layout.phtml @@ -24,7 +24,7 @@
diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 994dae2a3..8677e7fa3 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -532,7 +532,7 @@ SQL; */ public function getRelativeFileUrl($baseUrl) { - return $baseUrl."/api/get-media/file/".$this->getId().".".$this->getFileExtension(); + return $baseUrl."api/get-media/file/".$this->getId().".".$this->getFileExtension(); } public static function Insert($md) @@ -807,14 +807,14 @@ SQL; // ugly if ($type == "au") { $row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION); - $row['image'] = ''; + $row['image'] = ''; } elseif ($type == "pl") { - $row['image'] = ''; + $row['image'] = ''; } elseif ($type == "st") { $row['audioFile'] = $row['id']; - $row['image'] = ''; + $row['image'] = ''; } elseif ($type == "bl") { - $row['image'] = ''; + $row['image'] = ''; } } diff --git a/airtime_mvc/application/views/scripts/library/library.phtml b/airtime_mvc/application/views/scripts/library/library.phtml index def981117..6a57e0c6f 100644 --- a/airtime_mvc/application/views/scripts/library/library.phtml +++ b/airtime_mvc/application/views/scripts/library/library.phtml @@ -1,5 +1,5 @@ - +
diff --git a/airtime_mvc/application/views/scripts/preference/support-setting.phtml b/airtime_mvc/application/views/scripts/preference/support-setting.phtml index 5c22188c3..cf5e725f7 100644 --- a/airtime_mvc/application/views/scripts/preference/support-setting.phtml +++ b/airtime_mvc/application/views/scripts/preference/support-setting.phtml @@ -1,7 +1,7 @@

section_title?>

-
enctype="multipart/form-data" id="support-feedback-form"> + enctype="multipart/form-data" id="support-feedback-form">
statusMsg ?> form ?> diff --git a/airtime_mvc/public/js/airtime/audiopreview/preview_jplayer.js b/airtime_mvc/public/js/airtime/audiopreview/preview_jplayer.js index b5669d17a..b5f192219 100644 --- a/airtime_mvc/public/js/airtime/audiopreview/preview_jplayer.js +++ b/airtime_mvc/public/js/airtime/audiopreview/preview_jplayer.js @@ -76,7 +76,7 @@ function playAllPlaylist(p_playlistID, p_playlistIndex) { if ( _idToPostionLookUp !== undefined && viewsPlaylistID == p_playlistID ) { play(p_playlistIndex); }else { - buildplaylist(baseUrl+"/audiopreview/get-playlist/playlistID/"+p_playlistID, p_playlistIndex); + buildplaylist(baseUrl+"audiopreview/get-playlist/playlistID/"+p_playlistID, p_playlistIndex); } } @@ -87,7 +87,7 @@ function playBlock(p_blockId, p_blockIndex) if ( _idToPostionLookUp !== undefined && viewsBlockId == p_blockId ) { play(p_blockIndex); } else { - buildplaylist(baseUrl+"/audiopreview/get-block/blockId/"+p_blockId, p_blockIndex); + buildplaylist(baseUrl+"audiopreview/get-block/blockId/"+p_blockId, p_blockIndex); } } @@ -105,7 +105,7 @@ function playAllShow(p_showID, p_index) { if ( _idToPostionLookUp !== undefined && viewsShowID == p_showID ) { play(p_index); }else { - buildplaylist(baseUrl+"/audiopreview/get-show/showID/"+p_showID, p_index); + buildplaylist(baseUrl+"audiopreview/get-show/showID/"+p_showID, p_index); } } diff --git a/airtime_mvc/public/js/airtime/common/common.js b/airtime_mvc/public/js/airtime/common/common.js index b6870728b..0a79ebab1 100644 --- a/airtime_mvc/public/js/airtime/common/common.js +++ b/airtime_mvc/public/js/airtime/common/common.js @@ -103,7 +103,7 @@ function open_playlist_preview(p_playlistID, p_playlistIndex) { if (_preview_window != null && !_preview_window.closed) _preview_window.playAllPlaylist(p_playlistID, p_playlistIndex); else - openPreviewWindow(baseUrl+'/audiopreview/playlist-preview/playlistIndex/'+p_playlistIndex+'/playlistID/'+p_playlistID); + openPreviewWindow(baseUrl+'audiopreview/playlist-preview/playlistIndex/'+p_playlistIndex+'/playlistID/'+p_playlistID); _preview_window.focus(); } @@ -114,7 +114,7 @@ function open_block_preview(p_blockId, p_blockIndex) { if (_preview_window != null && !_preview_window.closed) _preview_window.playBlock(p_blockId, p_blockIndex); else - openPreviewWindow(baseUrl+'/audiopreview/block-preview/blockIndex/'+p_blockIndex+'/blockId/'+p_blockId); + openPreviewWindow(baseUrl+'audiopreview/block-preview/blockIndex/'+p_blockIndex+'/blockId/'+p_blockId); _preview_window.focus(); } @@ -128,7 +128,7 @@ function open_show_preview(p_showID, p_showIndex) { if (_preview_window != null && !_preview_window.closed) _preview_window.playAllShow(p_showID, p_showIndex); else - openPreviewWindow(baseUrl+'/audiopreview/show-preview/showID/'+p_showID+'/showIndex/'+p_showIndex); + openPreviewWindow(baseUrl+'audiopreview/show-preview/showID/'+p_showID+'/showIndex/'+p_showIndex); _preview_window.focus(); } diff --git a/airtime_mvc/public/js/airtime/dashboard/dashboard.js b/airtime_mvc/public/js/airtime/dashboard/dashboard.js index 15bcbe87b..18599fcfb 100644 --- a/airtime_mvc/public/js/airtime/dashboard/dashboard.js +++ b/airtime_mvc/public/js/airtime/dashboard/dashboard.js @@ -360,7 +360,7 @@ function controlSwitchLight(){ } function getScheduleFromServer(){ - $.ajax({ url: baseUrl+"/Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){ + $.ajax({ url: baseUrl+"Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){ parseItems(data.entries); parseSourceStatus(data.source_status); parseSwitchStatus(data.switch_status); diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index f154c579a..9afae25bd 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -310,7 +310,7 @@ var AIRTIME = (function(AIRTIME) { mod.fnDeleteItems = function(aMedia) { - $.post(baseUrl+"/library/delete", + $.post(baseUrl+"library/delete", {"format": "json", "media": aMedia}, function(json){ if (json.message !== undefined) { @@ -481,7 +481,7 @@ var AIRTIME = (function(AIRTIME) { "fnStateSave": function (oSettings, oData) { localStorage.setItem('datatables-library', JSON.stringify(oData)); $.ajax({ - url: baseUrl+"/usersettings/set-library-datatable", + url: baseUrl+"usersettings/set-library-datatable", type: "POST", data: {settings : oData, format: "json"}, dataType: "json" @@ -522,7 +522,7 @@ var AIRTIME = (function(AIRTIME) { oData.iCreate = parseInt(oData.iCreate, 10); }, - "sAjaxSource": baseUrl+"/Library/contents-feed", + "sAjaxSource": baseUrl+"Library/contents-feed", "sAjaxDataProp": "files", "fnServerData": function ( sSource, aoData, fnCallback ) { @@ -615,7 +615,7 @@ var AIRTIME = (function(AIRTIME) { text: aData.track_title }, ajax: { - url: baseUrl+"/Library/get-file-metadata", + url: baseUrl+"Library/get-file-metadata", type: "get", data: ({format: "html", id : aData.id, type: aData.ftype}), success: function(data, status) { @@ -800,13 +800,13 @@ var AIRTIME = (function(AIRTIME) { }; } else if (data.ftype === "playlist" || data.ftype === "block") { callback = function() { - var url = baseUrl+'/Playlist/edit'; + var url = baseUrl+'Playlist/edit'; AIRTIME.playlist.fnEdit(data.id, data.ftype, url); AIRTIME.playlist.validatePlaylistElements(); }; } else if (data.ftype === "stream") { callback = function() { - var url = baseUrl+'/Webstream/edit'; + var url = baseUrl+'Webstream/edit'; AIRTIME.playlist.fnEdit(data.id, data.ftype, url); } } else { @@ -932,7 +932,7 @@ var AIRTIME = (function(AIRTIME) { } request = $.ajax({ - url: baseUrl+"/library/context-menu", + url: baseUrl+"library/context-menu", type: "GET", data: {id : data.id, type: data.ftype, format: "json", "screen": screen}, dataType: "json", @@ -974,7 +974,7 @@ function closeDialog(event, ui) { } function checkImportStatus() { - $.getJSON(baseUrl+'/Preference/is-import-in-progress', function(data){ + $.getJSON(baseUrl+'Preference/is-import-in-progress', function(data){ var div = $('#import_status'); var table = $('#library_display').dataTable(); if (data == true){ @@ -1006,7 +1006,7 @@ function addProgressIcon(id) { } function checkLibrarySCUploadStatus(){ - var url = baseUrl+'/Library/get-upload-to-soundcloud-status', + var url = baseUrl+'Library/get-upload-to-soundcloud-status', span, id; @@ -1066,7 +1066,7 @@ function addQtipToSCIcons(){ content: { text: $.i18n._("Retrieving data from the server..."), ajax: { - url: baseUrl+"/Library/get-upload-to-soundcloud-status", + url: baseUrl+"Library/get-upload-to-soundcloud-status", type: "post", data: ({format: "json", id : id, type: "file"}), success: function(json, status){ @@ -1096,7 +1096,7 @@ function addQtipToSCIcons(){ content: { text: $.i18n._("Retreiving data from the server..."), ajax: { - url: baseUrl+"/Library/get-upload-to-soundcloud-status", + url: baseUrl+"Library/get-upload-to-soundcloud-status", type: "post", data: ({format: "json", id : id, type: "file"}), success: function(json, status){ @@ -1281,7 +1281,7 @@ $(document).ready(function() { $('#editmdsave').live("click", function() { var file_id = $('#file_id').val(), data = $("#edit-md-dialog form").serializeArray(); - $.post(baseUrl+'/library/edit-file-md', {format: "json", id: file_id, data: data}, function() { + $.post(baseUrl+'library/edit-file-md', {format: "json", id: file_id, data: data}, function() { $("#edit-md-dialog").dialog().remove(); }); }); diff --git a/airtime_mvc/public/js/airtime/library/plupload.js b/airtime_mvc/public/js/airtime/library/plupload.js index 8cf911c06..b429c5602 100644 --- a/airtime_mvc/public/js/airtime/library/plupload.js +++ b/airtime_mvc/public/js/airtime/library/plupload.js @@ -5,7 +5,7 @@ $(document).ready(function() { $("#plupload_files").pluploadQueue({ // General settings runtimes : 'gears, html5, html4', - url : baseUrl+'/Plupload/upload/format/json', + url : baseUrl+'Plupload/upload/format/json', chunk_size : '5mb', unique_names : 'true', multiple_queues : 'true', @@ -28,7 +28,7 @@ $(document).ready(function() { $("#plupload_error table").css("display", "inline-table"); }else{ var tempFileName = j.tempfilepath; - $.get(baseUrl+'/Plupload/copyfile/format/json/name/'+ + $.get(baseUrl+'Plupload/copyfile/format/json/name/'+ encodeURIComponent(file.name)+'/tempname/' + encodeURIComponent(tempFileName), function(json){ var jr = jQuery.parseJSON(json); diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index f343ff945..15fa67f72 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -66,7 +66,7 @@ var AIRTIME = (function(AIRTIME){ event.stopPropagation(); var span = $(this), id = span.parent().attr("id").split("_").pop(), - url = baseUrl+"/Playlist/set-cue", + url = baseUrl+"Playlist/set-cue", cueIn = $.trim(span.text()), li = span.parents("li"), unqid = li.attr("unqid"), @@ -103,7 +103,7 @@ var AIRTIME = (function(AIRTIME){ event.stopPropagation(); var span = $(this), id = span.parent().attr("id").split("_").pop(), - url = baseUrl+"/Playlist/set-cue", + url = baseUrl+"Playlist/set-cue", cueOut = $.trim(span.text()), li = span.parents("li"), unqid = li.attr("unqid"), @@ -142,7 +142,7 @@ var AIRTIME = (function(AIRTIME){ var span = $(this), id = span.parent().attr("id").split("_").pop(), - url = baseUrl+"/Playlist/set-fade", + url = baseUrl+"Playlist/set-fade", fadeIn = $.trim(span.text()), li = span.parents("li"), unqid = li.attr("unqid"), @@ -180,7 +180,7 @@ var AIRTIME = (function(AIRTIME){ var span = $(this), id = span.parent().attr("id").split("_").pop(), - url = baseUrl+"/Playlist/set-fade", + url = baseUrl+"Playlist/set-fade", fadeOut = $.trim(span.text()), li = span.parents("li"), unqid = li.attr("unqid"), @@ -265,7 +265,7 @@ var AIRTIME = (function(AIRTIME){ /* --until we decide whether Playlist name should autosave or not - url = baseUrl+'/Playlist/set-playlist-name'; + url = baseUrl+'Playlist/set-playlist-name'; $.post(url, {format: "json", name: nameElement.text(), modified: lastMod, type: type}, @@ -448,7 +448,7 @@ var AIRTIME = (function(AIRTIME){ var id = parseInt($(this).attr("id").split("_").pop(), 10); var blockId = parseInt($(this).attr("blockId"), 10); if ($(this).hasClass('close')) { - var sUrl = baseUrl+"/playlist/get-block-info"; + var sUrl = baseUrl+"playlist/get-block-info"; mod.disableUI(); $.post(sUrl, {format:"json", id:blockId}, function(json){ $html = ""; @@ -531,7 +531,7 @@ var AIRTIME = (function(AIRTIME){ else { $(this).addClass("ui-state-active"); - var url = baseUrl+'/Playlist/get-playlist-fades'; + var url = baseUrl+'Playlist/get-playlist-fades'; $.post(url, {format: "json", modified: lastMod, type: type}, function(json){ @@ -568,7 +568,7 @@ var AIRTIME = (function(AIRTIME){ $pl.on("blur", "span.spl_main_fade_in", function(event){ event.stopPropagation(); - var url = baseUrl+"/Playlist/set-playlist-fades", + var url = baseUrl+"Playlist/set-playlist-fades", span = $(this), fadeIn = $.trim(span.text()), lastMod = getModified(), @@ -592,7 +592,7 @@ var AIRTIME = (function(AIRTIME){ $pl.on("blur", "span.spl_main_fade_out", function(event){ event.stopPropagation(); - var url = baseUrl+"/Playlist/set-playlist-fades", + var url = baseUrl+"Playlist/set-playlist-fades", span = $(this), fadeOut = $.trim(span.text()), lastMod = getModified(), @@ -641,7 +641,7 @@ var AIRTIME = (function(AIRTIME){ $pl.on("click", 'button[id="playlist_shuffle_button"]', function(){ obj_id = $('input[id="obj_id"]').val(); - url = baseUrl+"/Playlist/shuffle"; + url = baseUrl+"Playlist/shuffle"; enableLoadingIcon(); $.post(url, {format: "json", obj_id: obj_id}, function(data){ var json = $.parseJSON(data) @@ -674,7 +674,7 @@ var AIRTIME = (function(AIRTIME){ //hide any previous errors (if any) $("#side_playlist .errors").empty().hide(); - var url = baseUrl+'/Webstream/save'; + var url = baseUrl+'Webstream/save'; $.post(url, {format: "json", id:id, description: description, url:streamurl, length: length, name: name}, function(json){ @@ -719,7 +719,7 @@ var AIRTIME = (function(AIRTIME){ var criteria = $('form').serializeArray(), block_name = $('#playlist_name_display').text(), block_desc = $('textarea[name="description"]').val(), - save_action = baseUrl+'/Playlist/save', + save_action = baseUrl+'Playlist/save', obj_id = $('input[id="obj_id"]').val(), obj_type = $('#obj_type').val(), lastMod = getModified(), @@ -844,7 +844,7 @@ var AIRTIME = (function(AIRTIME){ } mod.fnNew = function() { - var url = baseUrl+'/Playlist/new'; + var url = baseUrl+'Playlist/new'; stopAudioPreview(); @@ -857,7 +857,7 @@ var AIRTIME = (function(AIRTIME){ }; mod.fnWsNew = function() { - var url = baseUrl+'/Webstream/new'; + var url = baseUrl+'Webstream/new'; stopAudioPreview(); @@ -871,7 +871,7 @@ var AIRTIME = (function(AIRTIME){ mod.fnNewBlock = function() { - var url = baseUrl+'/Playlist/new'; + var url = baseUrl+'Playlist/new'; stopAudioPreview(); @@ -902,7 +902,7 @@ var AIRTIME = (function(AIRTIME){ id = (plid === undefined) ? getId() : plid; lastMod = getModified(); type = $('#obj_type').val(); - url = baseUrl+'/Playlist/delete'; + url = baseUrl+'Playlist/delete'; $.post(url, {format: "json", ids: id, modified: lastMod, type: type}, @@ -919,7 +919,7 @@ var AIRTIME = (function(AIRTIME){ id = (wsid === undefined) ? getId() : wsid; lastMod = getModified(); type = $('#obj_type').val(); - url = baseUrl+'/Webstream/delete'; + url = baseUrl+'Webstream/delete'; $.post(url, {format: "json", ids: id, modified: lastMod, type: type}, @@ -992,20 +992,20 @@ var AIRTIME = (function(AIRTIME){ } mod.fnAddItems = function(aItems, iAfter, sAddType) { - var sUrl = baseUrl+"/playlist/add-items"; + var sUrl = baseUrl+"playlist/add-items"; oData = {"aItems": aItems, "afterItem": iAfter, "type": sAddType}; playlistRequest(sUrl, oData); }; mod.fnMoveItems = function(aIds, iAfter) { - var sUrl = baseUrl+"/playlist/move-items", + var sUrl = baseUrl+"playlist/move-items", oData = {"ids": aIds, "afterItem": iAfter}; playlistRequest(sUrl, oData); }; mod.fnDeleteItems = function(aItems) { - var sUrl = baseUrl+"/playlist/delete-items", + var sUrl = baseUrl+"playlist/delete-items", oData = {"ids": aItems}; playlistRequest(sUrl, oData); diff --git a/airtime_mvc/public/js/airtime/listenerstat/listenerstat.js b/airtime_mvc/public/js/airtime/listenerstat/listenerstat.js index 98ecbe843..926368966 100644 --- a/airtime_mvc/public/js/airtime/listenerstat/listenerstat.js +++ b/airtime_mvc/public/js/airtime/listenerstat/listenerstat.js @@ -22,7 +22,7 @@ $(document).ready(function() { function getDataAndPlot(startTimestamp, endTimestamp){ // get data - $.get(baseUrl+'/Listenerstat/get-data', {startTimestamp: startTimestamp, endTimestamp: endTimestamp}, function(data){ + $.get(baseUrl+'Listenerstat/get-data', {startTimestamp: startTimestamp, endTimestamp: endTimestamp}, function(data){ data = JSON.parse(data); out = new Object(); $.each(data, function(mpName, v){ @@ -177,4 +177,4 @@ function plot(datasets){ listenerstat_content.find(timeStartId).timepicker(oBaseTimePickerSettings); listenerstat_content.find(dateEndId).datepicker(oBaseDatePickerSettings); listenerstat_content.find(timeEndId).timepicker(oBaseTimePickerSettings); -} \ No newline at end of file +} diff --git a/airtime_mvc/public/js/airtime/nowplaying/register.js b/airtime_mvc/public/js/airtime/nowplaying/register.js index 018252bbf..58a5b1f21 100644 --- a/airtime_mvc/public/js/airtime/nowplaying/register.js +++ b/airtime_mvc/public/js/airtime/nowplaying/register.js @@ -1,7 +1,7 @@ $(document).ready(function(){ function doNotShowPopup(){ - $.get(baseUrl+"/Usersettings/donotshowregistrationpopup", {format:"json"}); + $.get(baseUrl+"Usersettings/donotshowregistrationpopup", {format:"json"}); } var dialog = $("#register_popup"); @@ -19,7 +19,7 @@ $(document).ready(function(){ text: $.i18n._("Remind me in 1 week"), "class": "btn", click: function() { - var url = baseUrl+'/Usersettings/remindme'; + var url = baseUrl+'Usersettings/remindme'; $.ajax({ url: url, data: {format:"json"} @@ -32,7 +32,7 @@ $(document).ready(function(){ text: $.i18n._("Remind me never"), "class": "btn", click: function() { - var url =baseUrl+'/Usersettings/remindme-never'; + var url =baseUrl+'Usersettings/remindme-never'; $.ajax({ url: url, data: {format:"json"} diff --git a/airtime_mvc/public/js/airtime/playouthistory/historytable.js b/airtime_mvc/public/js/airtime/playouthistory/historytable.js index 401a4f040..86a6d7915 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/historytable.js +++ b/airtime_mvc/public/js/airtime/playouthistory/historytable.js @@ -75,7 +75,7 @@ var AIRTIME = (function(AIRTIME) { "bProcessing": true, "bServerSide": true, - "sAjaxSource": baseUrl+"/Playouthistory/playout-history-feed", + "sAjaxSource": baseUrl+"Playouthistory/playout-history-feed", "sAjaxDataProp": "history", "fnServerData": fnServerData, @@ -92,7 +92,7 @@ var AIRTIME = (function(AIRTIME) { "sDom": 'lf<"dt-process-rel"r><"H"T><"dataTables_scrolling"t><"F"ip>', "oTableTools": { - "sSwfPath": baseUrl+"/js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf", + "sSwfPath": baseUrl+"js/datatables/plugin/TableTools/swf/copy_cvs_xls_pdf.swf", "aButtons": [ { "sExtends": "copy", diff --git a/airtime_mvc/public/js/airtime/preferences/musicdirs.js b/airtime_mvc/public/js/airtime/preferences/musicdirs.js index 072359492..da404363a 100644 --- a/airtime_mvc/public/js/airtime/preferences/musicdirs.js +++ b/airtime_mvc/public/js/airtime/preferences/musicdirs.js @@ -13,8 +13,8 @@ function setWatchedDirEvents() { //knownPaths: [{text:'Desktop', image:'desktop.png', path:'/home'}], knownPaths: [], imageUrl: 'img/icons/', - systemImageUrl: baseUrl+'/css/img/', - handlerUrl: baseUrl+'/Preference/server-browse/format/json', + systemImageUrl: baseUrl+'css/img/', + handlerUrl: baseUrl+'Preference/server-browse/format/json', title: $.i18n._('Choose Storage Folder'), basePath: '', requestMethod: 'POST', @@ -33,8 +33,8 @@ function setWatchedDirEvents() { //knownPaths: [{text:'Desktop', image:'desktop.png', path:'/home'}], knownPaths: [], imageUrl: 'img/icons/', - systemImageUrl: baseUrl+'/css/img/', - handlerUrl: baseUrl+'/Preference/server-browse/format/json', + systemImageUrl: baseUrl+'css/img/', + handlerUrl: baseUrl+'Preference/server-browse/format/json', title: $.i18n._('Choose Folder to Watch'), basePath: '', requestMethod: 'POST', @@ -44,7 +44,7 @@ function setWatchedDirEvents() { var url, chosen; if(confirm($.i18n._("Are you sure you want to change the storage folder?\nThis will remove the files from your Airtime library!"))){ - url = baseUrl+"/Preference/change-stor-directory"; + url = baseUrl+"Preference/change-stor-directory"; chosen = $('#storageFolder').val(); $.post(url, @@ -64,7 +64,7 @@ function setWatchedDirEvents() { $('#watchedFolder-ok').click(function(){ var url, chosen; - url = baseUrl+"/Preference/reload-watch-directory"; + url = baseUrl+"Preference/reload-watch-directory"; chosen = $('#watchedFolder').val(); $.post(url, @@ -80,7 +80,7 @@ function setWatchedDirEvents() { $('.selected-item').find('.ui-icon-refresh').click(function(){ var folder = $(this).prev().text(); - $.get(baseUrl+"/Preference/rescan-watch-directory", {format: "json", dir: folder}); + $.get(baseUrl+"Preference/rescan-watch-directory", {format: "json", dir: folder}); }); $('.selected-item').find('.ui-icon-close').click(function(){ @@ -88,7 +88,7 @@ function setWatchedDirEvents() { var row = $(this).parent(); var folder = row.find('#folderPath').text(); - url = baseUrl+"/Preference/remove-watch-directory"; + url = baseUrl+"Preference/remove-watch-directory"; $.post(url, {format: "json", dir: folder}, diff --git a/airtime_mvc/public/js/airtime/preferences/preferences.js b/airtime_mvc/public/js/airtime/preferences/preferences.js index 31c1e5768..1d529617d 100644 --- a/airtime_mvc/public/js/airtime/preferences/preferences.js +++ b/airtime_mvc/public/js/airtime/preferences/preferences.js @@ -106,7 +106,7 @@ $(document).ready(function() { $('#pref_save').live('click', function() { var data = $('#pref_form').serialize(); - var url = baseUrl+'/Preference/index'; + var url = baseUrl+'Preference/index'; $.post(url, {format: "json", data: data}, function(data){ var json = $.parseJSON(data); diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index 69c76cc99..a1da4b30e 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -75,7 +75,7 @@ function showForIcecast(ele){ } function checkLiquidsoapStatus(){ - var url = baseUrl+'/Preference/get-liquidsoap-status/format/json'; + var url = baseUrl+'Preference/get-liquidsoap-status/format/json'; var id = $(this).attr("id"); $.post(url, function(json){ var json_obj = jQuery.parseJSON(json); @@ -127,7 +127,7 @@ function setLiveSourceConnectionOverrideListener(){ live_dj_input.val(url) live_dj_input.attr("readonly", "readonly") live_dj_actions.hide() - $.get(baseUrl+"/Preference/set-source-connection-url/", {format: "json", type: "livedj", url:encodeURIComponent(url), override: 1}); + $.get(baseUrl+"Preference/set-source-connection-url/", {format: "json", type: "livedj", url:encodeURIComponent(url), override: 1}); event.preventDefault() }) @@ -142,7 +142,7 @@ function setLiveSourceConnectionOverrideListener(){ live_dj_input.val(url) live_dj_input.attr("readonly", "readonly") live_dj_actions.hide() - $.get(baseUrl+"/Preference/set-source-connection-url", {format: "json", type: "livedj", url:encodeURIComponent(url), override: 0}); + $.get(baseUrl+"Preference/set-source-connection-url", {format: "json", type: "livedj", url:encodeURIComponent(url), override: 0}); event.preventDefault() }) @@ -151,7 +151,7 @@ function setLiveSourceConnectionOverrideListener(){ master_dj_input.val(url) master_dj_input.attr("readonly", "readonly") master_dj_actions.hide() - $.get(baseUrl+"/Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url), override: 1}) + $.get(baseUrl+"Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url), override: 1}) event.preventDefault() }) @@ -165,7 +165,7 @@ function setLiveSourceConnectionOverrideListener(){ master_dj_input.val(url) master_dj_input.attr("readonly", "readonly") master_dj_actions.hide() - $.get(baseUrl+"/Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url), override: 0}) + $.get(baseUrl+"Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url), override: 0}) event.preventDefault() }) } @@ -420,7 +420,7 @@ $(document).ready(function() { var confirm_pypo_restart_text = $.i18n._("If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings). If Airtime is recording, and if the change causes a playout engine restart, the recording will be interrupted."); if (confirm(confirm_pypo_restart_text)) { var data = $('#stream_form').serialize(); - var url = baseUrl+'/Preference/stream-setting'; + var url = baseUrl+'Preference/stream-setting'; $.post(url, {format:"json", data: data}, function(data){ var json = $.parseJSON(data); diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index c50ebafc9..2242f3c66 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -50,7 +50,7 @@ function autoSelect(event, ui) { function findHosts(request, callback) { var search, url; - url = baseUrl+"/User/get-hosts"; + url = baseUrl+"User/get-hosts"; search = request.term; var noResult = new Array(); @@ -410,7 +410,7 @@ function setAddShowEvents() { .fullCalendar('render'); $("#add-show-form").hide(); - $.get(baseUrl+"/Schedule/get-form", {format:"json"}, function(json){ + $.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){ $("#add-show-form") .empty() .append(json.form); @@ -456,7 +456,7 @@ function setAddShowEvents() { applyPlatformOpacityRules: false }); - var action = baseUrl+"/Schedule/"+String(addShowButton.attr("data-action")); + var action = baseUrl+"Schedule/"+String(addShowButton.attr("data-action")); $.post(action, {format: "json", data: data, hosts: hosts, days: days}, function(json){ //addShowButton.removeClass("disabled"); @@ -476,7 +476,7 @@ function setAddShowEvents() { .fullCalendar('render'); $("#add-show-form").hide(); - $.get(baseUrl+"/Schedule/get-form", {format:"json"}, function(json){ + $.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){ $("#add-show-form") .empty() .append(json.form); @@ -592,7 +592,7 @@ function setAddShowEvents() { var loadingIcon = $('#icon-loader-small'); loadingIcon.show(); - $.post(baseUrl+"/Schedule/calculate-duration", {startTime: startDateTime, endTime: endDateTime}, function(data){ + $.post(baseUrl+"Schedule/calculate-duration", {startTime: startDateTime, endTime: endDateTime}, function(data){ $('#add_show_duration').val(JSON.parse(data)); loadingIcon.hide(); }); diff --git a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js index c90f93439..08dd31116 100644 --- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js +++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js @@ -176,7 +176,7 @@ function viewDisplay( view ) { .fullCalendar( 'gotoDate', date ); //save slotMin value to db - var url = baseUrl+'/Schedule/set-time-interval/format/json'; + var url = baseUrl+'Schedule/set-time-interval/format/json'; $.post(url, {timeInterval: slotMin}); }); @@ -201,7 +201,7 @@ function viewDisplay( view ) { } //save view name to db - var url = baseUrl+'/Schedule/set-time-scale/format/json'; + var url = baseUrl+'Schedule/set-time-scale/format/json'; $.post(url, {timeScale: view.name}); } @@ -293,7 +293,7 @@ function eventAfterRender( event, element, view ) { } function eventDrop(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) { - var url = baseUrl+'/Schedule/move-show/format/json'; + var url = baseUrl+'Schedule/move-show/format/json'; $.post(url, {day: dayDelta, min: minuteDelta, showInstanceId: event.id}, @@ -309,7 +309,7 @@ function eventDrop(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui } function eventResize( event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, view ) { - var url = baseUrl+'/Schedule/resize-show/format/json'; + var url = baseUrl+'Schedule/resize-show/format/json'; $.post(url, {day: dayDelta, min: minuteDelta, showId: event.showId}, @@ -332,7 +332,7 @@ function getFullCalendarEvents(start, end, callback) { start_date = makeTimeStamp(start); end_date = makeTimeStamp(end); - url = baseUrl+'/Schedule/event-feed'; + url = baseUrl+'Schedule/event-feed'; var d = new Date(); @@ -342,7 +342,7 @@ function getFullCalendarEvents(start, end, callback) { } function checkSCUploadStatus(){ - var url = baseUrl+'/Library/get-upload-to-soundcloud-status/format/json'; + var url = baseUrl+'Library/get-upload-to-soundcloud-status/format/json'; $("span[class*=progress]").each(function(){ var id = $(this).attr("id"); $.post(url, {format: "json", id: id, type:"show"}, function(json){ @@ -358,7 +358,7 @@ function checkSCUploadStatus(){ * show icon */ function getCurrentShow(){ - var url = baseUrl+'/Schedule/get-current-show/format/json', + var url = baseUrl+'Schedule/get-current-show/format/json', id, $el; $.post(url, {format: "json"}, function(json) { @@ -436,7 +436,7 @@ function addQtipsToIcons(ele){ content: { text: $.i18n._("Retreiving data from the server..."), ajax: { - url: baseUrl+"/Library/get-upload-to-soundcloud-status", + url: baseUrl+"Library/get-upload-to-soundcloud-status", type: "post", data: ({format: "json", id : id, type: "show"}), success: function(json, status){ @@ -465,7 +465,7 @@ function addQtipsToIcons(ele){ content: { text: $.i18n._("Retreiving data from the server..."), ajax: { - url: baseUrl+"/Library/get-upload-to-soundcloud-status", + url: baseUrl+"Library/get-upload-to-soundcloud-status", type: "post", data: ({format: "json", id : id, type: "show"}), success: function(json, status){ diff --git a/airtime_mvc/public/js/airtime/schedule/schedule.js b/airtime_mvc/public/js/airtime/schedule/schedule.js index 1a51c476f..2de53cdb5 100644 --- a/airtime_mvc/public/js/airtime/schedule/schedule.js +++ b/airtime_mvc/public/js/airtime/schedule/schedule.js @@ -34,7 +34,7 @@ function checkShowLength(json) { function confirmCancelShow(show_instance_id){ if (confirm($.i18n._('Cancel Current Show?'))) { - var url = baseUrl+"/Schedule/cancel-current-show"; + var url = baseUrl+"Schedule/cancel-current-show"; $.ajax({ url: url, data: {format: "json", id: show_instance_id}, @@ -47,7 +47,7 @@ function confirmCancelShow(show_instance_id){ function confirmCancelRecordedShow(show_instance_id){ if (confirm($.i18n._('Stop recording current show?'))) { - var url = baseUrl+"/Schedule/cancel-current-show"; + var url = baseUrl+"Schedule/cancel-current-show"; $.ajax({ url: url, data: {format: "json", id: show_instance_id}, @@ -60,7 +60,7 @@ function confirmCancelRecordedShow(show_instance_id){ function uploadToSoundCloud(show_instance_id){ - var url = baseUrl+"/Schedule/upload-to-sound-cloud"; + var url = baseUrl+"Schedule/upload-to-sound-cloud"; var span = $(window.triggerElement).find(".recording"); $.post(url, @@ -80,7 +80,7 @@ function uploadToSoundCloud(show_instance_id){ } function checkCalendarSCUploadStatus(){ - var url = baseUrl+'/Library/get-upload-to-soundcloud-status', + var url = baseUrl+'Library/get-upload-to-soundcloud-status', span, id; @@ -328,7 +328,7 @@ function alertShowErrorAndReload(){ } $(document).ready(function() { - $.ajax({ url: baseUrl+"/Api/calendar-init/format/json", dataType:"json", success:createFullCalendar + $.ajax({ url: baseUrl+"Api/calendar-init/format/json", dataType:"json", success:createFullCalendar , error:function(jqXHR, textStatus, errorThrown){}}); setInterval(checkCalendarSCUploadStatus, 5000); @@ -498,7 +498,7 @@ $(document).ready(function() { } $.ajax({ - url: baseUrl+"/schedule/make-context-menu", + url: baseUrl+"schedule/make-context-menu", type: "GET", data: {id : data.id, format: "json"}, dataType: "json", diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index 1f0c3e243..b7d4bda7f 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -42,7 +42,7 @@ var AIRTIME = (function(AIRTIME){ mod.updateCalendarStatusIcon = function(json) { - if (window.location.pathname.toLowerCase() != baseUrl+"/schedule") { + if (window.location.pathname.toLowerCase() != baseUrl+"schedule") { return; } @@ -288,7 +288,7 @@ var AIRTIME = (function(AIRTIME){ mod.disableUI(); - $.post(baseUrl+"/showbuilder/schedule-add", + $.post(baseUrl+"showbuilder/schedule-add", {"format": "json", "mediaIds": aMediaIds, "schedIds": aSchedIds}, mod.fnItemCallback ); @@ -298,7 +298,7 @@ var AIRTIME = (function(AIRTIME){ mod.disableUI(); - $.post(baseUrl+"/showbuilder/schedule-move", + $.post(baseUrl+"showbuilder/schedule-move", {"format": "json", "selectedItem": aSelect, "afterItem": aAfter}, mod.fnItemCallback ); @@ -308,7 +308,7 @@ var AIRTIME = (function(AIRTIME){ mod.disableUI(); if (confirm($.i18n._("Delete selected item(s)?"))) { - $.post( baseUrl+"/showbuilder/schedule-remove", + $.post( baseUrl+"showbuilder/schedule-remove", {"items": aItems, "format": "json"}, mod.fnItemCallback ); @@ -417,7 +417,7 @@ var AIRTIME = (function(AIRTIME){ localStorage.setItem('datatables-timeline', JSON.stringify(oData)); $.ajax({ - url: baseUrl+"/usersettings/set-timeline-datatable", + url: baseUrl+"usersettings/set-timeline-datatable", type: "POST", data: {settings : oData, format: "json"}, dataType: "json" @@ -579,7 +579,7 @@ var AIRTIME = (function(AIRTIME){ if (!isAudioSupported(aData.mime)) { $image.html(''); } else { - $image.html('') + $image.html('') .click(function() { open_show_preview(aData.instance, aData.pos); return false; @@ -817,7 +817,7 @@ var AIRTIME = (function(AIRTIME){ "sAjaxDataProp": "schedule", "oLanguage": datatables_dict, - "sAjaxSource": baseUrl+"/showbuilder/builder-feed" + "sAjaxSource": baseUrl+"showbuilder/builder-feed" }); $sbTable.find("tbody").on("click", "input:checkbox", function(ev) { @@ -1061,7 +1061,7 @@ var AIRTIME = (function(AIRTIME){ } if (confirm(msg)) { - var url = baseUrl+"/Schedule/cancel-current-show"; + var url = baseUrl+"Schedule/cancel-current-show"; $.ajax({ url: url, data: {format: "json", id: data.instance}, @@ -1243,7 +1243,7 @@ var AIRTIME = (function(AIRTIME){ } request = $.ajax({ - url: baseUrl+"/showbuilder/context-menu", + url: baseUrl+"showbuilder/context-menu", type: "GET", data: {id : data.id, format: "json"}, dataType: "json", diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index b78075e12..214bc9714 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -171,7 +171,7 @@ AIRTIME = (function(AIRTIME) { schedTable.fnDraw(); $.ajax( { - url : baseUrl+"/usersettings/set-now-playing-screen-settings", + url : baseUrl+"usersettings/set-now-playing-screen-settings", type : "POST", data : { settings : { @@ -197,7 +197,7 @@ AIRTIME = (function(AIRTIME) { schedTable.fnDraw(); $.ajax( { - url : baseUrl+"/usersettings/set-now-playing-screen-settings", + url : baseUrl+"usersettings/set-now-playing-screen-settings", type : "POST", data : { settings : { @@ -271,7 +271,7 @@ AIRTIME = (function(AIRTIME) { $.ajax( { "dataType" : "json", "type" : "GET", - "url" : baseUrl+"/showbuilder/check-builder-feed", + "url" : baseUrl+"showbuilder/check-builder-feed", "data" : data, "success" : function(json) { if (json.update === true) { diff --git a/airtime_mvc/public/js/airtime/status/status.js b/airtime_mvc/public/js/airtime/status/status.js index cd0699e3a..9b5e4d3ea 100644 --- a/airtime_mvc/public/js/airtime/status/status.js +++ b/airtime_mvc/public/js/airtime/status/status.js @@ -69,7 +69,7 @@ function success(data, textStatus, jqXHR){ } function updateStatus(getDiskInfo){ - $.getJSON( baseUrl+"/api/status/format/json/diskinfo/"+getDiskInfo, null, success); + $.getJSON( baseUrl+"api/status/format/json/diskinfo/"+getDiskInfo, null, success); } diff --git a/airtime_mvc/public/js/airtime/user/user.js b/airtime_mvc/public/js/airtime/user/user.js index 1aa53c332..fd129be79 100644 --- a/airtime_mvc/public/js/airtime/user/user.js +++ b/airtime_mvc/public/js/airtime/user/user.js @@ -26,13 +26,13 @@ function populateForm(entries){ } function rowClickCallback(row_id){ - $.ajax({ url: baseUrl+'/User/get-user-data/id/'+ row_id +'/format/json', dataType:"json", success:function(data){ + $.ajax({ url: baseUrl+'User/get-user-data/id/'+ row_id +'/format/json', dataType:"json", success:function(data){ populateForm(data.entries); }}); } function removeUserCallback(row_id, nRow){ - $.ajax({ url: baseUrl+'/User/remove-user/id/'+ row_id +'/format/json', dataType:"text", success:function(data){ + $.ajax({ url: baseUrl+'User/remove-user/id/'+ row_id +'/format/json', dataType:"text", success:function(data){ var o = $('#users_datatable').dataTable().fnDeleteRow(nRow); }}); } @@ -66,7 +66,7 @@ function populateUserTable() { $('#users_datatable').dataTable( { "bProcessing": true, "bServerSide": true, - "sAjaxSource": baseUrl+"/User/get-user-data-table-info/format/json", + "sAjaxSource": baseUrl+"User/get-user-data-table-info/format/json", "fnServerData": function ( sSource, aoData, fnCallback ) { $.ajax( { "dataType": 'json', @@ -187,7 +187,7 @@ $(document).ready(function() { $('#save_user').live('click', function(){ var data = $('#user_form').serialize(); - var url = baseUrl+'/User/add-user'; + var url = baseUrl+'User/add-user'; $.post(url, {format: "json", data: data}, function(data){ var json = $.parseJSON(data);