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

update action sheet

This commit is contained in:
Luke Pulverenti 2016-01-30 23:04:00 -05:00
parent 79b9a76c6b
commit c959aa01a2
22 changed files with 123 additions and 153 deletions

View file

@ -15,12 +15,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.0.40",
"_release": "1.0.40",
"version": "1.0.42",
"_release": "1.0.42",
"_resolution": {
"type": "version",
"tag": "1.0.40",
"commit": "483fcf8659bb829dd12ec41c629c7ab7c380bbd8"
"tag": "1.0.42",
"commit": "72b4735c586da9d565a9ff268cec1156a71da144"
},
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.0.0",

View file

@ -1,6 +1,6 @@
define(['historyManager', 'focusManager', 'performanceManager', 'browser', 'paper-dialog', 'scale-up-animation', 'fade-out-animation', 'fade-in-animation', 'css!./paperdialoghelper.css'], function (historyManager, focusManager, performanceManager, browser) {
function paperDialogHashHandler(dlg, hash, resolve, lockDocumentScroll) {
function paperDialogHashHandler(dlg, hash, resolve) {
var self = this;
self.originalUrl = window.location.href;
@ -55,7 +55,7 @@
dlg.addEventListener('iron-overlay-closed', onDialogClosed);
dlg.open();
if (lockDocumentScroll !== false && !document.body.classList.contains('noScroll')) {
if (dlg.getAttribute('data-lockscroll') == 'true' && !document.body.classList.contains('noScroll')) {
document.body.classList.add('noScroll');
removeScrollLockOnClose = true;
}
@ -85,6 +85,19 @@
focusManager.autoFocus(e.target);
}
function shouldLockDocumentScroll(options) {
if (options.lockScroll != null) {
return options.lockScroll;
}
if (options.size == 'fullscreen') {
return true;
}
return browser.mobile;
}
function createDialog(options) {
options = options || {};
@ -94,6 +107,10 @@
dlg.setAttribute('with-backdrop', 'with-backdrop');
dlg.setAttribute('role', 'alertdialog');
if (shouldLockDocumentScroll(options)) {
dlg.setAttribute('data-lockscroll', 'true');
}
// without this safari will scroll the background instead of the dialog contents
// but not needed here since this is already on top of an existing dialog
// but skip it in IE because it's causing the entire browser to hang

View file

@ -26,14 +26,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "iron-meta.html",
"homepage": "https://github.com/polymerelements/iron-meta",
"homepage": "https://github.com/PolymerElements/iron-meta",
"_release": "1.1.1",
"_resolution": {
"type": "version",
"tag": "v1.1.1",
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
},
"_source": "git://github.com/polymerelements/iron-meta.git",
"_source": "git://github.com/PolymerElements/iron-meta.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/iron-meta"
"_originalSource": "PolymerElements/iron-meta"
}