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+"']");
|
AIRTIME.library.setCurrentTable();
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
setColumnFilter(oTable);
|
setColumnFilter(oTable);
|
||||||
oTable.fnSetFilteringDelay(350);
|
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 */
|
/** Create the podcast datatable widget */
|
||||||
mod.initPodcastDatatable = function()
|
mod.initPodcastDatatable = function()
|
||||||
|
|
|
@ -151,6 +151,8 @@ AIRTIME = (function(AIRTIME) {
|
||||||
t = AIRTIME.library.libraryDataTable;
|
t = AIRTIME.library.libraryDataTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AIRTIME.library.setCurrentTable();
|
||||||
|
|
||||||
dashboardLink.find("a").attr("href", selected.attr("href"));
|
dashboardLink.find("a").attr("href", selected.attr("href"));
|
||||||
AIRTIME.library.selectNone();
|
AIRTIME.library.selectNone();
|
||||||
$(".media_type_selector").each(function () {
|
$(".media_type_selector").each(function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue