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

update dialogs

This commit is contained in:
Luke Pulverenti 2016-08-07 02:15:03 -04:00
parent c71f597c58
commit afc7e51fc8
33 changed files with 152 additions and 139 deletions

View file

@ -1,8 +1,15 @@
.promptDialog {
border-radius: .25em !important;
}
.dialogButtons {
.promptDialogContent {
padding: 1em 1.6em;
}
.promptDialogButtons {
position: relative;
padding: 0 !important;
margin: 1em;
margin: 1em 0;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
@ -14,13 +21,13 @@
justify-content: flex-end;
}
.dialogButton {
.promptDialogButton {
color: #52B54B;
padding: 0.35em 1em;
margin: 0;
}
.dialogButton:focus {
.promptDialogButton:focus {
color: #fff;
background-color: #52B54B;
}

View file

@ -36,8 +36,13 @@ define(['layoutManager', 'globalize', 'css!./dialog'], function (layoutManager,
}
var dlg = dialogHelper.createDialog(dialogOptions);
dlg.classList.add('promptDialog');
var html = '';
html += '<div class="promptDialogContent">';
if (options.title) {
html += '<h2>' + options.title + '</h2>';
}
@ -48,16 +53,17 @@ define(['layoutManager', 'globalize', 'css!./dialog'], function (layoutManager,
html += '<div style="margin:1em 0;">' + text + '</div>';
}
html += '<div class="dialogButtons">';
html += '<div class="promptDialogButtons">';
var i, length;
for (i = 0, length = options.buttons.length; i < length; i++) {
var item = options.buttons[i];
var autoFocus = i == 0 ? ' autofocus' : '';
html += '<button is="emby-button" type="button" class="btnOption dialogButton" data-id="' + item.id + '"' + autoFocus + '>' + item.name + '</button>';
html += '<button is="emby-button" type="button" class="btnOption promptDialogButton" data-id="' + item.id + '"' + autoFocus + '>' + item.name + '</button>';
}
html += '</div>';
html += '</div>';
dlg.innerHTML = html;