CC-3174 : showbuilder

dialog improvements, can scroll library, builder independently.
This commit is contained in:
Naomi Aro 2012-03-05 14:43:34 +01:00
parent 59b7f4ab56
commit 62c07107c1
2 changed files with 33 additions and 5 deletions

View File

@ -47,10 +47,22 @@ tr.cursor-selected-row .marker {
.ui-dialog .wrapper {
margin: 0;
padding: 10px 0 0 0;
overflow: hidden;
}
.ui-dialog #library_content {
margin: 0 10px 10px 0;
overflow: auto;
min-height: 0;
}
.ui-dialog #show_builder {
width:45%;
margin: 0 0 10px 0;
overflow: auto;
}
.ui-dialog .padded {
padding: 8px 10px 8px 8px;
}
.ui-dialog .ui-buttonset {

View File

@ -100,15 +100,31 @@ function buildScheduleDialog (json) {
var dialog = $(json.dialog),
viewport = findViewportDimensions(),
height = viewport.height * 0.96,
width = viewport.width * 0.96,
fnServer = AIRTIME.showbuilder.fnServerData;
height = Math.floor(viewport.height * 0.96),
width = Math.floor(viewport.width * 0.96),
fnServer = AIRTIME.showbuilder.fnServerData,
//subtract padding in pixels
widgetWidth = width - 50,
libWidth = Math.floor(widgetWidth * 0.5),
builderWidth = Math.floor(widgetWidth * 0.5);
dialog.find("#library_content")
.height(height - 125)
.width(libWidth);
dialog.find("#show_builder")
.height(height - 125)
.width(builderWidth);
dialog.dialog({
autoOpen: false,
title: json.title,
width: width,
height: height,
resizable: false,
draggable: false,
modal: true,
close: closeDialog,
buttons: {"Ok": function() {