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

fix notification button

This commit is contained in:
Luke Pulverenti 2015-11-28 23:32:22 -05:00
parent 2b72b53233
commit 49b8dc28b5
10 changed files with 22 additions and 15 deletions

View file

@ -7,7 +7,7 @@
// Try to make it react quicker to the orientation change // Try to make it react quicker to the orientation change
doc.scrollTop(doc.scrollTop() + 1); doc.scrollTop(doc.scrollTop() + 1);
$('paper-tabs').filter(':visible').hide().show(); //$('paper-tabs').filter(':visible').hide().show();
} }
function onOrientationChange() { function onOrientationChange() {
@ -18,6 +18,6 @@
} }
} }
$(window).on('orientationchange', onOrientationChange); window.addEventListener('orientationchange', onOrientationChange);
})(); })();

View file

@ -182,7 +182,7 @@
pageIdOn('pageinit', "indexPage", initHomePage); pageIdOn('pageinit', "indexPage", initHomePage);
pageIdOn('pageshow', "favoritesPage", function () { pageIdOn('pagebeforeshow', "favoritesPage", function () {
var page = this; var page = this;

View file

@ -1231,7 +1231,12 @@
renderThemeSongs(page, themeSongs); renderThemeSongs(page, themeSongs);
renderThemeVideos(page, themeVideos); renderThemeVideos(page, themeVideos);
$(page).trigger('thememediadownload', [result]); page.dispatchEvent(new CustomEvent("thememediadownload", {
detail: {
themeMediaResult: result
}
}));
}); });
} }

View file

@ -143,6 +143,10 @@
var viewMenuBar = document.querySelector(".viewMenuBar"); var viewMenuBar = document.querySelector(".viewMenuBar");
initHeadRoom(viewMenuBar); initHeadRoom(viewMenuBar);
viewMenuBar.querySelector('.btnNotifications').addEventListener('click', function () {
Dashboard.navigate('notificationlist.html');
});
} }
function getItemHref(item, context) { function getItemHref(item, context) {

View file

@ -347,7 +347,7 @@
}); });
}); });
pageIdOn('pageshow', "moviesPage", function () { pageIdOn('pagebeforeshow', "moviesPage", function () {
var page = this; var page = this;

View file

@ -285,7 +285,7 @@
window.MusicPage.renderSuggestedTab = loadSuggestionsTab; window.MusicPage.renderSuggestedTab = loadSuggestionsTab;
window.MusicPage.initSuggestedTab = initSuggestedTab; window.MusicPage.initSuggestedTab = initSuggestedTab;
$(document).on('pageinit', "#musicRecommendedPage", function () { pageIdOn('pageinit', "musicRecommendedPage", function () {
var page = this; var page = this;
@ -306,7 +306,9 @@
loadTab(page, parseInt(e.target.selected)); loadTab(page, parseInt(e.target.selected));
}); });
}).on('pageshow', "#musicRecommendedPage", function () { });
pageIdOn('pagebeforeshow', "musicRecommendedPage", function () {
var page = this; var page = this;

View file

@ -180,12 +180,6 @@
$(apiClient).off("websocketmessage", onWebSocketMessage).on("websocketmessage", onWebSocketMessage); $(apiClient).off("websocketmessage", onWebSocketMessage).on("websocketmessage", onWebSocketMessage);
} }
document.addEventListener('headercreated', function () {
$('.btnNotifications').on('click', function () {
Dashboard.navigate('notificationlist.html');
});
});
if (window.ApiClient) { if (window.ApiClient) {
initializeApiClient(window.ApiClient); initializeApiClient(window.ApiClient);
} }

View file

@ -2231,6 +2231,7 @@ var AppInfo = {};
depends.push('jqmcollapsible'); depends.push('jqmcollapsible');
depends.push('jqmcontrolgroup'); depends.push('jqmcontrolgroup');
depends.push('jqmcheckbox'); depends.push('jqmcheckbox');
depends.push('scripts/notifications');
} }
require(depends, function () { require(depends, function () {
@ -2324,7 +2325,6 @@ var AppInfo = {};
} }
postInitDependencies.push('scripts/thememediaplayer'); postInitDependencies.push('scripts/thememediaplayer');
postInitDependencies.push('scripts/notifications');
postInitDependencies.push('scripts/remotecontrol'); postInitDependencies.push('scripts/remotecontrol');
require(postInitDependencies); require(postInitDependencies);

View file

@ -59,12 +59,13 @@
return MediaController.getCurrentPlayer(); return MediaController.getCurrentPlayer();
} }
Events.on(document, 'thememediadownload', function (e, themeMediaResult) { document.addEventListener('thememediadownload', function (e) {
if (!enabled()) { if (!enabled()) {
return; return;
} }
var themeMediaResult = e.detail.themeMediaResult;
var ownerId = themeMediaResult.ThemeSongsResult.OwnerId; var ownerId = themeMediaResult.ThemeSongsResult.OwnerId;
if (ownerId != currentOwnerId) { if (ownerId != currentOwnerId) {

View file

@ -1929,6 +1929,7 @@
dependencies.push('jqmcollapsible'); dependencies.push('jqmcollapsible');
dependencies.push('jqmcontrolgroup'); dependencies.push('jqmcontrolgroup');
dependencies.push('jqmcheckbox'); dependencies.push('jqmcheckbox');
dependencies.push('scripts/notifications');
} }
require(dependencies, function () { require(dependencies, function () {