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

update events

This commit is contained in:
Luke Pulverenti 2015-11-27 02:24:08 -05:00
parent ab15648bbb
commit f8a1cdd9a2
8 changed files with 151 additions and 600 deletions

View file

@ -674,9 +674,9 @@ var Dashboard = {
});
// Has to be assigned a z-index after the call to .open()
$(dlg).on('iron-overlay-closed', function (e) {
dlg.addEventListener('iron-overlay-closed', function (e) {
this.parentNode.removeChild(this);
dlg.parentNode.removeChild(dlg);
});
dlg.open();
@ -729,9 +729,10 @@ var Dashboard = {
var dlg = document.getElementById(id);
// Has to be assigned a z-index after the call to .open()
$(dlg).on('iron-overlay-closed', function (e) {
var confirmed = this.closingReason.confirmed;
this.parentNode.removeChild(this);
dlg.addEventListener('iron-overlay-closed', function (e) {
var confirmed = dlg.closingReason.confirmed;
dlg.parentNode.removeChild(dlg);
if (callback) {
callback(confirmed);
@ -2009,7 +2010,7 @@ var AppInfo = {};
$(document.body).append(footerHtml);
$(window).on("beforeunload", function () {
window.addEventListener("beforeunload", function () {
var apiClient = window.ApiClient;
@ -2028,14 +2029,6 @@ var AppInfo = {};
}
});
$(document).on('contextmenu', '.ui-popup-screen', function (e) {
$('.ui-popup').popup('close');
e.preventDefault();
return false;
});
if (Dashboard.isRunningInCordova()) {
require(['cordova/connectsdk', 'scripts/registrationservices', 'cordova/back']);
@ -2468,9 +2461,9 @@ var AppInfo = {};
onWebComponentsReady();
} else {
$(document).on('WebComponentsReady', function() {
document.addEventListener('WebComponentsReady', function () {
setTimeout(onWebComponentsReady, 200);
setTimeout(onWebComponentsReady, 300);
});
require(['bower_components/webcomponentsjs/webcomponents-lite.js']);
}