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() {
|
||||
|
||||
global $CC_CONFIG;
|
||||
|
||||
$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($baseUrl.'/js/airtime/library/main_library.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$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/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/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/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']);
|
||||
|
|
|
@ -19,6 +19,7 @@ class TimeFilledFormatter {
|
|||
{
|
||||
$formatted = "";
|
||||
$sign = ($this->_seconds < 0) ? "-" : "+";
|
||||
$perfect = true;
|
||||
|
||||
$time = Application_Model_Playlist::secondsToPlaylistTime(abs($this->_seconds));
|
||||
Logging::log("time is: ".$time);
|
||||
|
@ -29,16 +30,24 @@ class TimeFilledFormatter {
|
|||
if (intval($info[0]) > 0) {
|
||||
$info[0] = ltrim($info[0], "0");
|
||||
$formatted .= " {$info[0]}h";
|
||||
$perfect = false;
|
||||
}
|
||||
|
||||
if (intval($info[1]) > 0) {
|
||||
$info[1] = ltrim($info[1], "0");
|
||||
$formatted .= " {$info[1]}m";
|
||||
$perfect = false;
|
||||
}
|
||||
|
||||
if (intval($info[2]) > 0) {
|
||||
$sec = round($info[2], 0);
|
||||
$formatted .= " {$sec}s";
|
||||
$perfect = false;
|
||||
}
|
||||
|
||||
//0 over/under lap of content.
|
||||
if ($perfect === true) {
|
||||
$formatted = "+ 0s";
|
||||
}
|
||||
|
||||
return $formatted;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#show_builder {
|
||||
width:95%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#show_builder_table th {
|
||||
|
|
|
@ -366,7 +366,7 @@ select {
|
|||
|
||||
.wrapper {
|
||||
margin: 0 20px 0 20px;
|
||||
padding:20px 0 0 0;
|
||||
padding:10px 0 0 0;
|
||||
}
|
||||
|
||||
.alpha-block {
|
||||
|
@ -577,7 +577,7 @@ dl.inline-list dd {
|
|||
line-height:22px;
|
||||
}
|
||||
.dataTables_filter {
|
||||
margin:8px 0 0 8px;
|
||||
margin:0 0 0 8px;
|
||||
}
|
||||
.dataTables_filter .auto-search {
|
||||
width:55%;
|
||||
|
|
|
@ -1,9 +1,21 @@
|
|||
$(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,
|
||||
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 = {
|
||||
dateFormat: 'yy-mm-dd',
|
||||
onSelect: function(sDate, oDatePicker) {
|
||||
|
@ -125,17 +137,17 @@ $(document).ready(function(){
|
|||
if ($button.hasClass("sb-edit")) {
|
||||
|
||||
$lib.show();
|
||||
$lib.width("45%");
|
||||
$builder.width("50%");
|
||||
$lib.width(Math.floor(screenWidth * 0.5));
|
||||
$builder.width(Math.floor(screenWidth * 0.5));
|
||||
|
||||
$button.removeClass("sb-edit");
|
||||
$button.addClass("sb-finish-edit");
|
||||
$button.val("Close Library");
|
||||
}
|
||||
else if($button.hasClass("sb-finish-edit")) {
|
||||
else if ($button.hasClass("sb-finish-edit")) {
|
||||
|
||||
$lib.hide();
|
||||
$builder.width("95%");
|
||||
$builder.width(screenWidth);
|
||||
|
||||
$button.removeClass("sb-finish-edit");
|
||||
$button.addClass("sb-edit");
|
||||
|
@ -149,7 +161,8 @@ $(document).ready(function(){
|
|||
oRange = fnGetScheduleRange();
|
||||
AIRTIME.showbuilder.fnServerData.start = oRange.start;
|
||||
AIRTIME.showbuilder.fnServerData.end = oRange.end;
|
||||
|
||||
|
||||
AIRTIME.library.libraryInit();
|
||||
AIRTIME.showbuilder.builderDataTable();
|
||||
|
||||
setInterval(function(){
|
||||
|
|
Loading…
Reference in New Issue