mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix events
This commit is contained in:
parent
d2d9f83bcd
commit
776f430ef7
3 changed files with 12 additions and 37 deletions
|
@ -229,8 +229,8 @@
|
||||||
function onMainDrawerSelect(e) {
|
function onMainDrawerSelect(e) {
|
||||||
|
|
||||||
var drawer = e.target;
|
var drawer = e.target;
|
||||||
if (drawer.selected == 'main') {
|
|
||||||
|
|
||||||
|
if (drawer.selected != 'drawer') {
|
||||||
document.body.classList.remove('bodyWithPopupOpen');
|
document.body.classList.remove('bodyWithPopupOpen');
|
||||||
document.querySelector('.mainDrawerPanel #drawer').classList.remove('verticalScrollingDrawer');
|
document.querySelector('.mainDrawerPanel #drawer').classList.remove('verticalScrollingDrawer');
|
||||||
} else {
|
} else {
|
||||||
|
@ -1061,9 +1061,8 @@ $.fn.createHoverTouch = function () {
|
||||||
|
|
||||||
var isCurrentNavBack = false;
|
var isCurrentNavBack = false;
|
||||||
|
|
||||||
window.addEventListener("navigate", function (e) {
|
$(window).on("navigate", function (e, data) {
|
||||||
|
data = data.state || {};
|
||||||
var data = e.detail.state || {};
|
|
||||||
isCurrentNavBack = data.direction == 'back';
|
isCurrentNavBack = data.direction == 'back';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,15 @@
|
||||||
this._on(this.document, { "focusin": "_handleDocumentFocusIn" });
|
this._on(this.document, { "focusin": "_handleDocumentFocusIn" });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_delay: function (handler, delay) {
|
||||||
|
function handlerProxy() {
|
||||||
|
return (typeof handler === "string" ? instance[handler] : handler)
|
||||||
|
.apply(instance, arguments);
|
||||||
|
}
|
||||||
|
var instance = this;
|
||||||
|
return setTimeout(handlerProxy, delay || 0);
|
||||||
|
},
|
||||||
|
|
||||||
_enhance: function (theElement, myId) {
|
_enhance: function (theElement, myId) {
|
||||||
var currentOptions = this.options,
|
var currentOptions = this.options,
|
||||||
wrapperClass = currentOptions.wrapperClass,
|
wrapperClass = currentOptions.wrapperClass,
|
||||||
|
|
|
@ -1457,39 +1457,6 @@
|
||||||
element.unbind(eventName).undelegate(eventName);
|
element.unbind(eventName).undelegate(eventName);
|
||||||
},
|
},
|
||||||
|
|
||||||
_delay: function (handler, delay) {
|
|
||||||
function handlerProxy() {
|
|
||||||
return (typeof handler === "string" ? instance[handler] : handler)
|
|
||||||
.apply(instance, arguments);
|
|
||||||
}
|
|
||||||
var instance = this;
|
|
||||||
return setTimeout(handlerProxy, delay || 0);
|
|
||||||
},
|
|
||||||
|
|
||||||
_hoverable: function (element) {
|
|
||||||
this.hoverable = this.hoverable.add(element);
|
|
||||||
this._on(element, {
|
|
||||||
mouseenter: function (event) {
|
|
||||||
$(event.currentTarget).addClass("ui-state-hover");
|
|
||||||
},
|
|
||||||
mouseleave: function (event) {
|
|
||||||
$(event.currentTarget).removeClass("ui-state-hover");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusable: function (element) {
|
|
||||||
this.focusable = this.focusable.add(element);
|
|
||||||
this._on(element, {
|
|
||||||
focusin: function (event) {
|
|
||||||
$(event.currentTarget).addClass("ui-state-focus");
|
|
||||||
},
|
|
||||||
focusout: function (event) {
|
|
||||||
$(event.currentTarget).removeClass("ui-state-focus");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_trigger: function (type, event, data) {
|
_trigger: function (type, event, data) {
|
||||||
var prop, orig,
|
var prop, orig,
|
||||||
callback = this.options[type];
|
callback = this.options[type];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue