mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
trim jquery mobile
This commit is contained in:
parent
316fce063a
commit
301fd258bb
35 changed files with 359 additions and 661 deletions
|
@ -223,7 +223,7 @@
|
|||
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#channelItemsPage", function () {
|
||||
pageIdOn.on('pageinit', "channelItemsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -261,7 +261,9 @@
|
|||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#channelItemsPage", function () {
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforeshow', "channelItemsPage", function () {
|
||||
|
||||
var page = this;
|
||||
reloadFeatures(page);
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#channelsPage", function () {
|
||||
pageIdOn.on('pageinit', "channelsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -79,8 +79,8 @@
|
|||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, 'channels.html');
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
pages.addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(e.target.selected));
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#channelsPage", function () {
|
||||
pageIdOn('pageinit', "channelsPage", function () {
|
||||
|
||||
var page = this;
|
||||
var pages = page.querySelector('neon-animated-pages');
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
pages.addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(e.target.selected));
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -266,11 +266,11 @@
|
|||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, 'index.html');
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
pages.addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(e.target.selected));
|
||||
});
|
||||
|
||||
Events.on(page.querySelector('.btnTakeTour'), 'click', function () {
|
||||
page.querySelector('.btnTakeTour').addEventListener('click', function () {
|
||||
takeTour(page, Dashboard.getCurrentUserId());
|
||||
});
|
||||
|
||||
|
@ -301,7 +301,7 @@
|
|||
var page = $($.mobile.activePage)[0];
|
||||
var pages = page.querySelector('neon-animated-pages');
|
||||
|
||||
$(pages).trigger('tabchange');
|
||||
pages.dispatchEvent(new CustomEvent("tabchange", {}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1945,31 +1945,31 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#itemDetailPage", function () {
|
||||
pageIdOn('pageinit', "itemDetailPage", function() {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.btnPlay', page).on('click', function () {
|
||||
$('.btnPlay', page).on('click', function() {
|
||||
playCurrentItem(this);
|
||||
});
|
||||
|
||||
$('.btnPlayTrailer', page).on('click', function () {
|
||||
$('.btnPlayTrailer', page).on('click', function() {
|
||||
playTrailer(page);
|
||||
});
|
||||
|
||||
$('.btnSplitVersions', page).on('click', function () {
|
||||
$('.btnSplitVersions', page).on('click', function() {
|
||||
|
||||
splitVersions(page);
|
||||
});
|
||||
|
||||
$('.btnSync', page).on('click', function () {
|
||||
$('.btnSync', page).on('click', function() {
|
||||
|
||||
SyncManager.showMenu({
|
||||
items: [currentItem]
|
||||
});
|
||||
});
|
||||
|
||||
$('.btnRecord,.btnFloatingRecord', page).on('click', function () {
|
||||
$('.btnRecord,.btnFloatingRecord', page).on('click', function() {
|
||||
|
||||
var id = getParameterByName('id');
|
||||
|
||||
|
@ -1977,48 +1977,48 @@
|
|||
|
||||
});
|
||||
|
||||
$('.btnCancelRecording', page).on('click', function () {
|
||||
$('.btnCancelRecording', page).on('click', function() {
|
||||
|
||||
deleteTimer(page, currentItem.TimerId);
|
||||
});
|
||||
|
||||
$('.btnMoreCommands', page).on('click', function () {
|
||||
$('.btnMoreCommands', page).on('click', function() {
|
||||
|
||||
var button = this;
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
Dashboard.getCurrentUser().done(function(user) {
|
||||
|
||||
LibraryBrowser.showMoreCommands(button, currentItem.Id, LibraryBrowser.getMoreCommands(currentItem, user));
|
||||
});
|
||||
});
|
||||
|
||||
$('.childrenItemsContainer', page).on('playallfromhere', function (e, index) {
|
||||
$('.childrenItemsContainer', page).on('playallfromhere', function(e, index) {
|
||||
|
||||
LibraryBrowser.playAllFromHere(_childrenItemsFunction, index);
|
||||
|
||||
}).on('queueallfromhere', function (e, index) {
|
||||
}).on('queueallfromhere', function(e, index) {
|
||||
|
||||
LibraryBrowser.queueAllFromHere(_childrenItemsFunction, index);
|
||||
|
||||
});
|
||||
|
||||
$(page).on("click", ".moreScenes", function () {
|
||||
$(page).on("click", ".moreScenes", function() {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
Dashboard.getCurrentUser().done(function(user) {
|
||||
renderScenes(page, currentItem, user);
|
||||
});
|
||||
|
||||
}).on("click", ".morePeople", function () {
|
||||
}).on("click", ".morePeople", function() {
|
||||
|
||||
renderCast(page, currentItem, getContext(currentItem));
|
||||
|
||||
}).on("click", ".moreSpecials", function () {
|
||||
}).on("click", ".moreSpecials", function() {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
Dashboard.getCurrentUser().done(function(user) {
|
||||
renderSpecials(page, currentItem, user);
|
||||
});
|
||||
|
||||
}).on("click", ".moreCriticReviews", function () {
|
||||
}).on("click", ".moreCriticReviews", function() {
|
||||
|
||||
renderCriticReviews(page, currentItem);
|
||||
});
|
||||
|
@ -2028,7 +2028,9 @@
|
|||
// btnMore[i].icon = AppInfo.moreIcon;
|
||||
//}
|
||||
|
||||
}).on('pagebeforeshow', "#itemDetailPage", function () {
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforeshow', "itemDetailPage", function() {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -2038,7 +2040,10 @@
|
|||
|
||||
Events.on(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
||||
|
||||
}).on('pagebeforehide', "#itemDetailPage", function () {
|
||||
});
|
||||
|
||||
|
||||
pageIdOn('pagebeforehide', "itemDetailPage", function () {
|
||||
|
||||
Events.off(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#itemListPage", function () {
|
||||
pageIdOn('pageinit', "itemListPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -276,7 +276,9 @@
|
|||
|
||||
$(page).on('click', '.mediaItem', onListItemClick);
|
||||
|
||||
}).on('pagebeforeshow', "#itemListPage", function () {
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforeshow', "itemListPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -284,7 +286,9 @@
|
|||
updateFilterControls(page);
|
||||
LibraryMenu.setBackButtonVisible(getParameterByName('context'));
|
||||
|
||||
}).on('pagebeforehide', "#itemListPage", function () {
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforehide', "itemListPage", function () {
|
||||
|
||||
currentItem = null;
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@
|
|||
var delay = LibraryBrowser.animatePaperTabs() || !tabs.noSlide ? 500 : 0;
|
||||
|
||||
setTimeout(function () {
|
||||
$(pgs).trigger('tabchange');
|
||||
pgs.dispatchEvent(new CustomEvent("tabchange", {}));
|
||||
}, delay);
|
||||
});
|
||||
|
||||
|
@ -361,7 +361,7 @@
|
|||
return;
|
||||
}
|
||||
}
|
||||
Events.trigger(pages, 'tabchange');
|
||||
pages.dispatchEvent(new CustomEvent("tabchange", {}));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -1208,6 +1208,7 @@
|
|||
MediaController.instantMix(itemId);
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
ImageLoader.lazyChildren(document.querySelector('.viewMenuBar'));
|
||||
|
||||
Events.trigger(document, 'headercreated');
|
||||
document.dispatchEvent(new CustomEvent("headercreated", {}));
|
||||
bindMenuEvents();
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvItemsPage", function () {
|
||||
pageIdOn('pagebeforeshow', "liveTvItemsPage", function () {
|
||||
|
||||
query.ParentId = LibraryMenu.getTopParentId();
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#liveTvSuggestedPage", function () {
|
||||
pageIdOn('pageinit', "liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -200,8 +200,8 @@
|
|||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, 'livetv.html');
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
pages.addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(e.target.selected));
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -1012,17 +1012,21 @@
|
|||
showPlayerSelection();
|
||||
}
|
||||
|
||||
$(document).on('headercreated', function () {
|
||||
document.addEventListener('headercreated', function () {
|
||||
|
||||
$('.btnCast').off('click', onCastButtonClicked).on('click', onCastButtonClicked);
|
||||
|
||||
}).on('pagebeforeshow', ".page", function () {
|
||||
});
|
||||
|
||||
pageClassOn('pagebeforeshow', "page", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
currentDisplayInfo = null;
|
||||
|
||||
}).on('displayingitem', ".libraryPage", function (e, info) {
|
||||
});
|
||||
|
||||
pageClassOn('displayingitem', "libraryPage", function (e, info) {
|
||||
|
||||
currentDisplayInfo = info;
|
||||
|
||||
|
|
|
@ -880,9 +880,9 @@
|
|||
var itemVideo = document.querySelector('.itemVideo');
|
||||
if (itemVideo) {
|
||||
//Events.on(itemVideo, 'mousemove', onMouseMove);
|
||||
Events.on(itemVideo, 'keydown', idleHandler);
|
||||
Events.on(itemVideo, 'scroll', idleHandler);
|
||||
Events.on(itemVideo, 'mousedown', idleHandler);
|
||||
itemVideo.addEventListener('keydown', idleHandler);
|
||||
itemVideo.addEventListener('scroll', idleHandler);
|
||||
itemVideo.addEventListener('mousedown', idleHandler);
|
||||
idleHandler();
|
||||
}
|
||||
}
|
||||
|
@ -914,9 +914,9 @@
|
|||
var itemVideo = document.querySelector('.itemVideo');
|
||||
if (itemVideo) {
|
||||
//Events.off(itemVideo, 'mousemove', onMouseMove);
|
||||
Events.off(itemVideo, 'keydown', idleHandler);
|
||||
Events.off(itemVideo, 'scroll', idleHandler);
|
||||
Events.off(itemVideo, 'mousedown', idleHandler);
|
||||
itemVideo.removeEventListener('keydown', idleHandler);
|
||||
itemVideo.removeEventListener('scroll', idleHandler);
|
||||
itemVideo.removeEventListener('mousedown', idleHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -202,21 +202,23 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#boxsetsPage", function () {
|
||||
|
||||
pageIdOn('pageinit', 'boxsetsPage', function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
var content = page;
|
||||
|
||||
initPage(content);
|
||||
|
||||
}).on('pagebeforeshow', "#boxsetsPage", function () {
|
||||
});
|
||||
pageIdOn('pagebeforeshow', 'boxsetsPage', function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
var content = page;
|
||||
|
||||
reloadItems(content);
|
||||
|
||||
});
|
||||
|
||||
window.MoviesPage = window.MoviesPage || {};
|
||||
|
|
|
@ -340,8 +340,8 @@
|
|||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, baseUrl);
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
pages.addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(e.target.selected));
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -383,7 +383,7 @@
|
|||
var page = $($.mobile.activePage)[0];
|
||||
var pages = page.querySelector('neon-animated-pages');
|
||||
|
||||
$(pages).trigger('tabchange');
|
||||
pages.dispatchEvent(new CustomEvent("tabchange", {}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -302,8 +302,8 @@
|
|||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, baseUrl);
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
pages.addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(e.target.selected));
|
||||
});
|
||||
|
||||
}).on('pageshow', "#musicRecommendedPage", function () {
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
$(apiClient).off("websocketmessage", onWebSocketMessage).on("websocketmessage", onWebSocketMessage);
|
||||
}
|
||||
|
||||
$(document).on('headercreated', function (e, apiClient) {
|
||||
document.addEventListener('headercreated', function () {
|
||||
$('.btnNotifications').on('click', function () {
|
||||
Dashboard.navigate('notificationlist.html');
|
||||
});
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#photosPage", function () {
|
||||
pageIdOn('pageinit', "photosPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -215,8 +215,8 @@
|
|||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, page.querySelector('neon-animated-pages'), baseUrl);
|
||||
|
||||
$(page.querySelector('neon-animated-pages')).on('tabchange', function () {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
page.querySelector('neon-animated-pages').addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(e.target.selected));
|
||||
});
|
||||
|
||||
$(page).on('click', '.mediaItem', onListItemClick);
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#playlistsPage", function () {
|
||||
pageIdOn('pagebeforeshow', "playlistsPage", function () {
|
||||
|
||||
var page = this;
|
||||
reloadItems(page);
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
|
||||
$(document).on('pagecontainerbeforehide', closeSearchResults);
|
||||
|
||||
$(document).on('headercreated', function () {
|
||||
document.addEventListener('headercreated', function () {
|
||||
|
||||
bindSearchEvents();
|
||||
});
|
||||
|
|
|
@ -161,13 +161,15 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#secondaryItemsPage", function () {
|
||||
pageIdOn('pageinit', "secondaryItemsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$(page).on('click', '.mediaItem', onListItemClick);
|
||||
|
||||
}).on('pagebeforeshow', "#secondaryItemsPage", function () {
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforeshow', "secondaryItemsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
|
|
@ -12,12 +12,17 @@
|
|||
cache: false
|
||||
});
|
||||
}
|
||||
|
||||
$.support.cors = true;
|
||||
|
||||
function onOneDocumentClick() {
|
||||
document.removeEventListener('click', onOneDocumentClick);
|
||||
WebNotifications.requestPermission();
|
||||
}
|
||||
document.addEventListener('click', onOneDocumentClick);
|
||||
|
||||
})();
|
||||
|
||||
$.support.cors = true;
|
||||
|
||||
$(document).one('click', WebNotifications.requestPermission);
|
||||
|
||||
var Dashboard = {
|
||||
jQueryMobileInit: function () {
|
||||
|
||||
|
@ -2226,8 +2231,6 @@ var AppInfo = {};
|
|||
});
|
||||
|
||||
define("jqmpanel", ["thirdparty/jquerymobile-1.4.5/jqm.panel"], function () {
|
||||
$.mobile.panel.prototype.options.classes.modalOpen = "largePanelModalOpen ui-panel-dismiss-open";
|
||||
$.mobile.panel.prototype.options.classes.panel = "largePanel ui-panel";
|
||||
|
||||
Dashboard.importCss('thirdparty/jquerymobile-1.4.5/jqm.panel.css');
|
||||
return {};
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
|
||||
LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, baseUrl);
|
||||
|
||||
$(pages).on('tabchange', function () {
|
||||
pages.addEventListener('tabchange', function (e) {
|
||||
loadTab(page, parseInt(this.selected));
|
||||
});
|
||||
});
|
||||
|
@ -313,7 +313,7 @@
|
|||
var page = $($.mobile.activePage)[0];
|
||||
var pages = page.querySelector('neon-animated-pages');
|
||||
|
||||
$(pages).trigger('tabchange');
|
||||
pages.dispatchEvent(new CustomEvent("tabchange", {}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue