CC-3174 : Show Builder
data tables column resizing, starting separating out events.
This commit is contained in:
parent
df33a457b1
commit
424206b9a9
|
@ -27,6 +27,8 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
$this->_helper->layout->setLayout('library');
|
||||
|
||||
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_playlistbuilder.js'),'text/javascript');
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$this->_helper->actionStack('index', 'playlist');
|
||||
}
|
||||
|
@ -41,7 +43,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColVis.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorder.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorderResize.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.FixedColumns.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/advancedsearch.js','text/javascript');
|
||||
|
|
|
@ -29,6 +29,8 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
if ($user->isAdmin() || $user->isHost($show_instance->getShowId())) {
|
||||
$this->_helper->layout->setLayout('builder');
|
||||
|
||||
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_showbuilder.js'),'text/javascript');
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$this->_helper->actionStack('builder', 'showbuilder');
|
||||
}
|
||||
|
@ -56,5 +58,14 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
|
||||
public function scheduleAction() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$show_instance_id = $request->getParam("sid", 0);
|
||||
$scheduled_item_id = $request->getParam("time", 0);
|
||||
$scheduled_start = $request->getParam("start", 0);
|
||||
|
||||
//snap to previous/next default.
|
||||
$scheduled_type = $request->getParam("type", 0);
|
||||
|
||||
}
|
||||
}
|
|
@ -686,6 +686,21 @@ class Application_Model_StoredFile {
|
|||
(".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES WHERE file_exists = 'TRUE')) AS RESULTS";
|
||||
|
||||
$results = Application_Model_StoredFile::searchFiles($fromTable, $datatables);
|
||||
|
||||
/*
|
||||
type = aData["ftype"].substring(0,2);
|
||||
id = aData["id"];
|
||||
|
||||
if(type == "au") {
|
||||
$('td.library_type', nRow).html( '<img src="css/images/icon_audioclip.png">' );
|
||||
} else if(type == "pl") {
|
||||
$('td.library_type', nRow).html( '<img src="css/images/icon_playlist.png">' );
|
||||
}
|
||||
|
||||
|
||||
$(nRow).attr("id", type+'_'+id);
|
||||
*/
|
||||
|
||||
foreach($results['aaData'] as &$row){
|
||||
// add checkbox row
|
||||
$row['checkbox'] = "<input type='checkbox' name='cb_".$row['id']."'>";
|
||||
|
@ -694,7 +709,22 @@ class Application_Model_StoredFile {
|
|||
// split it and grab only the year info
|
||||
$yearSplit = explode('-', $row['year']);
|
||||
$row['year'] = $yearSplit[0];
|
||||
|
||||
$type = substr($row['ftype'], 0, 2);
|
||||
|
||||
$row['id'] = "{$type}_{$row['id']}";
|
||||
|
||||
//TODO url like this to work on both playlist/showbuilder screens.
|
||||
//datatable stuff really needs to be pulled out and generalized within the project
|
||||
//access to zend view methods to access url helpers is needed.
|
||||
if($type == "au") {
|
||||
$row['ftype'] = '<img src="/css/images/icon_audioclip.png">';
|
||||
}
|
||||
else {
|
||||
$row['ftype'] = '<img src="/css/images/icon_playlist.png">';
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
$(nRow).attr("id", aData["id"]);
|
||||
|
||||
return nRow;
|
||||
}
|
||||
|
||||
function dtDrawCallback() {
|
||||
addLibraryItemEvents();
|
||||
addMetadataQtip();
|
||||
//saveNumEntriesSetting();
|
||||
setupGroupActions();
|
||||
}
|
||||
|
||||
function setupLibraryToolbar() {
|
||||
$("div.library_toolbar").html('<span class="fg-button ui-button ui-state-default" id="library_order_reset">Reset Order</span>' +
|
||||
'<span class="fg-button ui-button ui-state-default ui-state-disabled" id="library_group_delete">Delete</span>' +
|
||||
'<span class="fg-button ui-button ui-state-default ui-state-disabled" id="library_group_add">Add</span>');
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
$(nRow).attr("id", aData["id"]);
|
||||
|
||||
$(nRow).data("show_builder", {"id": aData["id"], "length": aData["length"]});
|
||||
|
||||
return nRow;
|
||||
}
|
||||
|
||||
function dtDrawCallback() {
|
||||
addLibraryItemEvents();
|
||||
//addMetadataQtip();
|
||||
//setupGroupActions();
|
||||
}
|
|
@ -120,33 +120,6 @@ function addLibraryItemEvents() {
|
|||
|
||||
}
|
||||
|
||||
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var id, type, once;
|
||||
|
||||
type = aData["ftype"].substring(0,2);
|
||||
id = aData["id"];
|
||||
|
||||
if(type == "au") {
|
||||
$('td.library_type', nRow).html( '<img src="css/images/icon_audioclip.png">' );
|
||||
} else if(type == "pl") {
|
||||
$('td.library_type', nRow).html( '<img src="css/images/icon_playlist.png">' );
|
||||
}
|
||||
|
||||
$(nRow).attr("id", type+'_'+id);
|
||||
|
||||
// insert id on lenth field
|
||||
$('td.library_length', nRow).attr("id", "length");
|
||||
|
||||
return nRow;
|
||||
}
|
||||
|
||||
function dtDrawCallback() {
|
||||
addLibraryItemEvents();
|
||||
addMetadataQtip();
|
||||
saveNumEntriesSetting();
|
||||
setupGroupActions();
|
||||
}
|
||||
|
||||
function addProgressIcon(id) {
|
||||
if($("#au_"+id).find("td.library_title").find("span").length > 0){
|
||||
$("#au_"+id).find("td.library_title").find("span").removeClass();
|
||||
|
@ -544,16 +517,12 @@ function createDataTable(data) {
|
|||
"bShowAll": true
|
||||
},
|
||||
"oColReorder": {
|
||||
"aiOrder": [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] /* code this */,
|
||||
"aiOrder": [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], /* code this */
|
||||
"iFixedColumns": 3
|
||||
}
|
||||
});
|
||||
dTable.fnSetFilteringDelay(350);
|
||||
|
||||
$("div.library_toolbar").html('<span class="fg-button ui-button ui-state-default" id="library_order_reset">Reset Order</span>' +
|
||||
'<span class="fg-button ui-button ui-state-default ui-state-disabled" id="library_group_delete">Delete</span>' +
|
||||
'<span class="fg-button ui-button ui-state-default ui-state-disabled" id="library_group_add">Add</span>');
|
||||
|
||||
$('#library_order_reset').click(function() {
|
||||
ColReorder.fnReset( dTable );
|
||||
return false;
|
||||
|
|
|
@ -26,7 +26,7 @@ $(document).ready(function() {
|
|||
|
||||
events: getFullCalendarEvents,
|
||||
|
||||
axisFormat: 'H:mm:ss',
|
||||
axisFormat: 'H:mm',
|
||||
slotMinutes: 1,
|
||||
timeFormat: {
|
||||
agenda: 'H:mm:ss{ - H:mm:ss}'
|
||||
|
@ -44,6 +44,18 @@ $(document).ready(function() {
|
|||
// we need to copy it, so that multiple events don't have a reference to the same object
|
||||
//var copiedEventObject = $.extend({}, originalEventObject);
|
||||
var copiedEventObject = {};
|
||||
var data = $(this).data("show_builder");
|
||||
|
||||
$.ajax({url: "/showbuilder/schedule",
|
||||
data:{format: "json", sid:"", schedule_start: date},
|
||||
dataType:"json",
|
||||
success:function(json){
|
||||
var x;
|
||||
},
|
||||
error:function(jqXHR, textStatus, errorThrown){
|
||||
var x;
|
||||
}
|
||||
});
|
||||
|
||||
// assign it the date that was reported
|
||||
copiedEventObject.title = "test title";
|
||||
|
@ -56,8 +68,9 @@ $(document).ready(function() {
|
|||
|
||||
// render the event on the calendar
|
||||
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
|
||||
$('#show_builder').fullCalendar('renderEvent', copiedEventObject, true);
|
||||
//$('#show_builder').fullCalendar('renderEvent', copiedEventObject, true);
|
||||
|
||||
$("#schedule_calendar").fullCalendar( 'refetchEvents' );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue