Merge branch '2.4.x' of dev.sourcefabric.org:airtime into 2.4.x
This commit is contained in:
commit
3391aa90c5
|
@ -391,7 +391,9 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
$libTable = $libContent.find("table");
|
$libTable = $libContent.find("table");
|
||||||
|
|
||||||
var tableHeight = $libContent.height() - 130;
|
function getTableHeight() {
|
||||||
|
return $libContent.height() - 175;
|
||||||
|
}
|
||||||
|
|
||||||
function setColumnFilter(oTable){
|
function setColumnFilter(oTable){
|
||||||
// TODO : remove this dirty hack once js is refactored
|
// TODO : remove this dirty hack once js is refactored
|
||||||
|
@ -454,6 +456,13 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
} else {
|
} else {
|
||||||
$el.hide();
|
$el.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//resize to prevent double scroll bars.
|
||||||
|
var $fs = $el.parents("fieldset"),
|
||||||
|
tableHeight = getTableHeight(),
|
||||||
|
searchHeight = $fs.height();
|
||||||
|
|
||||||
|
$libContent.find(".dataTables_scrolling").css("max-height", tableHeight - searchHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
oTable = $libTable.dataTable( {
|
oTable = $libTable.dataTable( {
|
||||||
|
@ -784,10 +793,14 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
$libContent.on("click", "legend", function(){
|
$libContent.on("click", "legend", function(){
|
||||||
$simpleSearch = $libContent.find("#library_display_filter label");
|
$simpleSearch = $libContent.find("#library_display_filter label");
|
||||||
var $fs = $(this).parents("fieldset");
|
var $fs = $(this).parents("fieldset"),
|
||||||
|
searchHeight,
|
||||||
|
tableHeight = getTableHeight(),
|
||||||
|
height;
|
||||||
|
|
||||||
if ($fs.hasClass("closed")) {
|
if ($fs.hasClass("closed")) {
|
||||||
$fs.removeClass("closed");
|
$fs.removeClass("closed");
|
||||||
|
searchHeight = $fs.height();
|
||||||
|
|
||||||
//keep value of simple search for when user switches back to it
|
//keep value of simple search for when user switches back to it
|
||||||
simpleSearchText = $simpleSearch.find('input').val();
|
simpleSearchText = $simpleSearch.find('input').val();
|
||||||
|
@ -796,6 +809,10 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
$(".dataTables_filter input").val("").keyup();
|
$(".dataTables_filter input").val("").keyup();
|
||||||
|
|
||||||
$simpleSearch.addClass("sp-invisible");
|
$simpleSearch.addClass("sp-invisible");
|
||||||
|
|
||||||
|
//resize the library table to avoid a double scroll bar. CC-4504
|
||||||
|
height = tableHeight - searchHeight;
|
||||||
|
$libContent.find(".dataTables_scrolling").css("max-height", height);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// clear the advanced search fields
|
// clear the advanced search fields
|
||||||
|
@ -817,9 +834,13 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
$simpleSearch.removeClass("sp-invisible");
|
$simpleSearch.removeClass("sp-invisible");
|
||||||
$fs.addClass("closed");
|
$fs.addClass("closed");
|
||||||
|
|
||||||
|
//resize the library table to avoid a double scroll bar. CC-4504
|
||||||
|
$libContent.find(".dataTables_scrolling").css("max-height", tableHeight);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var tableHeight = getTableHeight();
|
||||||
$libContent.find(".dataTables_scrolling").css("max-height", tableHeight);
|
$libContent.find(".dataTables_scrolling").css("max-height", tableHeight);
|
||||||
|
|
||||||
AIRTIME.library.setupLibraryToolbar(oTable);
|
AIRTIME.library.setupLibraryToolbar(oTable);
|
||||||
|
|
|
@ -1451,13 +1451,13 @@ var AIRTIME = (function(AIRTIME){
|
||||||
widgetHeight = viewport.height - 185;
|
widgetHeight = viewport.height - 185;
|
||||||
width = Math.floor(viewport.width - 80);
|
width = Math.floor(viewport.width - 80);
|
||||||
|
|
||||||
var libTableHeight = widgetHeight - 130;
|
var libTableHeight = widgetHeight - 175;
|
||||||
|
|
||||||
if (!$pl.is(':hidden')) {
|
if (!$pl.is(':hidden')) {
|
||||||
$lib.height(widgetHeight)
|
$lib.height(widgetHeight)
|
||||||
.find(".dataTables_scrolling")
|
.find(".dataTables_scrolling")
|
||||||
.css("max-height", libTableHeight)
|
.css("max-height", libTableHeight)
|
||||||
.end()
|
.end()
|
||||||
.width(Math.floor(width * 0.55));
|
.width(Math.floor(width * 0.55));
|
||||||
|
|
||||||
$pl.height(widgetHeight)
|
$pl.height(widgetHeight)
|
||||||
|
@ -1465,8 +1465,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
} else {
|
} else {
|
||||||
$lib.height(widgetHeight)
|
$lib.height(widgetHeight)
|
||||||
.find(".dataTables_scrolling")
|
.find(".dataTables_scrolling")
|
||||||
.css("max-height", libTableHeight)
|
.css("max-height", libTableHeight)
|
||||||
.end()
|
.end()
|
||||||
.width(width + 40);
|
.width(width + 40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1475,8 +1475,6 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$lib = $("#library_content");
|
$lib = $("#library_content");
|
||||||
$pl = $("#side_playlist");
|
$pl = $("#side_playlist");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setWidgetSize();
|
setWidgetSize();
|
||||||
|
|
||||||
AIRTIME.library.libraryInit();
|
AIRTIME.library.libraryInit();
|
||||||
|
|
|
@ -186,10 +186,10 @@ function buildScheduleDialog (json, instance_id) {
|
||||||
|
|
||||||
//set max heights of datatables.
|
//set max heights of datatables.
|
||||||
dialog.find(".lib-content .dataTables_scrolling")
|
dialog.find(".lib-content .dataTables_scrolling")
|
||||||
.css("max-height", height - 90 - 155);
|
.css("max-height", height - 90 - 200);
|
||||||
|
|
||||||
dialog.find(".sb-content .dataTables_scrolling")
|
dialog.find(".sb-content .dataTables_scrolling")
|
||||||
.css("max-height", height - 90 - 60);
|
.css("max-height", height - 90 - 65);
|
||||||
|
|
||||||
dialog.dialog('open');
|
dialog.dialog('open');
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ AIRTIME = (function(AIRTIME) {
|
||||||
widgetHeight = viewport.height - 180;
|
widgetHeight = viewport.height - 180;
|
||||||
screenWidth = Math.floor(viewport.width - 40);
|
screenWidth = Math.floor(viewport.width - 40);
|
||||||
|
|
||||||
var libTableHeight = widgetHeight - 130,
|
var libTableHeight = widgetHeight - 175,
|
||||||
builderTableHeight = widgetHeight - 95,
|
builderTableHeight = widgetHeight - 95,
|
||||||
oTable;
|
oTable;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue