Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
41b072b412
|
@ -41,11 +41,11 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/fullcalendar/fullcalendar.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/fullcalendar/fullcalendar.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/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','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.js','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");
|
||||||
|
@ -55,10 +55,10 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/schedule/schedule.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/schedule/schedule.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/meioMask/jquery.meio.mask.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/meioMask/jquery.meio.mask.js','text/javascript');
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery-ui-timepicker.css');
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery-ui-timepicker.css');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/fullcalendar.css');
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/fullcalendar.css');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/colorpicker/css/colorpicker.css');
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/colorpicker/css/colorpicker.css');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/add-show.css');
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/add-show.css');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css');
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css');
|
||||||
|
|
||||||
Application_Model_Schedule::createNewFormSections($this->view);
|
Application_Model_Schedule::createNewFormSections($this->view);
|
||||||
|
@ -67,6 +67,8 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$user = new Application_Model_User($userInfo->id);
|
$user = new Application_Model_User($userInfo->id);
|
||||||
$this->view->isAdmin = $user->isAdmin();
|
$this->view->isAdmin = $user->isAdmin();
|
||||||
$this->view->isProgramManager = $user->isUserType('P');
|
$this->view->isProgramManager = $user->isUserType('P');
|
||||||
|
|
||||||
|
$this->view->headScript()->appendScript("var weekStart = ".Application_Model_Preference::GetWeekStartDay().";");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function eventFeedAction()
|
public function eventFeedAction()
|
||||||
|
@ -339,15 +341,15 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$playlists = $show->searchPlaylistsForShow($post);
|
$playlists = $show->searchPlaylistsForShow($post);
|
||||||
foreach( $playlists['aaData'] as &$data){
|
foreach( $playlists['aaData'] as &$data){
|
||||||
// calling two functions to format time to 1 decimal place
|
// calling two functions to format time to 1 decimal place
|
||||||
$sec = Application_Model_Playlist::playlistTimeToSeconds($data[4]);
|
$sec = Application_Model_Playlist::playlistTimeToSeconds($data['length']);
|
||||||
$data[4] = Application_Model_Playlist::secondsToPlaylistTime($sec);
|
$data['length'] = Application_Model_Playlist::secondsToPlaylistTime($sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
//for datatables
|
//for datatables
|
||||||
die(json_encode($playlists));
|
die(json_encode($playlists));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeGroupAction()
|
public function removeGroupAction()
|
||||||
|
|
|
@ -405,9 +405,6 @@ function toggleAll() {
|
||||||
}
|
}
|
||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
} else {
|
} else {
|
||||||
if (type == "pl") {
|
|
||||||
checkedPLCount--;
|
|
||||||
}
|
|
||||||
$(this).removeClass('selected');
|
$(this).removeClass('selected');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -428,7 +425,7 @@ function enableGroupBtn(btnId, func) {
|
||||||
btnId = '#' + btnId;
|
btnId = '#' + btnId;
|
||||||
if ($(btnId).hasClass('ui-state-disabled')) {
|
if ($(btnId).hasClass('ui-state-disabled')) {
|
||||||
$(btnId).removeClass('ui-state-disabled');
|
$(btnId).removeClass('ui-state-disabled');
|
||||||
$(btnId).click(func);
|
$(btnId).unbind("click").click(func);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,16 +473,15 @@ function checkBoxChanged() {
|
||||||
} else if (!cbAllChecked && checkedCount == size) {
|
} else if (!cbAllChecked && checkedCount == size) {
|
||||||
cbAll.attr("checked", true);
|
cbAll.attr("checked", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupGroupActions() {
|
function setupGroupActions() {
|
||||||
checkedCount = 0;
|
checkedCount = 0;
|
||||||
|
checkedPLCount = 0;
|
||||||
$('#library_display tr:nth-child(1)').find(":checkbox").attr("checked", false);
|
$('#library_display tr:nth-child(1)').find(":checkbox").attr("checked", false);
|
||||||
$('#library_display thead').find(":checkbox").change(toggleAll);
|
$('#library_display thead').find(":checkbox").unbind('change').change(toggleAll);
|
||||||
$('#library_display tbody tr').each(function() {
|
$('#library_display tbody tr').each(function() {
|
||||||
$(this).find(":checkbox").change(checkBoxChanged);
|
$(this).find(":checkbox").unbind('change').change(checkBoxChanged);
|
||||||
});
|
});
|
||||||
|
|
||||||
disableGroupBtn('library_group_add');
|
disableGroupBtn('library_group_add');
|
||||||
|
@ -567,7 +563,7 @@ function createDataTable(data) {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.tabs').tabs();
|
$('.tabs').tabs();
|
||||||
|
|
||||||
$.ajax({ url: "/Api/library-init/format/json", dataType:"json", success:createDataTable,
|
$.ajax({url: "/Api/library-init/format/json", dataType:"json", success:createDataTable,
|
||||||
error:function(jqXHR, textStatus, errorThrown){}});
|
error:function(jqXHR, textStatus, errorThrown){}});
|
||||||
|
|
||||||
checkImportStatus();
|
checkImportStatus();
|
||||||
|
|
|
@ -33,7 +33,8 @@ function createDateInput(el, onSelect) {
|
||||||
onSelect: onSelect,
|
onSelect: onSelect,
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
closeText: 'Close',
|
closeText: 'Close',
|
||||||
showButtonPanel: true
|
showButtonPanel: true,
|
||||||
|
firstDay: weekStart
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +191,8 @@ function setAddShowEvents() {
|
||||||
minDate: adjustDateToServerDate(new Date(), timezoneOffset),
|
minDate: adjustDateToServerDate(new Date(), timezoneOffset),
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
closeText: 'Close',
|
closeText: 'Close',
|
||||||
showButtonPanel: true
|
showButtonPanel: true,
|
||||||
|
firstDay: weekStart
|
||||||
});
|
});
|
||||||
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
|
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
|
||||||
amPmText: ['', ''],
|
amPmText: ['', ''],
|
||||||
|
|
|
@ -86,7 +86,7 @@ function setScheduleDialogEvents(dialog) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||||
var id = "pl_" + aData[0];
|
var id = "pl_" + aData['id'];
|
||||||
|
|
||||||
$(nRow).attr("id", id);
|
$(nRow).attr("id", id);
|
||||||
|
|
||||||
|
@ -125,12 +125,12 @@ function makeScheduleDialog(dialog, json) {
|
||||||
"fnRowCallback": dtRowCallback,
|
"fnRowCallback": dtRowCallback,
|
||||||
"fnDrawCallback": dtDrawCallback,
|
"fnDrawCallback": dtDrawCallback,
|
||||||
"aoColumns": [
|
"aoColumns": [
|
||||||
/* Id */ { "sName": "pl.id", "bSearchable": false, "bVisible": false },
|
/* Id */ {"sTitle": "ID", "sName": "pl.id", "bSearchable": false, "bVisible": false, "mDataProp": "id"},
|
||||||
/* Description */ { "sName": "pl.description", "bVisible": false },
|
/* Description */ {"sTitle": "Description", "sName": "pl.description", "bSearchable": false, "bVisible": false, "mDataProp": "description"},
|
||||||
/* Name */ { "sName": "pl.name" },
|
/* Name */ {"sTitle": "Title", "sName": "pl.name", "mDataProp": "name"},
|
||||||
/* Creator */ { "sName": "pl.creator" },
|
/* Creator */ {"sTitle": "Creator", "sName": "pl.creator", "mDataProp": "creator"},
|
||||||
/* Length */ { "sName": "plt.length" },
|
/* Length */ {"sTitle": "Length", "sName": "plt.length", "mDataProp": "length"},
|
||||||
/* Editing */ { "sName": "sub.login" }
|
/* Editing */ {"sTitle": "Editing", "sName": "sub.login", "mDataProp": "login"}
|
||||||
],
|
],
|
||||||
"aaSorting": [[2,'asc']],
|
"aaSorting": [[2,'asc']],
|
||||||
"sPaginationType": "full_numbers",
|
"sPaginationType": "full_numbers",
|
||||||
|
|
Loading…
Reference in New Issue