Fix bug where library would sometimes reference wrong table
This commit is contained in:
parent
ca51dcf3ae
commit
a24565669b
2 changed files with 15 additions and 11 deletions
|
@ -869,17 +869,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
}
|
||||
|
||||
var selected = $("a[href$='"+location.hash+"']");
|
||||
if (selected.parent().data("selection-id") == AIRTIME.library.MediaTypeIntegerEnum.PODCAST) {
|
||||
$("#library_display_wrapper").hide();
|
||||
$('#podcast_table_wrapper').show();
|
||||
oTable = mod.podcastDataTable;
|
||||
} else {
|
||||
$('#podcast_table_wrapper').hide();
|
||||
$("#library_display_wrapper").show();
|
||||
oTable = mod.libraryDataTable;
|
||||
}
|
||||
|
||||
AIRTIME.library.setCurrentTable();
|
||||
setColumnFilter(oTable);
|
||||
oTable.fnSetFilteringDelay(350);
|
||||
|
||||
|
@ -1263,6 +1253,18 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
};
|
||||
|
||||
mod.setCurrentTable = function() {
|
||||
var selected = $("a[href$='"+location.hash+"']");
|
||||
if (selected.parent().data("selection-id") == AIRTIME.library.MediaTypeIntegerEnum.PODCAST) {
|
||||
$("#library_display_wrapper").hide();
|
||||
$('#podcast_table_wrapper').show();
|
||||
oTable = mod.podcastDataTable;
|
||||
} else {
|
||||
$('#podcast_table_wrapper').hide();
|
||||
$("#library_display_wrapper").show();
|
||||
oTable = mod.libraryDataTable;
|
||||
}
|
||||
};
|
||||
|
||||
/** Create the podcast datatable widget */
|
||||
mod.initPodcastDatatable = function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue