CC-3496 : PlaylistBuilder, NowPlaying -> GUI representation gets broken while being resized
fixing now playing screen.
This commit is contained in:
parent
b39db57d0c
commit
bb1f94c796
1 changed files with 193 additions and 164 deletions
|
@ -1,11 +1,11 @@
|
|||
$(document).ready(function(){
|
||||
AIRTIME = (function(AIRTIME) {
|
||||
|
||||
var viewport = AIRTIME.utilities.findViewportDimensions(),
|
||||
$lib = $("#library_content"),
|
||||
var viewport,
|
||||
$lib,
|
||||
$libWrapper,
|
||||
$builder = $("#show_builder"),
|
||||
widgetHeight = viewport.height - 180,
|
||||
screenWidth = Math.floor(viewport.width - 120),
|
||||
$builder,
|
||||
widgetHeight,
|
||||
screenWidth,
|
||||
oBaseDatePickerSettings,
|
||||
oBaseTimePickerSettings,
|
||||
oRange,
|
||||
|
@ -18,15 +18,13 @@ $(document).ready(function(){
|
|||
"class": "close-round",
|
||||
"href": "#",
|
||||
"id": "sb_lib_close"
|
||||
});
|
||||
}),
|
||||
mod;
|
||||
|
||||
//set the heights of the main widgets.
|
||||
$lib.height(widgetHeight);
|
||||
|
||||
//builder takes all the screen on first load
|
||||
$builder
|
||||
.height(widgetHeight)
|
||||
.width(screenWidth);
|
||||
if (AIRTIME.builderMain === undefined) {
|
||||
AIRTIME.builderMain = {};
|
||||
}
|
||||
mod = AIRTIME.builderMain;
|
||||
|
||||
oBaseDatePickerSettings = {
|
||||
dateFormat: 'yy-mm-dd',
|
||||
|
@ -42,14 +40,11 @@ $(document).ready(function(){
|
|||
defaultTime: '0:00'
|
||||
};
|
||||
|
||||
$builder.find(dateStartId).datepicker(oBaseDatePickerSettings);
|
||||
$builder.find(timeStartId).timepicker(oBaseTimePickerSettings);
|
||||
$builder.find(dateEndId).datepicker(oBaseDatePickerSettings);
|
||||
$builder.find(timeEndId).timepicker(oBaseTimePickerSettings);
|
||||
function setWidgetHeights() {
|
||||
|
||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
AIRTIME.showbuilder.fnServerData.start = oRange.start;
|
||||
AIRTIME.showbuilder.fnServerData.end = oRange.end;
|
||||
//set the heights of the main widgets.
|
||||
$lib.height(widgetHeight);
|
||||
$builder.height(widgetHeight);
|
||||
|
||||
if ($lib.filter(':visible').length > 0) {
|
||||
|
||||
|
@ -60,7 +55,26 @@ $(document).ready(function(){
|
|||
.remove()
|
||||
.end();
|
||||
}
|
||||
}
|
||||
|
||||
mod.onReady = function() {
|
||||
//define module vars.
|
||||
viewport = AIRTIME.utilities.findViewportDimensions(),
|
||||
$lib = $("#library_content"),
|
||||
$builder = $("#show_builder"),
|
||||
widgetHeight = viewport.height - 180,
|
||||
screenWidth = Math.floor(viewport.width - 120);
|
||||
|
||||
$builder.find(dateStartId).datepicker(oBaseDatePickerSettings);
|
||||
$builder.find(timeStartId).timepicker(oBaseTimePickerSettings);
|
||||
$builder.find(dateEndId).datepicker(oBaseDatePickerSettings);
|
||||
$builder.find(timeEndId).timepicker(oBaseTimePickerSettings);
|
||||
|
||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
AIRTIME.showbuilder.fnServerData.start = oRange.start;
|
||||
AIRTIME.showbuilder.fnServerData.end = oRange.end;
|
||||
|
||||
setWidgetHeights();
|
||||
AIRTIME.library.libraryInit();
|
||||
AIRTIME.showbuilder.builderDataTable();
|
||||
|
||||
|
@ -208,4 +222,19 @@ $(document).ready(function(){
|
|||
} );
|
||||
|
||||
}, 5 * 1000); //need refresh in milliseconds
|
||||
});
|
||||
};
|
||||
|
||||
mod.onResize = function() {
|
||||
viewport = AIRTIME.utilities.findViewportDimensions(),
|
||||
widgetHeight = viewport.height - 180,
|
||||
screenWidth = Math.floor(viewport.width - 120);
|
||||
|
||||
setWidgetHeights();
|
||||
};
|
||||
|
||||
return AIRTIME;
|
||||
|
||||
} (AIRTIME || {}));
|
||||
|
||||
$(document).ready(AIRTIME.builderMain.onReady);
|
||||
$(window).resize(AIRTIME.builderMain.onResize);
|
Loading…
Add table
Add a link
Reference in a new issue