Merge branch '2.0.x' of dev.sourcefabric.org:airtime into 2.0.x
This commit is contained in:
commit
0f9d3021cd
17 changed files with 146 additions and 105 deletions
|
@ -25,6 +25,8 @@ if (PEAR::isError($CC_DBC)) {
|
||||||
}
|
}
|
||||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
|
|
||||||
|
$CC_CONFIG['airtime_version'] = Application_Model_Preference::GetAirtimeVersion();
|
||||||
|
|
||||||
require_once __DIR__."/configs/navigation.php";
|
require_once __DIR__."/configs/navigation.php";
|
||||||
|
|
||||||
//DateTime in PHP 5.3.0+ need a default timezone set.
|
//DateTime in PHP 5.3.0+ need a default timezone set.
|
||||||
|
@ -50,14 +52,16 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
|
|
||||||
protected function _initHeadLink()
|
protected function _initHeadLink()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$view = $this->getResource('view');
|
$view = $this->getResource('view');
|
||||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
||||||
|
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css?'.filemtime($baseDir.'/css/redmond/jquery-ui-1.8.8.custom.css'));
|
$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?'.filemtime($baseDir.'/css/pro_dropdown_3.css'));
|
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/qtip/jquery.qtip.min.css?'.filemtime($baseDir.'/css/qtip/jquery.qtip.min.css'));
|
$view->headLink()->appendStylesheet($baseUrl.'/css/qtip/jquery.qtip.min.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/styles.css?'.filemtime($baseDir.'/css/styles.css'));
|
$view->headLink()->appendStylesheet($baseUrl.'/css/styles.css?'.$CC_CONFIG['airtime_version']);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _initHeadScript()
|
protected function _initHeadScript()
|
||||||
|
@ -68,28 +72,28 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
||||||
|
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.5.2.min.js?'.filemtime($baseDir.'/js/libs/jquery-1.5.2.min.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.5.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.11.custom.min.js?'.filemtime($baseDir.'/js/libs/jquery-ui-1.8.11.custom.min.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.11.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js?'.filemtime($baseDir.'/js/libs/jquery.stickyPanel.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip2.min.js?'.filemtime($baseDir.'/js/qtip/jquery.qtip2.min.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js?'.filemtime($baseDir.'/js/jplayer/jquery.jplayer.min.js'));
|
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version']);
|
||||||
$view->headScript()->appendScript("var baseUrl='$baseUrl/'");
|
$view->headScript()->appendScript("var baseUrl='$baseUrl/'");
|
||||||
|
|
||||||
//scripts for now playing bar
|
//scripts for now playing bar
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/helperfunctions.js?'.filemtime($baseDir.'/js/airtime/dashboard/helperfunctions.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/helperfunctions.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/playlist.js?'.filemtime($baseDir.'/js/airtime/dashboard/playlist.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/playlist.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/versiontooltip.js?'.filemtime($baseDir.'/js/airtime/dashboard/versiontooltip.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/versiontooltip.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/common/common.js?'.filemtime($baseDir.'/js/airtime/common/common.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/airtime/common/common.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
if (Application_Model_Preference::GetPlanLevel() != "disabled"
|
if (Application_Model_Preference::GetPlanLevel() != "disabled"
|
||||||
&& $_SERVER['REQUEST_URI'] != '/Dashboard/stream-player') {
|
&& $_SERVER['REQUEST_URI'] != '/Dashboard/stream-player') {
|
||||||
$client_id = Application_Model_Preference::GetClientId();
|
$client_id = Application_Model_Preference::GetClientId();
|
||||||
$view->headScript()->appendScript("var livechat_client_id = '$client_id';");
|
$view->headScript()->appendScript("var livechat_client_id = '$client_id';");
|
||||||
$view->headScript()->appendFile($baseUrl . '/js/airtime/common/livechat.js?'.filemtime($baseDir.'/js/airtime/common/livechat.js'), 'text/javascript');
|
$view->headScript()->appendFile($baseUrl . '/js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||||
}
|
}
|
||||||
if(isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1){
|
if(isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1){
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/google-analytics.js?'.filemtime($baseDir.'/js/libs/google-analytics.js'),'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/google-analytics.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,8 @@ class ApiController extends Zend_Controller_Action
|
||||||
"currentShow"=>Application_Model_Show::GetCurrentShow($utcTimeNow),
|
"currentShow"=>Application_Model_Show::GetCurrentShow($utcTimeNow),
|
||||||
"nextShow"=>Application_Model_Show::GetNextShows($utcTimeNow, $limit, $utcTimeEnd),
|
"nextShow"=>Application_Model_Show::GetNextShows($utcTimeNow, $limit, $utcTimeEnd),
|
||||||
"timezone"=> date("T"),
|
"timezone"=> date("T"),
|
||||||
"timezoneOffset"=> date("Z"));
|
"timezoneOffset"=> date("Z"),
|
||||||
|
"widgetVersion"=>"1.0"); //used by caller to determine if the airtime they are running or widgets in use is out of date.
|
||||||
|
|
||||||
//Convert from UTC to localtime for user.
|
//Convert from UTC to localtime for user.
|
||||||
Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"], array("starts", "ends", "start_timestamp", "end_timestamp"));
|
Application_Model_Show::ConvertToLocalTimeZone($result["currentShow"], array("starts", "ends", "start_timestamp", "end_timestamp"));
|
||||||
|
@ -254,7 +255,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
$result[$dow[$i]] = $shows;
|
$result[$dow[$i]] = $shows;
|
||||||
}
|
}
|
||||||
|
$result['widgetVersion'] = "1.0"; //used by caller to determine if the airtime they are running or widgets in use is out of date.
|
||||||
header("Content-type: text/javascript");
|
header("Content-type: text/javascript");
|
||||||
echo $_GET['callback'].'('.json_encode($result).')';
|
echo $_GET['callback'].'('.json_encode($result).')';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -15,11 +15,12 @@ class DashboardController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function streamPlayerAction()
|
public function streamPlayerAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.blue.monday.css?'.filemtime($baseDir.'/js/jplayer/skin/jplayer.blue.monday.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.blue.monday.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->_helper->layout->setLayout('bare');
|
$this->_helper->layout->setLayout('bare');
|
||||||
|
|
||||||
$logo = Application_Model_Preference::GetStationLogo();
|
$logo = Application_Model_Preference::GetStationLogo();
|
||||||
|
|
|
@ -24,19 +24,20 @@ class LibraryController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js?'.filemtime($baseDir.'/js/contextmenu/jjmenu.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.filemtime($baseDir.'/js/datatables/js/jquery.dataTables.js'),'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?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.pluginAPI.js'),'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?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js'),'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/airtime/library/library.js?'.filemtime($baseDir.'/js/airtime/library/library.js'),'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/advancedsearch.js?'.filemtime($baseDir.'/js/airtime/library/advancedsearch.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/advancedsearch.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.filemtime($baseDir.'/css/media_library.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css?'.filemtime($baseDir.'/css/contextmenu.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
|
||||||
|
|
||||||
$this->_helper->layout->setLayout('library');
|
$this->_helper->layout->setLayout('library');
|
||||||
|
|
|
@ -23,9 +23,8 @@ class LoginController extends Zend_Controller_Action
|
||||||
$error = false;
|
$error = false;
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/login/login.js?'.filemtime($baseDir.'/js/airtime/login/login.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/login/login.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$form = new Application_Form_Login();
|
$form = new Application_Form_Login();
|
||||||
|
|
||||||
|
|
|
@ -14,17 +14,18 @@ class NowplayingController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.min.js?'.filemtime($baseDir.'/js/datatables/js/jquery.dataTables.min.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
//nowplayingdatagrid.js requires this variable, so that datePicker widget can be offset to server time instead of client time
|
//nowplayingdatagrid.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()->appendScript("var timezoneOffset = ".date("Z")."; //in seconds");
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowplayingdatagrid.js?'.filemtime($baseDir.'/js/airtime/nowplaying/nowplayingdatagrid.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowplayingdatagrid.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowview.js?'.filemtime($baseDir.'/js/airtime/nowplaying/nowview.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowview.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$refer_sses = new Zend_Session_Namespace('referrer');
|
$refer_sses = new Zend_Session_Namespace('referrer');
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
|
@ -68,7 +69,7 @@ class NowplayingController extends Zend_Controller_Action
|
||||||
$this->view->logoImg = $logo;
|
$this->view->logoImg = $logo;
|
||||||
}
|
}
|
||||||
$this->view->dialog = $form;
|
$this->view->dialog = $form;
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.filemtime($baseDir.'/js/airtime/nowplaying/register.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//popup if previous page was login
|
//popup if previous page was login
|
||||||
|
@ -83,7 +84,7 @@ class NowplayingController extends Zend_Controller_Action
|
||||||
$this->view->logoImg = $logo;
|
$this->view->logoImg = $logo;
|
||||||
}
|
}
|
||||||
$this->view->dialog = $form;
|
$this->view->dialog = $form;
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.filemtime($baseDir.'/js/airtime/nowplaying/register.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,17 +106,18 @@ class NowplayingController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function dayViewAction()
|
public function dayViewAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.min.js?'.filemtime($baseDir.'/js/datatables/js/jquery.dataTables.min.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
//nowplayingdatagrid.js requires this variable, so that datePicker widget can be offset to server time instead of client time
|
//nowplayingdatagrid.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()->appendScript("var timezoneOffset = ".date("Z")."; //in seconds");
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowplayingdatagrid.js?'.filemtime($baseDir.'/js/airtime/nowplaying/nowplayingdatagrid.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/nowplayingdatagrid.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/dayview.js?'.filemtime($baseDir.'/js/airtime/nowplaying/dayview.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/dayview.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remindmeAction()
|
public function remindmeAction()
|
||||||
|
|
|
@ -77,12 +77,13 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/spl.js?'.filemtime($baseDir.'/js/airtime/library/spl.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.filemtime($baseDir.'/css/playlist_builder.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
|
||||||
$this->_helper->viewRenderer->setResponseSegment('spl');
|
$this->_helper->viewRenderer->setResponseSegment('spl');
|
||||||
$pl = $this->getPlaylist();
|
$pl = $this->getPlaylist();
|
||||||
|
|
|
@ -13,15 +13,16 @@ class PluploadController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/plupload/plupload.full.min.js?'.filemtime($baseDir.'/js/plupload/plupload.full.min.js'),'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?'.filemtime($baseDir.'/js/plupload/jquery.plupload.queue.min.js'),'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?'.filemtime($baseDir.'/js/airtime/library/plupload.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/plupload.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/plupload.queue.css?'.filemtime($baseDir.'/css/plupload.queue.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/plupload.queue.css?'.$CC_CONFIG['airtime_version']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function uploadAction()
|
public function uploadAction()
|
||||||
|
|
|
@ -19,11 +19,12 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/preferences.js?'.filemtime($baseDir.'/js/airtime/preferences/preferences.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/preferences.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->statusMsg = "";
|
$this->view->statusMsg = "";
|
||||||
|
|
||||||
$form = new Application_Form_Preferences();
|
$form = new Application_Form_Preferences();
|
||||||
|
@ -57,11 +58,12 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function supportSettingAction()
|
public function supportSettingAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/support-setting.js?'.filemtime($baseDir.'/js/airtime/preferences/support-setting.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/support-setting.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->statusMsg = "";
|
$this->view->statusMsg = "";
|
||||||
|
|
||||||
$isSass = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
|
$isSass = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
|
||||||
|
@ -116,13 +118,14 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function directoryConfigAction()
|
public function directoryConfigAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
if(Application_Model_Preference::GetPlanLevel() == 'disabled'){
|
if(Application_Model_Preference::GetPlanLevel() == 'disabled'){
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/serverbrowse/serverbrowser.js?'.filemtime($baseDir.'/js/serverbrowse/serverbrowser.js'),'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?'.filemtime($baseDir.'/js/airtime/preferences/musicdirs.js'),'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();
|
$watched_dirs_pref = new Application_Form_WatchedDirPreferences();
|
||||||
|
|
||||||
|
@ -132,12 +135,13 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function streamSettingAction()
|
public function streamSettingAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/streamsetting.js?'.filemtime($baseDir.'/js/airtime/preferences/streamsetting.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/streamsetting.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/meioMask/jquery.meio.mask.js?'.filemtime($baseDir.'/js/meioMask/jquery.meio.mask.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/meioMask/jquery.meio.mask.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
// get current settings
|
// get current settings
|
||||||
$temp = Application_Model_StreamSetting::getStreamSetting();
|
$temp = Application_Model_StreamSetting::getStreamSetting();
|
||||||
|
|
|
@ -37,30 +37,31 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js?'.filemtime($baseDir.'/js/contextmenu/jjmenu.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.filemtime($baseDir.'/js/datatables/js/jquery.dataTables.js'),'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?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.pluginAPI.js'),'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/fullcalendar/fullcalendar.js?'.filemtime($baseDir.'/js/fullcalendar/fullcalendar.js'),'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-0.0.6.js?'.filemtime($baseDir.'/js/timepicker/jquery.ui.timepicker-0.0.6.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker-0.0.6.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.js?'.filemtime($baseDir.'/js/colorpicker/js/colorpicker.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.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
|
//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()->appendScript("var timezoneOffset = ".date("Z")."; //in seconds");
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/schedule/full-calendar-functions.js?'.filemtime($baseDir.'/js/airtime/schedule/full-calendar-functions.js'),'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/airtime/schedule/add-show.js?'.filemtime($baseDir.'/js/airtime/schedule/add-show.js'),'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?'.filemtime($baseDir.'/js/airtime/schedule/schedule.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/schedule/schedule.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/meioMask/jquery.meio.mask.js?'.filemtime($baseDir.'/js/meioMask/jquery.meio.mask.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/meioMask/jquery.meio.mask.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery-ui-timepicker.css?'.filemtime($baseDir.'/css/jquery-ui-timepicker.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery-ui-timepicker.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/fullcalendar.css?'.filemtime($baseDir.'/css/fullcalendar.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/fullcalendar.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/colorpicker/css/colorpicker.css?'.filemtime($baseDir.'/css/colorpicker/css/colorpicker.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/colorpicker/css/colorpicker.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/add-show.css?'.filemtime($baseDir.'/css/add-show.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/add-show.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css?'.filemtime($baseDir.'/css/contextmenu.css'));
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
|
||||||
Application_Model_Schedule::createNewFormSections($this->view);
|
Application_Model_Schedule::createNewFormSections($this->view);
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,9 @@ class SystemstatusController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/status/status.js?'.filemtime($baseDir.'/js/airtime/status/status.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/status/status.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/sprintf/sprintf-0.7-beta1.js?'.filemtime($baseDir.'/js/sprintf/sprintf-0.7-beta1.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
|
|
|
@ -23,11 +23,10 @@ class UserController extends Zend_Controller_Action
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.filemtime($baseDir.'/js/datatables/js/jquery.dataTables.js'),'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?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.pluginAPI.js'),'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/airtime/user/user.js?'.filemtime($baseDir.'/js/airtime/user/user.js'),'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/user/user.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$form = new Application_Form_AddUser();
|
$form = new Application_Form_AddUser();
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,8 @@ class AirtimeProcessEvent(ProcessEvent):
|
||||||
self.mmc.set_needed_file_permissions(pathname, dir)
|
self.mmc.set_needed_file_permissions(pathname, dir)
|
||||||
|
|
||||||
def process_IN_MODIFY(self, event):
|
def process_IN_MODIFY(self, event):
|
||||||
|
# if IN_MODIFY is followed by IN_CREATE, it's not true modify event
|
||||||
|
if not event.pathname in self.create_dict:
|
||||||
self.logger.info("process_IN_MODIFY: %s", event)
|
self.logger.info("process_IN_MODIFY: %s", event)
|
||||||
self.handle_modified_file(event.dir, event.pathname, event.name)
|
self.handle_modified_file(event.dir, event.pathname, event.name)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import os
|
||||||
import grp
|
import grp
|
||||||
import pwd
|
import pwd
|
||||||
import logging
|
import logging
|
||||||
|
import stat
|
||||||
|
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
from airtimemetadata import AirtimeMetadata
|
from airtimemetadata import AirtimeMetadata
|
||||||
|
@ -74,17 +75,23 @@ class MediaMonitorCommon:
|
||||||
def set_needed_file_permissions(self, item, is_dir):
|
def set_needed_file_permissions(self, item, is_dir):
|
||||||
try:
|
try:
|
||||||
omask = os.umask(0)
|
omask = os.umask(0)
|
||||||
|
|
||||||
if not self.has_correct_permissions(item, 'www-data', 'www-data'):
|
if not self.has_correct_permissions(item, 'www-data', 'www-data'):
|
||||||
uid = pwd.getpwnam('www-data')[2]
|
# stats.st_mode is the original permission
|
||||||
gid = grp.getgrnam('www-data')[2]
|
# stat.S_IROTH - readable by all permission
|
||||||
|
# stat.S_IXOTH - excutable by all permission
|
||||||
os.chown(item, uid, gid)
|
# try to set permission
|
||||||
|
if self.is_parent_directory(item, self.config.storage_directory) or self.is_parent_directory(item, self.config.imported_directory) or (item, self.config.organize_directory):
|
||||||
if is_dir is True:
|
if is_dir is True:
|
||||||
os.chmod(item, 02777)
|
os.chmod(item, 02777)
|
||||||
else:
|
else:
|
||||||
os.chmod(item, 0666)
|
os.chmod(item, 0666)
|
||||||
|
else :
|
||||||
|
# add world readable permission
|
||||||
|
stats = os.stat(item)
|
||||||
|
if is_dir is True:
|
||||||
|
os.chmod(item, stats.st_mode | stat.S_IROTH | stat.S_IXOTH)
|
||||||
|
else:
|
||||||
|
os.chmod(item, stats.st_mode | stat.S_IROTH)
|
||||||
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.logger.error("Failed to change file's owner/group/permissions. %s", e)
|
self.logger.error("Failed to change file's owner/group/permissions. %s", e)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
tableString = "";
|
tableString = "";
|
||||||
tableString += "<h3>" + options.text.onAirToday + "</h3>";
|
tableString += "<h3>" + options.text.onAirToday + "</h3>";
|
||||||
tableString += "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='widget widget no-playing-list small'>"+
|
tableString += "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='widget widget now-playing-list small'>"+
|
||||||
"<tbody>";
|
"<tbody>";
|
||||||
|
|
||||||
for (var i=0; i<shows.length; i++){
|
for (var i=0; i<shows.length; i++){
|
||||||
|
@ -44,6 +44,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function processData(data){
|
function processData(data){
|
||||||
|
checkWidgetVersion(data);
|
||||||
sd = new ScheduleData(data);
|
sd = new ScheduleData(data);
|
||||||
updateWidget();
|
updateWidget();
|
||||||
}
|
}
|
||||||
|
@ -117,7 +118,7 @@
|
||||||
|
|
||||||
obj.empty();
|
obj.empty();
|
||||||
obj.append("<h4>"+showStatus+" >></h4>");
|
obj.append("<h4>"+showStatus+" >></h4>");
|
||||||
obj.append("<ul class='widget no-playing-bar'>" +
|
obj.append("<ul class='widget now-playing-bar'>" +
|
||||||
"<li class='current'>"+options.text.current+": "+currentShowName+
|
"<li class='current'>"+options.text.current+": "+currentShowName+
|
||||||
"<span id='time-elapsed' class='time-elapsed'>"+timeElapsed+"</span>" +
|
"<span id='time-elapsed' class='time-elapsed'>"+timeElapsed+"</span>" +
|
||||||
"<span id='time-remaining' class='time-remaining'>"+timeRemaining+"</span>"+
|
"<span id='time-remaining' class='time-remaining'>"+timeRemaining+"</span>"+
|
||||||
|
@ -127,6 +128,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function processData(data){
|
function processData(data){
|
||||||
|
checkWidgetVersion(data);
|
||||||
sd = new ScheduleData(data);
|
sd = new ScheduleData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +191,7 @@
|
||||||
function updateWidget(data){
|
function updateWidget(data){
|
||||||
for (var i=0; i<dow.length; i++){
|
for (var i=0; i<dow.length; i++){
|
||||||
var html =
|
var html =
|
||||||
'<table class="widget widget no-playing-list">'+
|
'<table class="widget widget now-playing-list">'+
|
||||||
'<colgroup>'+
|
'<colgroup>'+
|
||||||
'<col width="150" />'+
|
'<col width="150" />'+
|
||||||
'<col width="350" />'+
|
'<col width="350" />'+
|
||||||
|
@ -234,6 +236,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function processData(data){
|
function processData(data){
|
||||||
|
checkWidgetVersion(data);
|
||||||
updateWidget(data);
|
updateWidget(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,3 +396,19 @@ function convertDateToPosixTime(s){
|
||||||
|
|
||||||
return Date.UTC(year, month-1, day, hour, minute, sec, msec);
|
return Date.UTC(year, month-1, day, hour, minute, sec, msec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Checks the incomming data's widget version tag.
|
||||||
|
* The current widget version is 1.
|
||||||
|
* -If the value returned is equal to 1 do nothing.
|
||||||
|
* -If the value doesn't exist or it is great then 1 throw error warning the user they should upgrade their airtime install.
|
||||||
|
* -If the value is less then 1 warn the user that they should upgrade the javascript to a newer version.
|
||||||
|
*/
|
||||||
|
function checkWidgetVersion(data){
|
||||||
|
var widgetVersion = data['widgetVersion'];
|
||||||
|
|
||||||
|
if (undefined === widgetVersion || widgetVersion > 1)
|
||||||
|
throw 'The widgets you are using are out of date, please get the latest jquery.showinfo.js file.';
|
||||||
|
else if (widgetVersion < 1)
|
||||||
|
throw 'The version of airtime that you are using should be upgraded to work with this widget.';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<li><a href="#sunday">Sunday</a></li>
|
<li><a href="#sunday">Sunday</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="monday">
|
<div id="monday">
|
||||||
<table class="widget widget no-playing-list">
|
<table class="widget widget now-playing-list">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150">
|
<col width="150">
|
||||||
<col width="350">
|
<col width="350">
|
||||||
|
@ -316,7 +316,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="tuesday">
|
<div id="tuesday">
|
||||||
<table class="widget widget no-playing-list">
|
<table class="widget widget now-playing-list">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150">
|
<col width="150">
|
||||||
<col width="350">
|
<col width="350">
|
||||||
|
@ -542,7 +542,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="wednesday">
|
<div id="wednesday">
|
||||||
<table class="widget widget no-playing-list">
|
<table class="widget widget now-playing-list">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150">
|
<col width="150">
|
||||||
<col width="350">
|
<col width="350">
|
||||||
|
@ -810,7 +810,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="thursday">
|
<div id="thursday">
|
||||||
<table class="widget widget no-playing-list">
|
<table class="widget widget now-playing-list">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150">
|
<col width="150">
|
||||||
<col width="350">
|
<col width="350">
|
||||||
|
@ -1099,7 +1099,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="friday">
|
<div id="friday">
|
||||||
<table class="widget widget no-playing-list">
|
<table class="widget widget now-playing-list">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150">
|
<col width="150">
|
||||||
<col width="350">
|
<col width="350">
|
||||||
|
@ -1374,7 +1374,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="saturday">
|
<div id="saturday">
|
||||||
<table class="widget widget no-playing-list">
|
<table class="widget widget now-playing-list">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150">
|
<col width="150">
|
||||||
<col width="350">
|
<col width="350">
|
||||||
|
@ -1572,7 +1572,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="sunday">
|
<div id="sunday">
|
||||||
<table class="widget widget no-playing-list">
|
<table class="widget widget now-playing-list">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="150">
|
<col width="150">
|
||||||
<col width="350">
|
<col width="350">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="headerLiveHolder">
|
<div id="headerLiveHolder">
|
||||||
<h4>On air now >></h4>
|
<h4>On air now >></h4>
|
||||||
<ul class="widget no-playing-bar">
|
<ul class="widget now-playing-bar">
|
||||||
<li class="current">Current: Réseau jeunesse<span class="time-elapsed" id="time-elapsed">02:22</span><span class="time-remaining" id="time-remaining">27:37</span></li>
|
<li class="current">Current: Réseau jeunesse<span class="time-elapsed" id="time-elapsed">02:22</span><span class="time-remaining" id="time-remaining">27:37</span></li>
|
||||||
<li class="next">Next: Mano River Press (EN)<span>07:00 - 07:30</span></li>
|
<li class="next">Next: Mano River Press (EN)<span>07:00 - 07:30</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<br />
|
<br />
|
||||||
<div id="onAirToday">
|
<div id="onAirToday">
|
||||||
<h3>On air today</h3>
|
<h3>On air today</h3>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="widget widget no-playing-list small">
|
<table cellspacing="0" cellpadding="0" border="0" width="100%" class="widget widget now-playing-list small">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="time">04:30 - 05:00</td>
|
<td class="time">04:30 - 05:00</td>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue