SAAS-1165 - initial work on left-hand pane for podcast episodes

This commit is contained in:
Duncan Sommerville 2015-11-04 13:22:33 -05:00
parent b4ec3eeb3f
commit e7869b54c7
5 changed files with 118 additions and 48 deletions

View file

@ -140,27 +140,21 @@ AIRTIME = (function(AIRTIME) {
$(window).on('hashchange', function() {
var selected = $("a[href$='"+location.hash+"']"),
dashboardLink = $(".media_type_selector:first"),
t;
tableType;
if (selected.parent().data("selection-id") == AIRTIME.library.MediaTypeIntegerEnum.PODCAST) {
$("#library_display_wrapper").hide();
$("#podcast_table_wrapper").show();
t = AIRTIME.library.podcastDataTable;
tableType = AIRTIME.library.DataTableTypeEnum.PODCAST;
} else {
$("#library_display_wrapper").show();
$("#podcast_table_wrapper").hide();
t = AIRTIME.library.libraryDataTable;
tableType = AIRTIME.library.DataTableTypeEnum.LIBRARY;
}
AIRTIME.library.setCurrentTable();
dashboardLink.find("a").attr("href", selected.attr("href"));
AIRTIME.library.selectNone();
$(".media_type_selector").each(function () {
$(this).removeClass("selected");
});
selected.parent().addClass("selected");
t.fnDraw();
AIRTIME.library.setCurrentTable(tableType);
$("#library_filter").text(selected.text());
// Highlight the dashboard link
dashboardLink.addClass("highlight");