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(),
|
var viewport,
|
||||||
$lib = $("#library_content"),
|
$lib,
|
||||||
$libWrapper,
|
$libWrapper,
|
||||||
$builder = $("#show_builder"),
|
$builder,
|
||||||
widgetHeight = viewport.height - 180,
|
widgetHeight,
|
||||||
screenWidth = Math.floor(viewport.width - 120),
|
screenWidth,
|
||||||
oBaseDatePickerSettings,
|
oBaseDatePickerSettings,
|
||||||
oBaseTimePickerSettings,
|
oBaseTimePickerSettings,
|
||||||
oRange,
|
oRange,
|
||||||
|
@ -18,15 +18,13 @@ $(document).ready(function(){
|
||||||
"class": "close-round",
|
"class": "close-round",
|
||||||
"href": "#",
|
"href": "#",
|
||||||
"id": "sb_lib_close"
|
"id": "sb_lib_close"
|
||||||
});
|
}),
|
||||||
|
mod;
|
||||||
|
|
||||||
//set the heights of the main widgets.
|
if (AIRTIME.builderMain === undefined) {
|
||||||
$lib.height(widgetHeight);
|
AIRTIME.builderMain = {};
|
||||||
|
}
|
||||||
//builder takes all the screen on first load
|
mod = AIRTIME.builderMain;
|
||||||
$builder
|
|
||||||
.height(widgetHeight)
|
|
||||||
.width(screenWidth);
|
|
||||||
|
|
||||||
oBaseDatePickerSettings = {
|
oBaseDatePickerSettings = {
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
|
@ -42,14 +40,11 @@ $(document).ready(function(){
|
||||||
defaultTime: '0:00'
|
defaultTime: '0:00'
|
||||||
};
|
};
|
||||||
|
|
||||||
$builder.find(dateStartId).datepicker(oBaseDatePickerSettings);
|
function setWidgetHeights() {
|
||||||
$builder.find(timeStartId).timepicker(oBaseTimePickerSettings);
|
|
||||||
$builder.find(dateEndId).datepicker(oBaseDatePickerSettings);
|
|
||||||
$builder.find(timeEndId).timepicker(oBaseTimePickerSettings);
|
|
||||||
|
|
||||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
//set the heights of the main widgets.
|
||||||
AIRTIME.showbuilder.fnServerData.start = oRange.start;
|
$lib.height(widgetHeight);
|
||||||
AIRTIME.showbuilder.fnServerData.end = oRange.end;
|
$builder.height(widgetHeight);
|
||||||
|
|
||||||
if ($lib.filter(':visible').length > 0) {
|
if ($lib.filter(':visible').length > 0) {
|
||||||
|
|
||||||
|
@ -60,7 +55,26 @@ $(document).ready(function(){
|
||||||
.remove()
|
.remove()
|
||||||
.end();
|
.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.library.libraryInit();
|
||||||
AIRTIME.showbuilder.builderDataTable();
|
AIRTIME.showbuilder.builderDataTable();
|
||||||
|
|
||||||
|
@ -208,4 +222,19 @@ $(document).ready(function(){
|
||||||
} );
|
} );
|
||||||
|
|
||||||
}, 5 * 1000); //need refresh in milliseconds
|
}, 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