1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixes #1958 - Title does not reset on home browse (Web Interface)

This commit is contained in:
Luke Pulverenti 2016-09-02 00:11:10 -04:00
parent 96a169fb05
commit 2737d1f9f9
39 changed files with 97 additions and 139 deletions

View file

@ -368,7 +368,7 @@
var documentTitle = secondaryTitle;
Dashboard.setPageTitle(title, documentTitle);
LibraryMenu.setTitle(title, documentTitle);
} else {
link.classList.remove('selectedSidebarLink');
@ -697,19 +697,8 @@
if (libraryMenuButtonText) {
libraryMenuButtonText.innerHTML = html;
}
},
setBackButtonVisible: function (visible) {
var backButton = document.querySelector('.headerBackButton');
if (backButton) {
if (visible) {
backButton.classList.remove('hide');
} else {
backButton.classList.add('hide');
}
}
document.title = title;
},
setTransparentMenu: function (transparent) {
@ -908,15 +897,8 @@
});
function updateTitle(page) {
var title = page.getAttribute('data-title') || page.getAttribute('data-contextname');
if (!title) {
var titleKey = getParameterByName('titlekey');
if (titleKey) {
title = Globalize.translate(titleKey);
}
}
var title = page.getAttribute('data-title');
if (title) {
LibraryMenu.setTitle(title);
@ -925,18 +907,10 @@
function updateBackButton(page) {
var canGoBack = !page.classList.contains('homePage') && history.length > 0;
var backButton = document.querySelector('.headerBackButton');
var showBackButton = AppInfo.enableBackButton;
if (!showBackButton) {
showBackButton = page.getAttribute('data-backbutton') == 'true';
}
if (backButton) {
if (canGoBack && showBackButton) {
if (Emby.Page.canGoBack()) {
backButton.classList.remove('hide');
} else {
backButton.classList.add('hide');