CC-3174 : showbuilder
making library table only scroll on the table part.
This commit is contained in:
parent
e9627bca07
commit
fe3c340a90
6 changed files with 59 additions and 44 deletions
|
@ -660,7 +660,7 @@ Logging::log("getting media! - 2");
|
||||||
|
|
||||||
if($type == "au"){//&& isset( $audioResults )) {
|
if($type == "au"){//&& isset( $audioResults )) {
|
||||||
$row['audioFile'] = $row['gunid'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
$row['audioFile'] = $row['gunid'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
||||||
$row['image'] = '<div class="big_play"><img src="/css/images/icon_audioclip.png"></div>';
|
$row['image'] = '<img src="/css/images/icon_audioclip.png">';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$row['image'] = '<img src="/css/images/icon_playlist.png">';
|
$row['image'] = '<img src="/css/images/icon_playlist.png">';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#library_content {
|
#library_content {
|
||||||
float: left;
|
float: left;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#library_display {
|
#library_display {
|
||||||
|
@ -84,5 +84,4 @@ td.library_track,
|
||||||
td.library_sr,
|
td.library_sr,
|
||||||
td.library_bitrate {
|
td.library_bitrate {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding-right: 1em !important;
|
|
||||||
}
|
}
|
|
@ -554,6 +554,14 @@ dl.inline-list dd {
|
||||||
border-width: 0px 1px 0 1px;
|
border-width: 0px 1px 0 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dataTables_scrolling {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrolling table{
|
||||||
|
border-width: 0px 1px 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.DataTables_sort_wrapper .ui-icon {
|
.DataTables_sort_wrapper .ui-icon {
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -611,6 +619,7 @@ dl.inline-list dd {
|
||||||
.dataTables_paginate {
|
.dataTables_paginate {
|
||||||
float: right;
|
float: right;
|
||||||
padding: 8px 0 8px 8px;
|
padding: 8px 0 8px 8px;
|
||||||
|
clear: left;
|
||||||
}
|
}
|
||||||
.dataTables_paginate .ui-button {
|
.dataTables_paginate .ui-button {
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
|
|
|
@ -42,14 +42,17 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
};
|
};
|
||||||
|
|
||||||
libraryInit = function() {
|
libraryInit = function() {
|
||||||
var oTable;
|
var oTable,
|
||||||
|
libContentDiv = $("#library_content");
|
||||||
|
tableHeight = libContentDiv.height() - 140;
|
||||||
|
|
||||||
oTable = $('#library_display').dataTable( {
|
oTable = $('#library_display').dataTable( {
|
||||||
|
|
||||||
|
//put hidden columns at the top to insure they can never be visible on the table through column reordering.
|
||||||
"aoColumns": [
|
"aoColumns": [
|
||||||
/* Checkbox */ {"sTitle": "<input type='checkbox' name='pl_cb_all'>", "mDataProp": "checkbox", "bSortable": false, "bSearchable": false, "sWidth": "25px", "sClass": "library_checkbox"},
|
|
||||||
/* Type */ {"sTitle": "", "mDataProp": "image", "bSearchable": false, "sWidth": "25px", "sClass": "library_type", "iDataSort": 2},
|
|
||||||
/* ftype */ {"sTitle": "", "mDataProp": "ftype", "bSearchable": false, "bVisible": false},
|
/* ftype */ {"sTitle": "", "mDataProp": "ftype", "bSearchable": false, "bVisible": false},
|
||||||
|
/* Checkbox */ {"sTitle": "<input type='checkbox' name='pl_cb_all'>", "mDataProp": "checkbox", "bSortable": false, "bSearchable": false, "sWidth": "25px", "sClass": "library_checkbox"},
|
||||||
|
/* Type */ {"sTitle": "", "mDataProp": "image", "bSearchable": false, "sWidth": "25px", "sClass": "library_type", "iDataSort": 0},
|
||||||
/* Title */ {"sTitle": "Title", "mDataProp": "track_title", "sClass": "library_title"},
|
/* Title */ {"sTitle": "Title", "mDataProp": "track_title", "sClass": "library_title"},
|
||||||
/* Creator */ {"sTitle": "Creator", "mDataProp": "artist_name", "sClass": "library_creator"},
|
/* Creator */ {"sTitle": "Creator", "mDataProp": "artist_name", "sClass": "library_creator"},
|
||||||
/* Album */ {"sTitle": "Album", "mDataProp": "album_title", "sClass": "library_album"},
|
/* Album */ {"sTitle": "Album", "mDataProp": "album_title", "sClass": "library_album"},
|
||||||
|
@ -229,7 +232,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
},
|
},
|
||||||
|
|
||||||
// R = ColReorder, C = ColVis, T = TableTools
|
// R = ColReorder, C = ColVis, T = TableTools
|
||||||
"sDom": 'Rl<"#library_display_type">fr<"H"T<"library_toolbar"C>>t<"F"ip>',
|
"sDom": 'Rl<"#library_display_type">fr<"H"T<"library_toolbar"C>><"dataTables_scrolling"t><"F"ip>',
|
||||||
|
|
||||||
"oTableTools": {
|
"oTableTools": {
|
||||||
"sRowSelect": "multi",
|
"sRowSelect": "multi",
|
||||||
|
@ -286,6 +289,8 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
});
|
});
|
||||||
oTable.fnSetFilteringDelay(350);
|
oTable.fnSetFilteringDelay(350);
|
||||||
|
|
||||||
|
libContentDiv.find(".dataTables_scrolling").css("max-height", tableHeight);
|
||||||
|
|
||||||
AIRTIME.library.events.setupLibraryToolbar(oTable);
|
AIRTIME.library.events.setupLibraryToolbar(oTable);
|
||||||
|
|
||||||
$("#library_display_type")
|
$("#library_display_type")
|
||||||
|
|
|
@ -105,7 +105,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
mod.builderDataTable = function() {
|
mod.builderDataTable = function() {
|
||||||
var tableDiv = $('#show_builder_table'),
|
var tableDiv = $('#show_builder_table'),
|
||||||
oTable,
|
oTable,
|
||||||
fnRemoveSelectedItems;
|
fnRemoveSelectedItems,
|
||||||
|
tableHeight;
|
||||||
|
|
||||||
fnRemoveSelectedItems = function() {
|
fnRemoveSelectedItems = function() {
|
||||||
var oTT = TableTools.fnGetInstance('show_builder_table'),
|
var oTT = TableTools.fnGetInstance('show_builder_table'),
|
||||||
|
@ -405,7 +406,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
},
|
},
|
||||||
|
|
||||||
// R = ColReorderResize, C = ColVis, T = TableTools
|
// R = ColReorderResize, C = ColVis, T = TableTools
|
||||||
"sDom": 'Rr<"H"CT>t<"F">',
|
"sDom": 'Rr<"H"CT>t',
|
||||||
|
|
||||||
"sAjaxDataProp": "schedule",
|
"sAjaxDataProp": "schedule",
|
||||||
"sAjaxSource": "/showbuilder/builder-feed"
|
"sAjaxSource": "/showbuilder/builder-feed"
|
||||||
|
|
|
@ -135,7 +135,8 @@ $(document).ready(function(){
|
||||||
var $button = $(this),
|
var $button = $(this),
|
||||||
$lib = $("#library_content"),
|
$lib = $("#library_content"),
|
||||||
$builder = $("#show_builder"),
|
$builder = $("#show_builder"),
|
||||||
oTable = $("#show_builder_table").dataTable();
|
schedTable = $("#show_builder_table").dataTable(),
|
||||||
|
libTable = $lib.find("#library_display").dataTable();
|
||||||
|
|
||||||
if ($button.hasClass("sb-edit")) {
|
if ($button.hasClass("sb-edit")) {
|
||||||
|
|
||||||
|
@ -160,7 +161,7 @@ $(document).ready(function(){
|
||||||
$button.val("Add Files");
|
$button.val("Add Files");
|
||||||
}
|
}
|
||||||
|
|
||||||
oTable.fnDraw();
|
schedTable.fnDraw();
|
||||||
});
|
});
|
||||||
|
|
||||||
oRange = fnGetScheduleRange();
|
oRange = fnGetScheduleRange();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue