Merge branch 'saas-showbuilder' of github.com:sourcefabric/Airtime into saas-showbuilder

This commit is contained in:
Albert Santoni 2015-08-18 17:52:26 -04:00
commit 504a720ff2
5 changed files with 63 additions and 60 deletions

View File

@ -111,6 +111,7 @@ class ScheduleController extends Zend_Controller_Action
$this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/dataTables.colReorder.min.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/_showbuilder.css?'.$CC_CONFIG['airtime_version']);
//End Show builder JS/CSS requirements
$this->createShowFormAction(true);

View File

@ -1,14 +1,37 @@
<div class="wrapper">
<div id="library_content" class="lib-content tabs ui-widget ui-widget-content block-shadow alpha-block padded">
<div id="import_status" style="display:none"><?php echo _("File import in progress..."); ?></div>
<fieldset class="toggle closed" id="filter_options">
<legend style="cursor: pointer;"><span class="ui-icon ui-icon-triangle-2-n-s"></span><?php echo _("Advanced Search Options") ?></legend>
<div id="advanced_search" class="advanced_search form-horizontal"></div>
</fieldset>
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable"></table>
<div>
<!-- jQuery UI changes the styling on the outermost div; use a blank div so as not to break the .wrapper styling-->
<div class="wrapper">
<?php echo $this->csrf ?>
<div id="library_content" class="lib-content tabs content-pane wide-panel">
<div>
<h2 id="library_title">Library</h2>
</div>
<div class="panel-header">
<div id="advanced-options" class="btn-group">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<div id="advanced_search" class="advanced_search form-horizontal dropdown-menu"></div>
</div>
</div>
<div class="outer-datatable-wrapper">
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable"></table>
</div>
</div>
<div id="show_builder" class="sb-content content-pane wide-panel">
<div class="panel-header">
<ul class="nav nav-tabs">
<li id="schedule-tab" role="presentation" class="active"><a href="#">Scheduled Shows</a></li>
</ul>
</div>
<div class="outer-datatable-wrapper active-tab">
<table id="show_builder_table" cellpadding="0" cellspacing="0" class="datatable"></table>
<div class="sb-timerange">
<?php echo $this->sb_form; ?>
</div>
</div>
</div>
</div>
<div id="show_builder" class="sb-content ui-widget ui-widget-content block-shadow omega-block padded">
<div id="builder-dialog-hint"><p><?php echo _("Drag files from the library on the left to add them to your show."); ?></p></div>
<table id="show_builder_table" cellpadding="0" cellspacing="0" class="datatable"></table>
</div>
</div>
</div>

View File

@ -1192,10 +1192,10 @@ button.ui-button.::-moz-focus-inner {
text-align: left;
border-width: 1px 0 0 0;
background: none;
margin: .5em 0 0 0;
margin: 0.3em -0.4em 0;
padding: 0.3em 1em 0 0.4em;
border-color: #9f9f9f;
box-shadow: none;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: right;

View File

@ -320,24 +320,36 @@ var AIRTIME = (function(AIRTIME) {
mod.checkToolBarIcons();
};
mod.selectAll = function($els) {
$els.each(function(i, el){
mod.highlightItem($(el));
mod.addToChosen($(el));
});
$previouslySelected = $els.last();
mod.checkToolBarIcons();
};
mod.deselectAll = function($els) {
$els.each(function(i, el){
mod.unHighlightItem($(el));
mod.removeFromChosen($(el));
mod.uncheckItem($(el));
});
$previouslySelected = undefined;
mod.checkToolBarIcons();
};
/*
* selects all items which the user can currently see. (behaviour taken from
* gmail)
*
*
* by default the items are selected in reverse order so we need to reverse
* it back
*/
mod.selectCurrentPage = function() {
$.fn.reverse = [].reverse;
var $trs = $libTable.find("tbody").find("tr").reverse();
$trs.each(function(i, el){
mod.selectItem($(el));
mod.checkItem($(el));
});
mod.checkToolBarIcons();
mod.selectAll($trs);
};
/*
@ -346,26 +358,13 @@ var AIRTIME = (function(AIRTIME) {
*/
mod.deselectCurrentPage = function() {
var $trs = $libTable.find("tr");
$trs.each(function(i, el){
mod.deselectItem($(el));
mod.uncheckItem($(el));
});
mod.checkToolBarIcons();
mod.selectAll($trs);
};
mod.selectNone = function() {
var $trs = $libTable.find("tr");
$trs.each(function(i, el){
mod.deselectItem($(el));
mod.uncheckItem($(el));
});
$previouslySelected = undefined;
chosenItems = {};
mod.checkToolBarIcons();
mod.deselectAll($trs);
};
mod.fnRedraw = function() {

View File

@ -125,20 +125,8 @@ function buildScheduleDialog (json, instance_id) {
viewport = findViewportDimensions(),
height = Math.floor(viewport.height * 0.96),
width = Math.floor(viewport.width * 0.96),
fnServer = AIRTIME.showbuilder.fnServerData,
//subtract padding in pixels
widgetWidth = width - 60,
libWidth = Math.floor(widgetWidth * 0.5),
builderWidth = Math.floor(widgetWidth * 0.5);
dialog.find("#library_content")
.height(height - 115)
.width(libWidth);
dialog.find("#show_builder")
.height(height - 115)
.width(builderWidth);
fnServer = AIRTIME.showbuilder.fnServerData;
dialog.dialog({
autoOpen: false,
title: json.title,
@ -171,13 +159,6 @@ function buildScheduleDialog (json, instance_id) {
AIRTIME.library.libraryInit();
AIRTIME.showbuilder.builderDataTable();
//set max heights of datatables.
dialog.find(".lib-content .dataTables_scrolling")
.css("max-height", height - 90 - 200);
dialog.find(".sb-content .dataTables_scrolling")
.css("max-height", height - 90 - 65);
dialog.dialog('open');
}
@ -341,7 +322,6 @@ $(document).ready(function() {
if (oItems.schedule !== undefined) {
callback = function() {
$.post(oItems.schedule.url, {format: "json", id: data.id}, function(json){
buildScheduleDialog(json, data.id);
});