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

switch to shared paperdialoghelper

This commit is contained in:
Luke Pulverenti 2016-01-30 15:59:09 -05:00
parent 1cd7f5bac7
commit 024642e556
24 changed files with 152 additions and 296 deletions

View file

@ -15,12 +15,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.0.32",
"_release": "1.0.32",
"version": "1.0.35",
"_release": "1.0.35",
"_resolution": {
"type": "version",
"tag": "1.0.32",
"commit": "4f59bdceba30ab8a9e1bf4c7d6bacd659d27b9bb"
"tag": "1.0.35",
"commit": "3fbcae2c9495ad83a36aa1bcf34f985f979923e7"
},
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.0.0",

View file

@ -1,17 +1,19 @@
.paperDialog {
margin: 0;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: fixed;
max-width: none !important;
max-height: none !important;
display: flex;
align-items: center;
justify-content: center;
}
.paperDialog.fixedSize {
position: fixed !important;
top: 0 !important;
bottom: 0 !important;
left: 0 !important;
right: 0 !important;
margin: 0 !important;
border-radius: 0 !important;
max-height: none !important;
max-width: none !important;
}
.paperDialog.scrollY {
overflow-y: auto;
-webkit-overflow-scrolling: touch;
@ -25,4 +27,36 @@
.paperDialog.hiddenScroll {
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
}
}
@media all and (min-width: 1280px) and (min-height: 720px) {
.paperDialog.medium {
top: 10% !important;
bottom: 10% !important;
left: 10% !important;
right: 10% !important;
}
.paperDialog.small {
top: 10% !important;
bottom: 10% !important;
left: 20% !important;
right: 20% !important;
}
}
@media all and (min-width: 1280px) and (min-height: 720px) {
.paperDialog.fullscreen-border {
top: 5% !important;
bottom: 5% !important;
left: 5% !important;
right: 5% !important;
}
}
.noScroll {
overflow-x: hidden !important;
overflow-y: hidden !important;
}

View file

@ -5,6 +5,7 @@
var self = this;
self.originalUrl = window.location.href;
var activeElement = document.activeElement;
var removeScrollLockOnClose = false;
function onHashChange(e) {
@ -22,9 +23,8 @@
function onDialogClosed() {
if (lockDocumentScroll !== false) {
// TODO
//Dashboard.onPopupClose();
if (removeScrollLockOnClose) {
document.body.classList.remove('noScroll');
}
window.removeEventListener('popstate', onHashChange);
@ -55,9 +55,9 @@
dlg.addEventListener('iron-overlay-closed', onDialogClosed);
dlg.open();
if (lockDocumentScroll !== false) {
// TODO
//Dashboard.onPopupOpen();
if (lockDocumentScroll !== false && !document.body.classList.contains('noScroll')) {
document.body.classList.add('noScroll');
removeScrollLockOnClose = true;
}
historyManager.pushState({ dialogId: hash }, "Dialog", hash);
@ -135,7 +135,14 @@
dlg.setAttribute('data-removeonclose', 'true');
}
dlg.addEventListener('iron-overlay-opened', onDialogOpened);
if (options.size) {
dlg.classList.add('fixedSize');
dlg.classList.add(options.size);
}
if (options.autoFocus !== false) {
dlg.addEventListener('iron-overlay-opened', onDialogOpened);
}
return dlg;
}

View file

@ -29,14 +29,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": [],
"homepage": "https://github.com/PolymerElements/iron-behaviors",
"homepage": "https://github.com/polymerelements/iron-behaviors",
"_release": "1.0.12",
"_resolution": {
"type": "version",
"tag": "v1.0.12",
"commit": "657f526a2382a659cdf4e13be87ecc89261588a3"
},
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
"_source": "git://github.com/polymerelements/iron-behaviors.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-behaviors"
"_originalSource": "polymerelements/iron-behaviors"
}