mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
paperdialoghelper -> dialogHelper
This commit is contained in:
parent
822553d966
commit
ae421fa193
37 changed files with 168 additions and 163 deletions
|
@ -16,12 +16,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.1.80",
|
||||
"_release": "1.1.80",
|
||||
"version": "1.1.81",
|
||||
"_release": "1.1.81",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.1.80",
|
||||
"commit": "babf2d95fc689946e18922a8c9a782ad40d250fa"
|
||||
"tag": "1.1.81",
|
||||
"commit": "73f83352f8263cc516f9756c39791a0e38031c27"
|
||||
},
|
||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "~1.1.5",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['paperdialoghelper', 'layoutManager', 'dialogText', 'paper-button', 'css!./actionsheet'], function (paperdialoghelper, layoutManager, dialogText) {
|
||||
define(['dialogHelper', 'layoutManager', 'dialogText', 'paper-button', 'css!./actionsheet'], function (dialogHelper, layoutManager, dialogText) {
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
|||
dialogOptions.autoFocus = false;
|
||||
}
|
||||
|
||||
var dlg = paperdialoghelper.createDialog(dialogOptions);
|
||||
var dlg = dialogHelper.createDialog(dialogOptions);
|
||||
|
||||
dlg.classList.add('actionSheet');
|
||||
|
||||
|
@ -213,7 +213,7 @@
|
|||
|
||||
var selectedId = actionSheetMenuItem.getAttribute('data-id');
|
||||
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
|
||||
// Add a delay here to allow the click animation to finish, for nice effect
|
||||
setTimeout(function () {
|
||||
|
@ -229,7 +229,7 @@
|
|||
|
||||
});
|
||||
|
||||
paperdialoghelper.open(dlg);
|
||||
dialogHelper.open(dlg);
|
||||
|
||||
if (pos) {
|
||||
dlg.style.position = 'fixed';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['paperdialoghelper', 'layoutManager', 'dialogText', 'html!./../prompt/icons.html', 'css!./../prompt/style.css', 'paper-button', 'paper-input'], function (paperdialoghelper, layoutManager, dialogText) {
|
||||
define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../prompt/icons.html', 'css!./../prompt/style.css', 'paper-button', 'paper-input'], function (dialogHelper, layoutManager, dialogText) {
|
||||
|
||||
return function (options) {
|
||||
|
||||
|
@ -27,7 +27,7 @@ define(['paperdialoghelper', 'layoutManager', 'dialogText', 'html!./../prompt/ic
|
|||
dialogOptions.exitAnimationDuration = 200;
|
||||
}
|
||||
|
||||
var dlg = paperdialoghelper.createDialog(dialogOptions);
|
||||
var dlg = dialogHelper.createDialog(dialogOptions);
|
||||
|
||||
dlg.classList.add('promptDialog');
|
||||
|
||||
|
@ -73,9 +73,9 @@ define(['paperdialoghelper', 'layoutManager', 'dialogText', 'html!./../prompt/ic
|
|||
|
||||
dlg.querySelector('.btnSubmit').addEventListener('click', function (e) {
|
||||
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
});
|
||||
|
||||
return paperdialoghelper.open(dlg);
|
||||
return dialogHelper.open(dlg);
|
||||
};
|
||||
});
|
|
@ -39,7 +39,7 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
|
|||
});
|
||||
}
|
||||
|
||||
function showConfirmInternal(options, paperdialoghelper, resolve, reject) {
|
||||
function showConfirmInternal(options, dialogHelper, resolve, reject) {
|
||||
|
||||
var dialogOptions = {
|
||||
removeOnClose: true
|
||||
|
@ -59,7 +59,7 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
|
|||
dialogOptions.autoFocus = false;
|
||||
}
|
||||
|
||||
var dlg = paperdialoghelper.createDialog(dialogOptions);
|
||||
var dlg = dialogHelper.createDialog(dialogOptions);
|
||||
var html = '';
|
||||
|
||||
if (options.title) {
|
||||
|
@ -84,14 +84,14 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
|
|||
var confirmed = false;
|
||||
dlg.querySelector('.btnConfirm').addEventListener('click', function () {
|
||||
confirmed = true;
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
});
|
||||
dlg.querySelector('.btnCancel').addEventListener('click', function () {
|
||||
confirmed = false;
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
});
|
||||
|
||||
paperdialoghelper.open(dlg).then(function () {
|
||||
dialogHelper.open(dlg).then(function () {
|
||||
|
||||
if (confirmed) {
|
||||
resolve();
|
||||
|
@ -104,8 +104,8 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
|
|||
function showConfirm(options) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['paperdialoghelper', 'paper-button'], function (paperdialoghelper) {
|
||||
showConfirmInternal(options, paperdialoghelper, resolve, reject);
|
||||
require(['dialogHelper', 'paper-button'], function (dialogHelper) {
|
||||
showConfirmInternal(options, dialogHelper, resolve, reject);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.paperDialog {
|
||||
.dialog {
|
||||
margin: 0;
|
||||
border-radius: 4px;
|
||||
z-index: 999999 !important;
|
||||
|
@ -15,7 +15,7 @@
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.paperDialog.fixedSize {
|
||||
.dialog.fixedSize {
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
bottom: 0 !important;
|
||||
|
@ -28,31 +28,31 @@
|
|||
width: auto;
|
||||
}
|
||||
|
||||
.paperDialog.scrollY {
|
||||
.dialog.scrollY {
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.paperDialog.hiddenScroll::-webkit-scrollbar {
|
||||
.dialog.hiddenScroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.paperDialog.hiddenScroll {
|
||||
.dialog.hiddenScroll {
|
||||
-ms-overflow-style: none;
|
||||
overflow: -moz-scrollbars-none;
|
||||
}
|
||||
|
||||
@media all and (min-width: 1280px) and (min-height: 720px) {
|
||||
|
||||
.paperDialog.medium {
|
||||
.dialog.medium {
|
||||
top: 10% !important;
|
||||
bottom: 10% !important;
|
||||
left: 10% !important;
|
||||
right: 10% !important;
|
||||
}
|
||||
|
||||
.paperDialog.small {
|
||||
.dialog.small {
|
||||
top: 10% !important;
|
||||
bottom: 10% !important;
|
||||
left: 20% !important;
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
@media all and (min-width: 1280px) and (min-height: 720px) {
|
||||
|
||||
.paperDialog.fullscreen-border {
|
||||
.dialog.fullscreen-border {
|
||||
top: 5% !important;
|
||||
bottom: 5% !important;
|
||||
left: 5% !important;
|
||||
|
@ -75,16 +75,16 @@
|
|||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
.paperDialog > * {
|
||||
.dialog > * {
|
||||
margin-top: 20px;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
.paperDialog > *:first-child {
|
||||
.dialog > *:first-child {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.paperDialog .buttons {
|
||||
.dialog .buttons {
|
||||
position: relative;
|
||||
padding: 8px 8px 8px 24px;
|
||||
margin: 0;
|
||||
|
@ -117,12 +117,12 @@
|
|||
opacity: .6;
|
||||
}
|
||||
|
||||
.paperDialog::backdrop {
|
||||
.dialog::backdrop {
|
||||
opacity: 0;
|
||||
background-color: #000;
|
||||
transition: opacity ease-out 0.2s;
|
||||
}
|
||||
|
||||
.paperDialog.opened::backdrop {
|
||||
.dialog.opened::backdrop {
|
||||
opacity: .6;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
define(['historyManager', 'focusManager', 'browser', 'layoutManager', 'inputManager', 'css!./paperdialoghelper.css'], function (historyManager, focusManager, browser, layoutManager, inputManager) {
|
||||
define(['historyManager', 'focusManager', 'browser', 'layoutManager', 'inputManager', 'css!./dialoghelper.css'], function (historyManager, focusManager, browser, layoutManager, inputManager) {
|
||||
|
||||
function paperDialogHashHandler(dlg, hash, resolve) {
|
||||
function dialogHashHandler(dlg, hash, resolve) {
|
||||
|
||||
var self = this;
|
||||
self.originalUrl = window.location.href;
|
||||
|
@ -147,7 +147,7 @@
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
new paperDialogHashHandler(dlg, 'dlg' + new Date().getTime(), resolve);
|
||||
new dialogHashHandler(dlg, 'dlg' + new Date().getTime(), resolve);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -271,6 +271,11 @@
|
|||
|
||||
var dlg = document.createElement('dialog');
|
||||
|
||||
// If there's no native dialog support, use a plain div
|
||||
if (!dlg.showModal) {
|
||||
dlg = document.createElement('div');
|
||||
}
|
||||
|
||||
dlg.classList.add('hide');
|
||||
|
||||
if (shouldLockDocumentScroll(options)) {
|
||||
|
@ -322,7 +327,7 @@
|
|||
dlg.exitAnimation = null;
|
||||
}
|
||||
|
||||
dlg.classList.add('paperDialog');
|
||||
dlg.classList.add('dialog');
|
||||
|
||||
dlg.classList.add('scrollY');
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
define(['paperdialoghelper', 'layoutManager', 'dialogText', 'html!./icons.html', 'css!./style.css', 'paper-button', 'paper-input'], function (paperdialoghelper, layoutManager, dialogText) {
|
||||
define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./icons.html', 'css!./style.css', 'paper-button', 'paper-input'], function (dialogHelper, layoutManager, dialogText) {
|
||||
|
||||
return function (options) {
|
||||
|
||||
|
@ -27,7 +27,7 @@ define(['paperdialoghelper', 'layoutManager', 'dialogText', 'html!./icons.html',
|
|||
dialogOptions.exitAnimationDuration = 200;
|
||||
}
|
||||
|
||||
var dlg = paperdialoghelper.createDialog(dialogOptions);
|
||||
var dlg = dialogHelper.createDialog(dialogOptions);
|
||||
|
||||
dlg.classList.add('promptDialog');
|
||||
|
||||
|
@ -75,7 +75,7 @@ define(['paperdialoghelper', 'layoutManager', 'dialogText', 'html!./icons.html',
|
|||
dlg.querySelector('form').addEventListener('submit', function (e) {
|
||||
|
||||
submitValue = dlg.querySelector('.txtPromptValue').value;
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
@ -94,10 +94,10 @@ define(['paperdialoghelper', 'layoutManager', 'dialogText', 'html!./icons.html',
|
|||
|
||||
dlg.querySelector('.btnPromptExit').addEventListener('click', function (e) {
|
||||
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
});
|
||||
|
||||
return paperdialoghelper.open(dlg).then(function () {
|
||||
return dialogHelper.open(dlg).then(function () {
|
||||
var value = submitValue;
|
||||
if (value) {
|
||||
return value;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'css!./style', 'html!./icons', 'iron-icon-set', 'paper-fab', 'paper-icon-button', 'paper-spinner'], function (paperdialoghelper, inputmanager, connectionManager, browser) {
|
||||
define(['dialogHelper', 'inputManager', 'connectionManager', 'browser', 'css!./style', 'html!./icons', 'iron-icon-set', 'paper-fab', 'paper-icon-button', 'paper-spinner'], function (dialogHelper, inputmanager, connectionManager, browser) {
|
||||
|
||||
return function (options) {
|
||||
|
||||
|
@ -8,7 +8,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
|
|||
|
||||
function createElements(options) {
|
||||
|
||||
dlg = paperdialoghelper.createDialog({
|
||||
dlg = dialogHelper.createDialog({
|
||||
exitAnimationDuration: options.interactive ? 400 : 800,
|
||||
size: 'fullscreen'
|
||||
});
|
||||
|
@ -40,7 +40,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
|
|||
if (options.interactive) {
|
||||
dlg.querySelector('.btnSlideshowExit').addEventListener('click', function (e) {
|
||||
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
});
|
||||
dlg.querySelector('.btnSlideshowNext').addEventListener('click', nextImage);
|
||||
dlg.querySelector('.btnSlideshowPrevious').addEventListener('click', previousImage);
|
||||
|
@ -49,7 +49,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
|
|||
|
||||
document.body.appendChild(dlg);
|
||||
|
||||
paperdialoghelper.open(dlg).then(function () {
|
||||
dialogHelper.open(dlg).then(function () {
|
||||
|
||||
stopInterval();
|
||||
dlg.parentNode.removeChild(dlg);
|
||||
|
@ -167,7 +167,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
|
|||
if (options.loop === false) {
|
||||
|
||||
if (swiperInstance.activeIndex >= swiperInstance.slides.length - 1) {
|
||||
paperdialoghelper.close(dlg);
|
||||
dialogHelper.close(dlg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ define(['paperdialoghelper', 'inputManager', 'connectionManager', 'browser', 'cs
|
|||
var dialog = dlg;
|
||||
if (dialog) {
|
||||
|
||||
paperdialoghelper.close(dialog);
|
||||
dialogHelper.close(dialog);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||
"_release": "1.0.8",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.8",
|
||||
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-icon"
|
||||
"_originalSource": "PolymerElements/iron-icon"
|
||||
}
|
|
@ -36,7 +36,7 @@
|
|||
"tag": "v1.3.0",
|
||||
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-selector.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-selector"
|
||||
"_originalSource": "PolymerElements/iron-selector"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue