Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
41b072b412
4 changed files with 32 additions and 32 deletions
|
@ -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()
|
||||||
|
@ -342,8 +344,8 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$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
|
||||||
|
|
|
@ -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');
|
||||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue