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

@ -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;