Merge pull request #1322 from MediaBrowser/master

rework dialog headers
This commit is contained in:
Luke 2015-12-15 15:14:45 -05:00
commit 2a46b87ca9
5 changed files with 33 additions and 44 deletions

View File

@ -119,12 +119,9 @@
var html = '';
html += '<form class="newCollectionForm" style="max-width:100%;">';
html += '<br />';
html += '<form class="newCollectionForm" style="margin:auto;">';
html += '<div class="fldSelectCollection">';
html += '<br />';
html += '<label for="selectCollectionToAddTo">' + Globalize.translate('LabelSelectCollection') + '</label>';
html += '<select id="selectCollectionToAddTo" data-mini="true"></select>';
html += '</div>';
@ -197,29 +194,27 @@
});
var html = '';
html += '<h2 class="dialogHeader">';
html += '<paper-fab icon="arrow-back" mini class="btnCloseDialog"></paper-fab>';
var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection');
html += '<div style="display:inline-block;margin-left:.6em;vertical-align:middle;">' + title + '</div>';
html += '</h2>';
html += '<div class="editorContent" style="max-width:800px;margin:auto;">';
html += getEditorHtml();
html += '<div class="dialogHeader">';
html += '<paper-icon-button icon="close" class="btnCancel"></paper-icon-button>';
html += '<div class="dialogHeaderTitle">';
html += title;
html += '</div>';
html += '</div>';
html += getEditorHtml();
dlg.innerHTML = html;
document.body.appendChild(dlg);
var editorContent = dlg.querySelector('.editorContent');
initEditor(editorContent, items);
initEditor(dlg, items);
$(dlg).on('iron-overlay-closed', onDialogClosed);
paperDialogHelper.open(dlg);
$('.btnCloseDialog', dlg).on('click', function () {
$('.btnCancel', dlg).on('click', function () {
paperDialogHelper.close(dlg);
});

View File

@ -7,7 +7,7 @@
function onIdentificationFormSubmitted() {
var page = $(this).parents('.editorContent');
var page = $(this).parents('paper-dialog');
searchForIdentificationResults(page);
return false;
@ -193,7 +193,7 @@
function onIdentificationOptionsSubmit() {
var page = $(this).parents('.editorContent');
var page = $(this).parents('paper-dialog');
submitIdentficationResult(page);
return false;
@ -273,7 +273,7 @@
$('.identifyProviderIds', page).html(html).trigger('create');
$('.identificationHeader', page).html(Globalize.translate('HeaderIdentify'));
page.querySelector('.dialogHeaderTitle').innerHTML = Globalize.translate('HeaderIdentify');
});
}
@ -294,14 +294,7 @@
var dlg = paperDialogHelper.createDialog();
var html = '';
html += '<h2 class="dialogHeader">';
html += '<paper-fab icon="arrow-back" mini class="btnCloseDialog"></paper-fab>';
html += '<div style="display:inline-block;margin-left:.6em;vertical-align:middle;">' + Globalize.translate('HeaderIdentifyItem') + '</div>';
html += '</h2>';
html += '<div class="editorContent">';
html += Globalize.translateDocument(template);
html += '</div>';
dlg.innerHTML = html;
document.body.appendChild(dlg);
@ -311,10 +304,9 @@
paperDialogHelper.open(dlg);
var editorContent = dlg.querySelector('.editorContent');
initEditor(editorContent);
initEditor(dlg);
$('.btnCloseDialog', dlg).on('click', function () {
$('.btnCancel', dlg).on('click', function () {
paperDialogHelper.close(dlg);
});

View File

@ -1,4 +1,10 @@
<form class="popupIdentifyForm" style="margin:auto;">
<div class="dialogHeader">
<paper-icon-button icon="close" class="btnCancel"></paper-icon-button>
<div class="dialogHeaderTitle">
</div>
</div>
<form class="popupIdentifyForm" style="margin:auto;">
<p>${HeaderIdentifyItemHelp}</p>

View File

@ -127,12 +127,9 @@
var html = '';
html += '<form style="max-width:100%;">';
html += '<br />';
html += '<form style="margin:auto;">';
html += '<div class="fldSelectPlaylist">';
html += '<br />';
html += '<label for="selectPlaylistToAddTo">' + Globalize.translate('LabelSelectPlaylist') + '</label>';
html += '<select id="selectPlaylistToAddTo" data-mini="true"></select>';
html += '</div>';
@ -202,29 +199,28 @@
});
var html = '';
html += '<h2 class="dialogHeader">';
html += '<paper-fab icon="arrow-back" mini class="btnCloseDialog"></paper-fab>';
var title = Globalize.translate('HeaderAddToPlaylist');
html += '<div style="display:inline-block;margin-left:.6em;vertical-align:middle;">' + title + '</div>';
html += '</h2>';
html += '<div class="editorContent" style="max-width:800px;margin:auto;">';
html += getEditorHtml();
html += '<div class="dialogHeader">';
html += '<paper-icon-button icon="close" class="btnCancel"></paper-icon-button>';
html += '<div class="dialogHeaderTitle">';
html += title;
html += '</div>';
html += '</div>';
html += getEditorHtml();
dlg.innerHTML = html;
document.body.appendChild(dlg);
var editorContent = dlg.querySelector('.editorContent');
initEditor(editorContent, items);
initEditor(dlg, items);
$(dlg).on('iron-overlay-closed', onDialogClosed);
paperDialogHelper.open(dlg);
$('.btnCloseDialog', dlg).on('click', function () {
$('.btnCancel', dlg).on('click', function () {
paperDialogHelper.close(dlg);
});

View File

@ -572,7 +572,7 @@ paper-dialog paper-radio-group paper-radio-button {
div.dialogHeader {
margin: 0 0 2.5em!important;
padding: .35em 1em;
padding: .35em .5em;
background-color: #101010;
display: flex;
align-items: center;