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:
parent
96a169fb05
commit
2737d1f9f9
39 changed files with 97 additions and 139 deletions
|
@ -303,23 +303,23 @@
|
|||
|
||||
if (context == 'sync') {
|
||||
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Sync');
|
||||
Dashboard.setPageTitle(Globalize.translate('TitleSync'));
|
||||
LibraryMenu.setTitle(Globalize.translate('TitleSync'));
|
||||
}
|
||||
else if (context == 'livetv') {
|
||||
|
||||
Dashboard.setPageTitle(Globalize.translate('TitleLiveTV'));
|
||||
LibraryMenu.setTitle(Globalize.translate('TitleLiveTV'));
|
||||
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Live%20TV');
|
||||
}
|
||||
else if (context == 'notifications') {
|
||||
|
||||
$('.notificationsTabs', page).show();
|
||||
|
||||
Dashboard.setPageTitle(Globalize.translate('TitleNotifications'));
|
||||
LibraryMenu.setTitle(Globalize.translate('TitleNotifications'));
|
||||
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Notifications');
|
||||
}
|
||||
else {
|
||||
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Plugins');
|
||||
Dashboard.setPageTitle(Globalize.translate('TitlePlugins'));
|
||||
LibraryMenu.setTitle(Globalize.translate('TitlePlugins'));
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -83,15 +83,15 @@
|
|||
var context = getParameterByName('context');
|
||||
|
||||
if (context == 'sync') {
|
||||
Dashboard.setPageTitle(Globalize.translate('TitleSync'));
|
||||
LibraryMenu.setTitle(Globalize.translate('TitleSync'));
|
||||
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Sync');
|
||||
}
|
||||
else if (context == 'livetv') {
|
||||
Dashboard.setPageTitle(Globalize.translate('TitleLiveTV'));
|
||||
LibraryMenu.setTitle(Globalize.translate('TitleLiveTV'));
|
||||
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Live%20TV');
|
||||
}
|
||||
else if (context == 'notifications') {
|
||||
Dashboard.setPageTitle(Globalize.translate('TitleNotifications'));
|
||||
LibraryMenu.setTitle(Globalize.translate('TitleNotifications'));
|
||||
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Notifications');
|
||||
}
|
||||
|
||||
|
|
|
@ -100,8 +100,6 @@
|
|||
|
||||
var context = params.context;
|
||||
|
||||
LibraryMenu.setBackButtonVisible(true);
|
||||
|
||||
LibraryBrowser.renderName(item, page.querySelector('.itemName'), false, context);
|
||||
LibraryBrowser.renderParentName(item, page.querySelector('.parentName'), context);
|
||||
LibraryMenu.setTitle(item.SeriesName || item.Name);
|
||||
|
|
|
@ -361,7 +361,6 @@
|
|||
view.addEventListener('viewbeforeshow', function (e) {
|
||||
reloadItems(view);
|
||||
updateFilterControls();
|
||||
LibraryMenu.setBackButtonVisible(params.context);
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function (e) {
|
||||
|
|
|
@ -423,7 +423,7 @@
|
|||
includeParentInfo: false
|
||||
});
|
||||
|
||||
Dashboard.setPageTitle(name);
|
||||
LibraryMenu.setTitle(name);
|
||||
|
||||
if (linkToElement) {
|
||||
nameElem.innerHTML = '<a class="detailPageParentLink" href="' + LibraryBrowser.getHref(item, context) + '">' + name + '</a>';
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
uploadUserImage.value = '';
|
||||
uploadUserImage.dispatchEvent(new CustomEvent('change', {}));
|
||||
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
LibraryMenu.setTitle(user.Name);
|
||||
|
||||
var imageUrl;
|
||||
|
||||
|
|
|
@ -591,16 +591,6 @@ var Dashboard = {
|
|||
}
|
||||
},
|
||||
|
||||
setPageTitle: function (title, documentTitle) {
|
||||
|
||||
LibraryMenu.setTitle(title || 'Emby');
|
||||
|
||||
documentTitle = documentTitle || title;
|
||||
if (documentTitle) {
|
||||
document.title = documentTitle;
|
||||
}
|
||||
},
|
||||
|
||||
getSupportedRemoteCommands: function () {
|
||||
|
||||
// Full list
|
||||
|
@ -966,8 +956,6 @@ var AppInfo = {};
|
|||
|
||||
AppInfo.hasPhysicalVolumeButtons = isCordova || browserInfo.mobile;
|
||||
|
||||
AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
|
||||
|
||||
if (isCordova && isIOS) {
|
||||
AppInfo.moreIcon = 'more-horiz';
|
||||
} else {
|
||||
|
@ -2111,7 +2099,8 @@ var AppInfo = {};
|
|||
dependencies: [],
|
||||
autoFocus: false,
|
||||
controller: 'scripts/indexpage',
|
||||
transition: 'fade'
|
||||
transition: 'fade',
|
||||
type: 'home'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
$('.lnkEditUserPreferences', page).attr('href', 'mypreferencesmenu.html?userId=' + user.Id);
|
||||
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
LibraryMenu.setTitle(user.Name);
|
||||
|
||||
$('#txtUserName', page).val(user.Name);
|
||||
$('#txtConnectUserName', page).val(currentUser.ConnectUserName);
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
$(page).trigger('userloaded', [user]);
|
||||
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
LibraryMenu.setTitle(user.Name);
|
||||
|
||||
loadChannels(page, user, channels);
|
||||
loadMediaFolders(page, user, mediaFolders);
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
function loadUser(page, user, allParentalRatings) {
|
||||
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
LibraryMenu.setTitle(user.Name);
|
||||
|
||||
loadUnratedItems(page, user);
|
||||
loadBlockedTags(page, user.Policy.BlockedTags);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
function loadUser(page, user) {
|
||||
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
LibraryMenu.setTitle(user.Name);
|
||||
|
||||
if (user.ConnectLinkType == 'Guest') {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
Dashboard.getCurrentUser().then(function (loggedInUser) {
|
||||
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
LibraryMenu.setTitle(user.Name);
|
||||
|
||||
var showPasswordSection = true;
|
||||
var showLocalAccessSection = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue