-changes to list view. Framework so that we may change selected day
-changes to add-user. Started implementing Vladimirs design.
This commit is contained in:
parent
e9691f9a4c
commit
bc5b9efb4b
19 changed files with 351 additions and 69 deletions
|
@ -76,6 +76,7 @@
|
|||
<actionMethod actionName="index"/>
|
||||
<actionMethod actionName="addUser"/>
|
||||
<actionMethod actionName="getHosts"/>
|
||||
<actionMethod actionName="getUserDataTableInfo"/>
|
||||
</controllerFile>
|
||||
<controllerFile controllerName="SidePlaylist">
|
||||
<actionMethod actionName="index"/>
|
||||
|
@ -84,6 +85,7 @@
|
|||
<actionMethod actionName="index"/>
|
||||
<actionMethod actionName="getDataGridData"/>
|
||||
<actionMethod actionName="livestream"/>
|
||||
<actionMethod actionName="dayView"/>
|
||||
</controllerFile>
|
||||
<controllerFile controllerName="Preference">
|
||||
<actionMethod actionName="index"/>
|
||||
|
@ -287,6 +289,12 @@
|
|||
<viewControllerScriptsDirectory forControllerName="Library">
|
||||
<viewScriptFile forActionName="getFileMetaData"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
<viewControllerScriptsDirectory forControllerName="Nowplaying">
|
||||
<viewScriptFile forActionName="dayView"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
<viewControllerScriptsDirectory forControllerName="User">
|
||||
<viewScriptFile forActionName="getUserDataTableInfo"/>
|
||||
</viewControllerScriptsDirectory>
|
||||
</viewScriptsDirectory>
|
||||
<viewHelpersDirectory/>
|
||||
<viewFiltersDirectory enabled="false"/>
|
||||
|
|
|
@ -10,10 +10,23 @@
|
|||
$pages = array(
|
||||
array(
|
||||
'label' => 'Now Playing',
|
||||
'module' => 'Nowplaying',
|
||||
'controller' => 'index',
|
||||
'action' => 'index',
|
||||
'order' => -100 //make sure home is the first page
|
||||
'uri' => 'javascript:void(null)',
|
||||
'pages' => array(
|
||||
array(
|
||||
'label' => 'Current',
|
||||
'module' => 'default',
|
||||
'controller' => 'Nowplaying',
|
||||
'action' => 'index',
|
||||
'resource' => 'Nowplaying'
|
||||
),
|
||||
array(
|
||||
'label' => 'Daily View',
|
||||
'module' => 'default',
|
||||
'controller' => 'Nowplaying',
|
||||
'action' => 'day-view',
|
||||
'resource' => 'Nowplaying'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'label' => 'Schedule',
|
||||
|
|
|
@ -6,27 +6,38 @@ class NowplayingController extends Zend_Controller_Action
|
|||
public function init()
|
||||
{
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('get-data-grid-data', 'json')
|
||||
->initContext();
|
||||
$ajaxContext->addActionContext('get-data-grid-data', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/playlist/nowplayingdatagrid.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/playlist/nowview.js','text/javascript');
|
||||
}
|
||||
|
||||
public function getDataGridDataAction()
|
||||
{
|
||||
$viewType = $this->_request->getParam('view');
|
||||
$this->view->entries = Application_Model_Nowplaying::GetDataGridData($viewType);
|
||||
$dateString = $this->_request->getParam('date');
|
||||
$this->view->entries = Application_Model_Nowplaying::GetDataGridData($viewType, $dateString);
|
||||
}
|
||||
|
||||
public function livestreamAction()
|
||||
{
|
||||
//use bare bones layout (no header bar or menu)
|
||||
$this->_helper->layout->setLayout('bare');
|
||||
$this->_helper->layout->setLayout('bare');
|
||||
}
|
||||
|
||||
public function dayViewAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/playlist/nowplayingdatagrid.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/playlist/dayview.js','text/javascript');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,3 +46,5 @@ class NowplayingController extends Zend_Controller_Action
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,43 +5,54 @@ class UserController extends Zend_Controller_Action
|
|||
|
||||
public function init()
|
||||
{
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('get-hosts', 'json')
|
||||
->initContext();
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('get-hosts', 'json')
|
||||
->addActionContext('get-user-data-table-info', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function addUserAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/airtime/user/user.js','text/javascript');
|
||||
$request = $this->getRequest();
|
||||
$form = new Application_Form_AddUser();
|
||||
$form = new Application_Form_AddUser();
|
||||
|
||||
if ($request->isPost()) {
|
||||
if ($form->isValid($request->getPost())) {
|
||||
if ($request->isPost()) {
|
||||
if ($form->isValid($request->getPost())) {
|
||||
|
||||
$formdata = $form->getValues();
|
||||
User::addUser($formdata);
|
||||
$form->reset();
|
||||
}
|
||||
}
|
||||
$formdata = $form->getValues();
|
||||
User::addUser($formdata);
|
||||
$form->reset();
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->form = $form;
|
||||
$this->view->form = $form;
|
||||
}
|
||||
|
||||
public function getHostsAction()
|
||||
{
|
||||
$search = $this->_getParam('term');
|
||||
$search = $this->_getParam('term');
|
||||
|
||||
$this->view->hosts = User::getHosts($search);
|
||||
$this->view->hosts = User::getHosts($search);
|
||||
}
|
||||
|
||||
public function getUserDataTableInfoAction()
|
||||
{
|
||||
$post = $this->getRequest()->getPost();
|
||||
$users = User::getUsersDataTablesInfo($post);
|
||||
|
||||
die(json_encode($users));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,47 +8,54 @@ class Application_Form_AddUser extends Zend_Form
|
|||
// Add login element
|
||||
$this->addElement('text', 'login', array(
|
||||
'label' => 'Username:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array('NotEmpty')
|
||||
));
|
||||
|
||||
// Add password element
|
||||
// Add password element
|
||||
$this->addElement('text', 'password', array(
|
||||
'label' => 'Password:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array('NotEmpty')
|
||||
));
|
||||
|
||||
// Add first name element
|
||||
// Add first name element
|
||||
$this->addElement('text', 'first_name', array(
|
||||
'label' => 'Firstname:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array('NotEmpty')
|
||||
));
|
||||
|
||||
// Add last name element
|
||||
// Add last name element
|
||||
$this->addElement('text', 'last_name', array(
|
||||
'label' => 'Lastname:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array('NotEmpty')
|
||||
));
|
||||
|
||||
//Add type select
|
||||
$this->addElement('select', 'type', array(
|
||||
//Add type select
|
||||
$this->addElement('select', 'type', array(
|
||||
'required' => true,
|
||||
'class' => 'input_select',
|
||||
'style' => 'width: 40%',
|
||||
'multiOptions' => array(
|
||||
"A" => "admin",
|
||||
"A" => "admin",
|
||||
"H" => "host",
|
||||
"G" => "guest",
|
||||
"G" => "guest",
|
||||
),
|
||||
));
|
||||
|
||||
// Add the submit button
|
||||
// Add the submit button
|
||||
$this->addElement('submit', 'submit', array(
|
||||
'class' => 'ui-button ui-state-default right-floated',
|
||||
'ignore' => true,
|
||||
'label' => 'Submit',
|
||||
));
|
||||
|
|
|
@ -12,6 +12,10 @@ class Application_Model_DateHelper
|
|||
return date("Y-m-d H:i:s", $this->_timestamp);
|
||||
}
|
||||
|
||||
function setDate($dateString){
|
||||
$this->_timestamp = strtotime($dateString);
|
||||
}
|
||||
|
||||
function getNowDayStartDiff(){
|
||||
$dayStartTS = strtotime(date("Y-m-d", $this->_timestamp));
|
||||
return $this->_timestamp - $dayStartTS;
|
||||
|
|
|
@ -42,13 +42,13 @@ class Application_Model_Nowplaying
|
|||
return $rows;
|
||||
}
|
||||
|
||||
public static function GetDataGridData($viewType){
|
||||
|
||||
$date = Schedule::GetSchedulerTime();
|
||||
$timeNow = $date->getDate();
|
||||
public static function GetDataGridData($viewType, $dateString){
|
||||
|
||||
if ($viewType == "now"){
|
||||
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timeNow = $date->getDate();
|
||||
|
||||
/* When do "ORDER BY x DESC LIMIT 5" to ensure that we get the last 5 previously scheduled items.
|
||||
* However using DESC, puts our scheduled items in reverse order, so we need to reverse it again
|
||||
* with array_reverse.
|
||||
|
@ -58,6 +58,10 @@ class Application_Model_Nowplaying
|
|||
$next = Schedule::Get_Scheduled_Item_Data($timeNow, 1, 10, "24 hours");
|
||||
} else {
|
||||
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timeNow = $date->setDate($dateString);
|
||||
$timeNow = $date->getDate();
|
||||
|
||||
$previous = array_reverse(Schedule::Get_Scheduled_Item_Data($timeNow, -1, "ALL", $date->getNowDayStartDiff()." seconds"));
|
||||
$current = Schedule::Get_Scheduled_Item_Data($timeNow, 0);
|
||||
$next = Schedule::Get_Scheduled_Item_Data($timeNow, 1, "ALL", $date->getNowDayEndDiff()." seconds");
|
||||
|
|
|
@ -419,21 +419,6 @@ class Schedule {
|
|||
return $rows;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the date of the server in the format
|
||||
* "YYYY-MM-DD HH:mm:SS".
|
||||
*
|
||||
* Note: currently assuming that Web Server and Scheduler are on the
|
||||
* same host.
|
||||
*
|
||||
* @return date Current server time.
|
||||
*/
|
||||
public static function GetSchedulerTime() {
|
||||
$date = new Application_Model_DateHelper;
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns data related to the scheduled items.
|
||||
*
|
||||
|
@ -447,7 +432,7 @@ class Schedule {
|
|||
return array();
|
||||
}
|
||||
|
||||
$date = Schedule::GetSchedulerTime();
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timeNow = $date->getDate();
|
||||
return array("env"=>APPLICATION_ENV,
|
||||
"schedulerTime"=>gmdate("Y-m-d H:i:s"),
|
||||
|
|
|
@ -1797,7 +1797,7 @@ class StoredFile {
|
|||
return StoredFile::searchFiles($fromTable, $datatables);
|
||||
}
|
||||
|
||||
private static function searchFiles($fromTable, $data)
|
||||
public static function searchFiles($fromTable, $data)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
|
||||
|
|
|
@ -72,4 +72,10 @@ class User {
|
|||
return User::getUsers(array('H', 'A'), $search);
|
||||
}
|
||||
|
||||
public static function getUsersDataTablesInfo($datatables_post) {
|
||||
|
||||
$fromTable = "cc_subjs";
|
||||
return StoredFile::searchFiles($fromTable, $datatables_post);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
2
application/views/scripts/nowplaying/day-view.phtml
Normal file
2
application/views/scripts/nowplaying/day-view.phtml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<input type="text" id="datepicker" class="input_text">
|
||||
<div id='demo'></div>
|
|
@ -1,2 +1 @@
|
|||
<div style="text-align:right;"><a href="javascript:void(0);" onclick="setViewType(0)">Now View</a> | <a href="javascript:void(0);" onclick="setViewType(1)">Day View</a></div>
|
||||
<div id='demo'></div>
|
||||
|
|
|
@ -1,3 +1,126 @@
|
|||
<?php
|
||||
|
||||
echo $this->form;
|
||||
//echo $this->form;
|
||||
?>
|
||||
<div class=
|
||||
"ui-widget ui-widget-content block-shadow clearfix padded-strong user-management">
|
||||
<h2>
|
||||
Manage users
|
||||
</h2>
|
||||
<div class="user-list-wrapper">
|
||||
<div id="schedule_playlists_wrapper" class="dataTables_wrapper">
|
||||
<div class=
|
||||
"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
||||
<div class="dataTables_filter" id="schedule_playlists_filter">
|
||||
<input type="text" class="input_text auto-search">
|
||||
</div>
|
||||
<div class="button-holder">
|
||||
<button type="button" id="search_add_group" name=
|
||||
"search_add_group" class=
|
||||
"ui-button ui-widget ui-state-default ui-button-text-icon-primary">
|
||||
<span class="ui-button-text">Add user</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<table cellspacing="0" cellpadding="0" style="" id="users_datatable" class="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>Name</th>
|
||||
<th>Role</th>
|
||||
<th>Delete</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-data simple-formblock">
|
||||
<fieldset class="padded">
|
||||
<?php echo $this->form ?>
|
||||
</fieldset>
|
||||
</div>
|
||||
<!--
|
||||
<div class="user-data simple-formblock">
|
||||
<form method="post" action="" enctype=
|
||||
"application/x-www-form-urlencoded">
|
||||
<fieldset class="padded">
|
||||
<dl class="zend_form">
|
||||
<dt id="first_name-label">
|
||||
<label class="required" for="first_name">Firstname:</label>
|
||||
</dt>
|
||||
<dd id="first_name-element">
|
||||
<input type="text" value="" id="first_name" name="first_name"
|
||||
class="input_text">
|
||||
</dd>
|
||||
<dt id="last_name-label">
|
||||
<label class="required" for="last_name">Lastname:</label>
|
||||
</dt>
|
||||
<dd id="last_name-element">
|
||||
<input type="text" value="" id="last_name" name="last_name"
|
||||
class="input_text">
|
||||
</dd>
|
||||
<dt id="login-label">
|
||||
<label class="required" for="login">Username:</label>
|
||||
</dt>
|
||||
<dd id="login-element">
|
||||
<input type="text" value="" id="login" name="login" class=
|
||||
"input_text">
|
||||
</dd>
|
||||
<dt id="password-label">
|
||||
<label class="required" for="password">Password:</label>
|
||||
</dt>
|
||||
<dd id="password-element">
|
||||
<input type="text" value="" id="password" name="password"
|
||||
class="input_text">
|
||||
</dd>
|
||||
<dt id="type-label">
|
||||
<label class="required" for="type">Role:</label>
|
||||
</dt>
|
||||
<dd id="type-element">
|
||||
<select id="type" name="type" class="input_select" style=
|
||||
"width:40%;">
|
||||
<option label="admin" value="A">
|
||||
admin
|
||||
</option>
|
||||
<option label="host" value="H">
|
||||
host
|
||||
</option>
|
||||
<option label="guest" value="G">
|
||||
guest
|
||||
</option>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="padded">
|
||||
<dl class="zend_form">
|
||||
<dt id="skype-label">
|
||||
<label class="required" for="skype_name">Skype:</label>
|
||||
</dt>
|
||||
<dd id="skype-element">
|
||||
<input type="text" value="" id="skype_name" name="skype_name"
|
||||
class="input_text">
|
||||
</dd>
|
||||
<dt id="jabber-label">
|
||||
<label class="required" for="jabber_name">Jabber:</label>
|
||||
</dt>
|
||||
<dd id="jabbert_name-element">
|
||||
<input type="text" value="" id="jabber_name" name="jabber_name"
|
||||
class="input_text">
|
||||
</dd>
|
||||
<dt id="email-label">
|
||||
<label class="required" for="email">Email</label>
|
||||
</dt>
|
||||
<dd id="email-element">
|
||||
<input type="text" value="" id="email" name="email" class=
|
||||
"input_text">
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="padded">
|
||||
<input type="submit" value="Save all" id="submit" name="submit"
|
||||
class="ui-button ui-state-default right-floated">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>-->
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<br /><br /><center>View script for controller <b>User</b> and script/action name <b>getUserDataTableInfo</b></center>
|
|
@ -762,7 +762,7 @@ dt.block-display, dd.block-display {
|
|||
width:98%
|
||||
}
|
||||
div.ui-datepicker {
|
||||
font-size: 75%;
|
||||
/*font-size: 75%;*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -1060,3 +1060,60 @@ button, input {
|
|||
margin-top:0;
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
.user-management {
|
||||
width:810px;
|
||||
}
|
||||
.user-data {
|
||||
float:left;
|
||||
width:420px;
|
||||
}
|
||||
.user-list-wrapper {
|
||||
float:left;
|
||||
width:380px;
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
.user-management div.user-list-wrapper .ui-widget-header:first-child {
|
||||
background: none repeat scroll 0 0 transparent;
|
||||
border-width: 0 0 1px;
|
||||
color: #444444;
|
||||
font-weight: bold;
|
||||
}
|
||||
.user-list-wrapper .ui-widget-header:first-child .dataTables_filter {
|
||||
margin:0;
|
||||
}
|
||||
.user-management h2 {
|
||||
font-size: 1.7em;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
.user-management .dataTables_filter .auto-search {
|
||||
width: 378px;
|
||||
}
|
||||
.user-data.simple-formblock dd {
|
||||
width: 73%;
|
||||
}
|
||||
|
||||
.user-data fieldset {
|
||||
margin-bottom:8px;
|
||||
}
|
||||
.user-data fieldset:last-child {
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
.user-list-wrapper .button-holder {
|
||||
padding:8px 0;
|
||||
text-align:right;
|
||||
}
|
||||
.user-list-wrapper .button-holder .ui-button {
|
||||
margin:0;
|
||||
}
|
||||
.ui-widget-content .user-list-wrapper .ui-icon.ui-icon-closethick {
|
||||
background-image:url(redmond/images/ui-icons_666666_256x240.png);
|
||||
cursor:pointer;
|
||||
float:right;
|
||||
margin-right:5px;
|
||||
}
|
||||
.ui-widget-content .user-list-wrapper .ui-icon.ui-icon-closethick:hover {
|
||||
background-image:url(redmond/images/ui-icons_ff5d1a_256x240.png);
|
||||
}
|
26
public/js/airtime/user/user.js
Normal file
26
public/js/airtime/user/user.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
$(document).ready(function() {
|
||||
$('#users_datatable').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "/User/get-user-data-table-info/format/json",
|
||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
||||
$.ajax( {
|
||||
"dataType": 'json',
|
||||
"type": "POST",
|
||||
"url": sSource,
|
||||
"data": aoData,
|
||||
"success": fnCallback
|
||||
} );
|
||||
},
|
||||
"aoColumns": [
|
||||
/* Id */ { "sName": "id", "bSearchable": false, "bVisible": false },
|
||||
/* user name */ { "sName": "login" },
|
||||
/* user type */ { "sName": "type", "bSearchable": false },
|
||||
/* del button */ { "sName": "first_name", "bSearchable": false, "bSortable": false}
|
||||
],
|
||||
"bJQueryUI": true,
|
||||
"bAutoWidth": false,
|
||||
"bLengthChange": false,
|
||||
//"bFilter": false
|
||||
});
|
||||
});
|
1
public/js/playlist/dayview.js
Normal file
1
public/js/playlist/dayview.js
Normal file
|
@ -0,0 +1 @@
|
|||
var viewType = "day";
|
|
@ -99,7 +99,6 @@ function createDataGrid(){
|
|||
|
||||
}
|
||||
|
||||
var viewType = "now" //"day";
|
||||
var mainLoopRegistered = false;
|
||||
|
||||
function setViewType(type){
|
||||
|
@ -111,8 +110,29 @@ function setViewType(type){
|
|||
init2();
|
||||
}
|
||||
|
||||
function getDateString(){
|
||||
var date0 = $("#datepicker").datepicker("getDate");
|
||||
return (date0.getFullYear() + "-" + date0.getMonth() + "-" + date0.getDate());
|
||||
}
|
||||
|
||||
function getAJAXURL(){
|
||||
var url = "/Nowplaying/get-data-grid-data/format/json/view/"+viewType;
|
||||
|
||||
if (viewType == "day"){
|
||||
url += "/date/" + getDateString();
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
function init2(){
|
||||
$.ajax({ url: "/Nowplaying/get-data-grid-data/format/json/view/" + viewType, dataType:"json", success:function(data){
|
||||
|
||||
if (!mainLoopRegistered){
|
||||
setTimeout(init2, 5000);
|
||||
mainLoopRegistered = true;
|
||||
}
|
||||
|
||||
$.ajax({ url: getAJAXURL(), dataType:"json", success:function(data){
|
||||
datagridData = data.entries;
|
||||
createDataGrid();
|
||||
}});
|
||||
|
@ -121,13 +141,14 @@ function init2(){
|
|||
registered = true;
|
||||
registerSongEndListener(notifySongEnd);
|
||||
}
|
||||
|
||||
if (!mainLoopRegistered){
|
||||
setTimeout(init2, 5000);
|
||||
mainLoopRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
init2();
|
||||
if (viewType == "day"){
|
||||
$("#datepicker").datepicker();
|
||||
var date = new Date();
|
||||
$("#datepicker").datepicker("setDate", date);
|
||||
}
|
||||
|
||||
init2();
|
||||
});
|
||||
|
|
1
public/js/playlist/nowview.js
Normal file
1
public/js/playlist/nowview.js
Normal file
|
@ -0,0 +1 @@
|
|||
var viewType = "now";
|
Loading…
Add table
Add a link
Reference in a new issue