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

rework dialogs

This commit is contained in:
Luke Pulverenti 2016-03-22 13:46:57 -04:00
parent 5a71a65637
commit 5b66bb9ecb
39 changed files with 486 additions and 121 deletions

View file

@ -55,7 +55,7 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
dialogOptions.modal = false;
dialogOptions.entryAnimationDuration = 160;
dialogOptions.exitAnimationDuration = 200;
dialogOptions.exitAnimationDuration = 160;
dialogOptions.autoFocus = false;
}
@ -72,18 +72,26 @@ define(['layoutManager', 'dialogText'], function (layoutManager, dialogText) {
html += '<div class="buttons">';
html += '<paper-button class="btnConfirm" dialog-confirm autofocus>' + dialogText.get('Ok') + '</paper-button>';
html += '<paper-button class="btnConfirm" autofocus>' + dialogText.get('Ok') + '</paper-button>';
html += '<paper-button dialog-dismiss>' + dialogText.get('Cancel') + '</paper-button>';
html += '<paper-button class="btnCancel">' + dialogText.get('Cancel') + '</paper-button>';
html += '</div>';
dlg.innerHTML = html;
document.body.appendChild(dlg);
paperdialoghelper.open(dlg).then(function () {
var confirmed = false;
dlg.querySelector('.btnConfirm').addEventListener('click', function () {
confirmed = true;
paperdialoghelper.close(dlg);
});
dlg.querySelector('.btnCancel').addEventListener('click', function () {
confirmed = false;
paperdialoghelper.close(dlg);
});
var confirmed = dlg.closingReason.confirmed;
paperdialoghelper.open(dlg).then(function () {
if (confirmed) {
resolve();