SAAS-948 - Frontend tweaks and fixes

This commit is contained in:
Duncan Sommerville 2015-07-29 13:35:01 -04:00
parent fcbc37977f
commit 661a87dfbc
13 changed files with 806 additions and 711 deletions

View File

@ -29,25 +29,25 @@ class ShowBuilderController extends Zend_Controller_Action {
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColReorder.css?'.$CC_CONFIG['airtime_version']);
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library-test.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_showbuilder_test.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/_library.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/_library_showbuilder.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
// PLUPLOAD
$this->view->headScript()->appendFile($baseUrl.'js/libs/dropzone.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'css/dropzone/dropzone.min.css?'.$CC_CONFIG['airtime_version']);
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery.ui.timepicker.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/builder_test.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/main_builder_test.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/_builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/showbuilder/_main_builder.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
// MEDIA BUILDER
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl-test.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/_spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headScript()->appendFile($baseUrl.'js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl.'css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder-test.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/_showbuilder.css?'.$CC_CONFIG['airtime_version']);
$csrf_namespace = new Zend_Session_Namespace('csrf_namespace');
$csrf_element = new Zend_Form_Element_Hidden('csrf');
@ -68,7 +68,7 @@ class ShowBuilderController extends Zend_Controller_Action {
$end = DateTime::createFromFormat("U", $to, $utcTimezone);
$end->setTimezone($displayTimeZone);
$form = new Application_Form_ShowBuilderTest();
$form = new Application_Form_ShowBuilderNew();
$form->populate(array(
'sb_date_start' => $start->format("Y-m-d"),
'sb_time_start' => $start->format("H:i"),

View File

@ -1,6 +1,6 @@
<?php
class Application_Form_ShowBuilderTest extends Zend_Form_SubForm
class Application_Form_ShowBuilderNew extends Zend_Form_SubForm
{
public function init()
@ -69,7 +69,7 @@ class Application_Form_ShowBuilderTest extends Zend_Form_SubForm
// add a select to choose a show.
$showSelect = new Zend_Form_Element_Select("sb_show_filter");
$showSelect->setLabel(_("Show:"));
$showSelect->setLabel(_("Filter by Show"));
$showSelect->setMultiOptions($this->getShowNames());
$showSelect->setValue(null);
$showSelect->setDecorators(array('ViewHelper'));
@ -85,7 +85,7 @@ class Application_Form_ShowBuilderTest extends Zend_Form_SubForm
private function getShowNames()
{
$showNames = array("0" => "-------------------------");
$showNames = array("0" => "Filter by Show");
$shows = CcShowQuery::create()
->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)

View File

@ -1,8 +1,16 @@
<div class="sb-options-form">
<?php echo $this->element->getElement('sb_date_start'); ?>
<?php echo $this->element->getElement('sb_time_start'); ?>
<?php echo $this->element->getElement('sb_date_end'); ?>
<?php echo $this->element->getElement('sb_time_end'); ?>
<a id="sb_submit" class="btn btn-small" href="#" title="Display shows in the specified date and time range">
<i class="icon-white icon-search"></i><?php echo " "._("Find Shows") ?>
</a>
<?php echo $this->element->getElement('sb_show_filter') ?>
<?php if ($this->element->getElement('sb_my_shows')):?>
<label><?php echo $this->element->getElement('sb_my_shows')->getLabel(); ?></label>
<?php echo $this->element->getElement('sb_my_shows'); ?>
<?php endif;?>
</div>

View File

@ -10,11 +10,14 @@
.wrapper {
position: absolute;
background: #242424;
top: 138px;
left: 0;
right: 0;
/*padding: 0;*/
padding: 2em;
padding: 0 12em;
height: calc(100% - 141px); /* Height of top panel + border */
}
.usability_hint {
margin-top: 1em;
}
</style>
<form action="/rest/media" method="post" id="upload_form" class="dropzone dz-clickable" <?php if ($this->quotaLimitReached) { ?> class="hidden" <?php } ?>>

View File

@ -21,7 +21,7 @@
<?php endif; ?>
</div>
<?php if (isset($this->obj)) : ?>
<?php if (isset($this->obj)) : ?>\
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"/>
<input id="obj_lastMod" type="hidden" value="<?php echo "1";//$this->obj->getLastModified('U'); ?>"/>
<input id="obj_type" type="hidden" value="webstream"/>

View File

@ -1,7 +1,8 @@
/* Show Builder*/
@media screen and (max-width: 1175px) {
@media screen and (max-width: 1475px) {
.lib-test, .sb-test, .media-builder-test, #media_type_nav {
height: auto !important;
width: 100% !important;
}
.media-builder-test {
@ -28,6 +29,20 @@
width: calc(100% - 1em) !important;
margin: 0 .5em .5em 0;
}
.wrapper {
padding: 1em !important;
}
}
@media screen and (max-width: 555px) {
#sb_show_filter {
float: none !important;
margin-top: 4px;
}
}
.btn {
color: #efefef;
}
.lib-test .dataTables_filter {
@ -36,7 +51,7 @@
.lib-test .dataTables_filter input[type="text"], .lib-test .dataTables_filter select {
margin-top: .5em;
width: 30%;
width: 20%;
float: right;
height: 26px;
}
@ -63,26 +78,56 @@
overflow: hidden !important;
}
.lib-test .dataTables_scrolling {
/* Subtract Advanced search (32) + header (38) + footer (38) */
height: calc(100% - 108px);
}
#library_display_wrapper, #show_builder_table_wrapper {
background-color: #474747;
}
.lib-test, .sb-test, .media-builder-test {
height: 70%;
/* 1em for the middle margin, 6 for half the width of the left pane */
width: calc(50% - 8em);
min-width: 470px;
}
#library_display_wrapper, #show_builder_table_wrapper {
height: 100%;
}
/* Timeline */
.sb-test {
margin-top: 1.5em;
margin-top: 2em;
}
#sb_submit {
text-decoration: none;
padding: .35em;
color: #efefef;
float: none;
}
.sb-timerange {
margin-bottom: 5px;
.sb-options-form {
width: 100%;
float: left;
padding-bottom: 5px;
}
.sb-options-form label {
color: #efefef;
line-height: 26px;
}
#sb_show_filter {
float: right;
}
#show_builder_table_wrapper {
clear: both;
}
/* Media builder */
@ -102,7 +147,7 @@
#media_type_nav {
float: left;
margin: 2em 0 0 0;
margin: 5.2em 0 0 0;
width: 12em;
@ -159,4 +204,6 @@
font-size: 20px;
font-weight: 300;
line-height: 1.4rem;
margin-top: 1em;
}

View File

@ -166,7 +166,7 @@ td.library_bitrate {
}
.lib-content fieldset.closed {
border-width: 1px 0 0;
margin-bottom: -6px;
margin-bottom: 0;
margin-left: 1px;
}
.dataTables_filter input[type="text"], .dataTables_filter select {

View File

@ -550,7 +550,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus, .input_t
border: 1px solid #5b5b5b;
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
height: 25px;
height: 26px;
margin: 0;
padding: 2px 2px 2px 0;
vertical-align: top;

View File

@ -334,6 +334,7 @@ var AIRTIME = (function(AIRTIME) {
mod.selectNone = function() {
var $trs = $libTable.find("tr");
$trs.removeClass(LIB_SELECTED_CLASS);
$previouslySelected = undefined;
chosenItems = {};
@ -541,7 +542,7 @@ var AIRTIME = (function(AIRTIME) {
"bProcessing": true,
"bServerSide": true,
"aLengthMenu": [[5, 10, 15, 20, 25, 50, 100], [5, 10, 15, 20, 25, 50, 100]],
"aLengthMenu": [5, 10, 15, 20, 25, 50, 100],
"bStateSave": true,
"fnStateSaveParams": function (oSettings, oData) {
@ -623,6 +624,8 @@ var AIRTIME = (function(AIRTIME) {
type = (type === undefined) ? 1 : type;
aoData.push( { name: "type", value: type} );
getUsabilityHint();
$.ajax( {
"dataType": 'json',
"type": "POST",
@ -696,12 +699,14 @@ var AIRTIME = (function(AIRTIME) {
"aiExclude": [0, 1, 2],
"sSize": "css",
"fnStateChange": setFilterElement,
"buttonText": $.i18n._("Show / hide columns")
"buttonText": $.i18n._("Columns")
},
"oColReorder": {
"iFixedColumns": 3
}
},
"bScrollCollapse": false
});
@ -770,7 +775,7 @@ var AIRTIME = (function(AIRTIME) {
AIRTIME.library.dblClickAdd(data, data.ftype);
});
$libTable.find("tbody").on("click", "tr", function(ev) {
$libTable.find("tbody").on("mousedown", "tr", function(ev) {
var $tr = $(this),
// Get the ID of the selected row
$rowId = $tr.attr("id");
@ -793,19 +798,31 @@ var AIRTIME = (function(AIRTIME) {
}
mod.selectItem($tr);
} else if (ev.ctrlKey && $previouslySelected !== undefined) {
} else if (ev.ctrlKey) {
mod.selectItem($tr);
} else {
if (!$tr.hasClass(LIB_SELECTED_CLASS)) {
$("." + LIB_SELECTED_CLASS).each(function (i, el) {
mod.deselectItem($(el))
});
}
mod.selectItem($tr);
}
// Remember this row so we can properly multiselect
$previouslySelected = $tr;
});
$libTable.find("tbody").on("click", "tr", function(ev) {
if (!ev.ctrlKey && !ev.shiftKey) {
$("." + LIB_SELECTED_CLASS).each(function (i, el) {
mod.deselectItem($(el))
});
mod.selectItem($(this));
}
});
};
mod.libraryInit = libraryInit;
return AIRTIME;

View File

@ -836,6 +836,14 @@ var AIRTIME = (function(AIRTIME){
// We also need to run the draw callback to update how dragged items are drawn
AIRTIME.library.fnDrawCallback();
var name = $('#playlist_name_display').text().trim();
if ((name == "Untitled Playlist"
|| name == "Untitled Smart Block")
&& $("#spl_sortable .spl_empty").length == 1) {
mod.fnDelete();
}
$.ajax( {
url : baseUrl+"usersettings/set-library-screen-settings",
type : "POST",

View File

@ -228,7 +228,7 @@ var AIRTIME = (function(AIRTIME) {
$toolbar.append($menu);
// add to timeline button
$toolbar
.find('.icon-plus').parent()
.find('#library-plus')
.click(
function() {
@ -286,7 +286,6 @@ var AIRTIME = (function(AIRTIME) {
}
var selection = $(".media_type_selector.selected").attr("selection_id");
console.log(selection);
if (selection == 2) {
AIRTIME.playlist.fnNew();

View File

@ -237,6 +237,7 @@ var AIRTIME = (function(AIRTIME){
mod.selectNone = function () {
var $trs = $sbTable.find("tr.lib-audio");
$trs.removeClass(SB_SELECTED_CLASS);
$previouslySelected = undefined;
mod.checkToolBarIcons();
};
@ -274,6 +275,8 @@ var AIRTIME = (function(AIRTIME){
mod.enableUI();
//Unneccessary reload of the library pane after moving tracks in the showbuilder pane.
//$("#library_content").find("#library_display").dataTable().fnStandingRedraw();
getUsabilityHint();
};
mod.getSelectedCursors = function() {
@ -727,7 +730,7 @@ var AIRTIME = (function(AIRTIME){
"oColVis": {
"aiExclude": [ 0, 1 ],
"buttonText": $.i18n._("Show / hide columns"),
"buttonText": $.i18n._("Columns")
},
"oColReorder": {
@ -736,10 +739,12 @@ var AIRTIME = (function(AIRTIME){
"sAjaxDataProp": "schedule",
"oLanguage": datatables_dict,
"sAjaxSource": baseUrl+"showbuilder/builder-feed"
"sAjaxSource": baseUrl+"showbuilder/builder-feed" ,
"bScrollCollapseY": false
});
$sbTable.find("tbody").on("click", "tr:not(.sb-past, .sb-empty)", function(ev) {
$sbTable.find("tbody").on("mousedown", "tr:not(.sb-past, .sb-empty)", function(ev) {
var $tr = $(this),
// Get the ID of the selected row
@ -765,7 +770,9 @@ var AIRTIME = (function(AIRTIME){
} else if (ev.ctrlKey && $previouslySelected !== undefined) {
$tr.addClass(SB_SELECTED_CLASS);
} else {
if (!$tr.hasClass(SB_SELECTED_CLASS)) {
$("."+SB_SELECTED_CLASS).removeClass(SB_SELECTED_CLASS);
}
$tr.addClass(SB_SELECTED_CLASS);
}
@ -775,6 +782,13 @@ var AIRTIME = (function(AIRTIME){
mod.checkToolBarIcons();
});
$sbTable.find("tbody").on("click", "tr:not(.sb-past, .sb-empty)", function(ev) {
if (!ev.ctrlKey && !ev.shiftKey) {
$("."+SB_SELECTED_CLASS).removeClass(SB_SELECTED_CLASS);
$(this).addClass(SB_SELECTED_CLASS);
}
});
var sortableConf = (function(){
var origTrs,
aItemData = [],
@ -912,7 +926,6 @@ var AIRTIME = (function(AIRTIME){
.addClass("ui-state-highlight")
.append(message)
.end();
}
helperData = selected;