mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update jquery mobile to use normal browser events
This commit is contained in:
parent
905a6c819e
commit
404073e540
7 changed files with 69 additions and 75 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
function paperDialogHashHandler(dlg, hash, lockDocumentScroll) {
|
||||
|
||||
function onHashChange(e, data) {
|
||||
function onHashChange(e) {
|
||||
|
||||
data = data.state;
|
||||
var data = e.detail.state || {};
|
||||
var isActive = data.hash == '#' + hash;
|
||||
|
||||
if (data.direction == 'back') {
|
||||
|
@ -25,7 +25,7 @@
|
|||
|
||||
dlg = null;
|
||||
if (enableHashChange()) {
|
||||
$(window).off('navigate', onHashChange);
|
||||
window.removeEventListener('navigate', onHashChange);
|
||||
|
||||
if (window.location.hash == '#' + hash) {
|
||||
history.back();
|
||||
|
@ -33,9 +33,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
$(dlg).on('iron-overlay-closed', onDialogClosed);
|
||||
dlg.addEventListener('iron-overlay-closed', onDialogClosed);
|
||||
dlg.open();
|
||||
|
||||
if (lockDocumentScroll !== false) {
|
||||
|
@ -46,7 +44,7 @@
|
|||
|
||||
window.location.hash = hash;
|
||||
|
||||
$(window).on('navigate', onHashChange);
|
||||
window.addEventListener('navigate', onHashChange);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue