CC-3174 : showbuilder
making each separate widget scrollable (playlist, library, timeline)
This commit is contained in:
parent
a832a40c75
commit
6c5f710329
|
@ -29,9 +29,15 @@ class LibraryController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction() {
|
public function indexAction() {
|
||||||
|
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$this->_helper->layout->setLayout('library');
|
$this->_helper->layout->setLayout('library');
|
||||||
|
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_playlistbuilder.js'),'text/javascript');
|
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_playlistbuilder.js'),'text/javascript');
|
||||||
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/main_library.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$this->_helper->actionStack('library', 'library');
|
$this->_helper->actionStack('library', 'library');
|
||||||
$this->_helper->actionStack('index', 'playlist');
|
$this->_helper->actionStack('index', 'playlist');
|
||||||
|
@ -58,7 +64,6 @@ class LibraryController extends Zend_Controller_Action
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/utilities/utilities.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/library.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/main_library.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
|
|
@ -19,6 +19,7 @@ class TimeFilledFormatter {
|
||||||
{
|
{
|
||||||
$formatted = "";
|
$formatted = "";
|
||||||
$sign = ($this->_seconds < 0) ? "-" : "+";
|
$sign = ($this->_seconds < 0) ? "-" : "+";
|
||||||
|
$perfect = true;
|
||||||
|
|
||||||
$time = Application_Model_Playlist::secondsToPlaylistTime(abs($this->_seconds));
|
$time = Application_Model_Playlist::secondsToPlaylistTime(abs($this->_seconds));
|
||||||
Logging::log("time is: ".$time);
|
Logging::log("time is: ".$time);
|
||||||
|
@ -29,16 +30,24 @@ class TimeFilledFormatter {
|
||||||
if (intval($info[0]) > 0) {
|
if (intval($info[0]) > 0) {
|
||||||
$info[0] = ltrim($info[0], "0");
|
$info[0] = ltrim($info[0], "0");
|
||||||
$formatted .= " {$info[0]}h";
|
$formatted .= " {$info[0]}h";
|
||||||
|
$perfect = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intval($info[1]) > 0) {
|
if (intval($info[1]) > 0) {
|
||||||
$info[1] = ltrim($info[1], "0");
|
$info[1] = ltrim($info[1], "0");
|
||||||
$formatted .= " {$info[1]}m";
|
$formatted .= " {$info[1]}m";
|
||||||
|
$perfect = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intval($info[2]) > 0) {
|
if (intval($info[2]) > 0) {
|
||||||
$sec = round($info[2], 0);
|
$sec = round($info[2], 0);
|
||||||
$formatted .= " {$sec}s";
|
$formatted .= " {$sec}s";
|
||||||
|
$perfect = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//0 over/under lap of content.
|
||||||
|
if ($perfect === true) {
|
||||||
|
$formatted = "+ 0s";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $formatted;
|
return $formatted;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#show_builder {
|
#show_builder {
|
||||||
width:95%;
|
width:95%;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#show_builder_table th {
|
#show_builder_table th {
|
||||||
|
|
|
@ -366,7 +366,7 @@ select {
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
margin: 0 20px 0 20px;
|
margin: 0 20px 0 20px;
|
||||||
padding:20px 0 0 0;
|
padding:10px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alpha-block {
|
.alpha-block {
|
||||||
|
@ -577,7 +577,7 @@ dl.inline-list dd {
|
||||||
line-height:22px;
|
line-height:22px;
|
||||||
}
|
}
|
||||||
.dataTables_filter {
|
.dataTables_filter {
|
||||||
margin:8px 0 0 8px;
|
margin:0 0 0 8px;
|
||||||
}
|
}
|
||||||
.dataTables_filter .auto-search {
|
.dataTables_filter .auto-search {
|
||||||
width:55%;
|
width:55%;
|
||||||
|
|
|
@ -1,9 +1,21 @@
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
var oBaseDatePickerSettings,
|
var viewport = AIRTIME.utilities.findViewportDimensions(),
|
||||||
|
lib = $("#library_content"),
|
||||||
|
builder = $("#show_builder"),
|
||||||
|
widgetHeight = viewport.height - 185,
|
||||||
|
screenWidth = Math.floor(viewport.width - 110),
|
||||||
|
oBaseDatePickerSettings,
|
||||||
oBaseTimePickerSettings,
|
oBaseTimePickerSettings,
|
||||||
oRange;
|
oRange;
|
||||||
|
|
||||||
|
//set the heights of the main widgets.
|
||||||
|
lib.height(widgetHeight);
|
||||||
|
|
||||||
|
//builder takes all the screen on first load
|
||||||
|
builder.height(widgetHeight)
|
||||||
|
.width(screenWidth);
|
||||||
|
|
||||||
oBaseDatePickerSettings = {
|
oBaseDatePickerSettings = {
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
onSelect: function(sDate, oDatePicker) {
|
onSelect: function(sDate, oDatePicker) {
|
||||||
|
@ -125,17 +137,17 @@ $(document).ready(function(){
|
||||||
if ($button.hasClass("sb-edit")) {
|
if ($button.hasClass("sb-edit")) {
|
||||||
|
|
||||||
$lib.show();
|
$lib.show();
|
||||||
$lib.width("45%");
|
$lib.width(Math.floor(screenWidth * 0.5));
|
||||||
$builder.width("50%");
|
$builder.width(Math.floor(screenWidth * 0.5));
|
||||||
|
|
||||||
$button.removeClass("sb-edit");
|
$button.removeClass("sb-edit");
|
||||||
$button.addClass("sb-finish-edit");
|
$button.addClass("sb-finish-edit");
|
||||||
$button.val("Close Library");
|
$button.val("Close Library");
|
||||||
}
|
}
|
||||||
else if($button.hasClass("sb-finish-edit")) {
|
else if ($button.hasClass("sb-finish-edit")) {
|
||||||
|
|
||||||
$lib.hide();
|
$lib.hide();
|
||||||
$builder.width("95%");
|
$builder.width(screenWidth);
|
||||||
|
|
||||||
$button.removeClass("sb-finish-edit");
|
$button.removeClass("sb-finish-edit");
|
||||||
$button.addClass("sb-edit");
|
$button.addClass("sb-edit");
|
||||||
|
@ -149,7 +161,8 @@ $(document).ready(function(){
|
||||||
oRange = fnGetScheduleRange();
|
oRange = fnGetScheduleRange();
|
||||||
AIRTIME.showbuilder.fnServerData.start = oRange.start;
|
AIRTIME.showbuilder.fnServerData.start = oRange.start;
|
||||||
AIRTIME.showbuilder.fnServerData.end = oRange.end;
|
AIRTIME.showbuilder.fnServerData.end = oRange.end;
|
||||||
|
|
||||||
|
AIRTIME.library.libraryInit();
|
||||||
AIRTIME.showbuilder.builderDataTable();
|
AIRTIME.showbuilder.builderDataTable();
|
||||||
|
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
|
|
Loading…
Reference in New Issue