update metadata manager

This commit is contained in:
Luke Pulverenti 2016-07-24 17:28:47 -04:00
parent 9ecfdc4e7c
commit c3875ebe73
7 changed files with 390 additions and 362 deletions

View file

@ -1,4 +1,4 @@
define(['itemHelper', 'dialogHelper', 'datetime', 'loading', 'focusManager', 'connectionManager', 'globalize', 'require', 'emby-checkbox', 'emby-input', 'emby-select', 'listViewStyle', 'emby-textarea', 'emby-button', 'paper-icon-button-light'], function (itemHelper, dialogHelper, datetime, loading, focusManager, connectionManager, globalize, require) {
define(['itemHelper', 'layoutManager', 'scrollHelper', 'dialogHelper', 'datetime', 'loading', 'focusManager', 'connectionManager', 'globalize', 'require', 'emby-checkbox', 'emby-input', 'emby-select', 'listViewStyle', 'emby-textarea', 'emby-button', 'paper-icon-button-light', 'css!./../formdialog'], function (itemHelper, layoutManager, scrollHelper, dialogHelper, datetime, loading, focusManager, connectionManager, globalize, require) {
var currentContext;
var metadataEditorInfo;
@ -1171,10 +1171,17 @@
require(['text!./metadataeditor.template.html'], function (template) {
var dlg = dialogHelper.createDialog({
removeOnClose: true,
size: 'medium'
});
var dialogOptions = {
removeOnClose: true
};
if (layoutManager.tv) {
dialogOptions.size = 'fullscreen';
} else {
dialogOptions.size = 'medium';
}
var dlg = dialogHelper.createDialog(dialogOptions);
dlg.classList.add('ui-body-b');
dlg.classList.add('background-theme-b');
@ -1188,6 +1195,10 @@
dlg.innerHTML = html;
document.body.appendChild(dlg);
if (layoutManager.tv) {
scrollHelper.centerFocus.on(dlg.querySelector('.dialogContent'), false);
}
dialogHelper.open(dlg);
dlg.addEventListener('close', function () {

View file

@ -1,11 +1,9 @@
<div class="dialogHeader" style="margin:0 0 2em;">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1">
<i class="md-icon">&#xE5C4;</i>
</button>
<div class="dialogHeader">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><i class="md-icon">&#xE5C4;</i></button>
<div class="dialogHeaderTitle">
${ButtonEdit}
</div>
<div style="margin-left:auto; display: flex; align-items: center; justify-content: center;">
<div style="margin-left: auto; display: flex; align-items: center; justify-content: center;">
<button is="emby-button" type="button" class="btnHeaderSave accent autoSize" tabindex="-1">
<i class="md-icon">check</i>
<span>${ButtonSave}</span>
@ -16,7 +14,9 @@
</div>
</div>
<form class="editItemMetadataForm editMetadataForm" style="margin:0;max-width:100%;">
<div class="dialogContent smoothScrollY" style="padding-top:2em;">
<form class="editItemMetadataForm editMetadataForm dialogContentInner centeredContent">
<div class="metadataFormFields">
<div style="padding: 0 0 10px;">
@ -315,4 +315,6 @@
</div>
<br />
<br />
</form>
</form>
</div>

View file

@ -1,14 +1,21 @@
define(['dialogHelper', 'globalize', 'require', 'paper-icon-button-light', 'emby-input', 'emby-select'], function (dialogHelper, globalize, require) {
define(['dialogHelper', 'layoutManager', 'scrollHelper', 'globalize', 'require', 'paper-icon-button-light', 'emby-input', 'emby-select', 'css!./../formdialog'], function (dialogHelper, layoutManager, scrollHelper, globalize, require) {
function show(person) {
return new Promise(function (resolve, reject) {
require(['text!./personeditor.template.html'], function (template) {
var dlg = dialogHelper.createDialog({
removeOnClose: true,
size: 'medium'
});
var dialogOptions = {
removeOnClose: true
};
if (layoutManager.tv) {
dialogOptions.size = 'fullscreen';
} else {
dialogOptions.size = 'medium';
}
var dlg = dialogHelper.createDialog(dialogOptions);
dlg.classList.add('ui-body-b');
dlg.classList.add('background-theme-b');
@ -27,6 +34,10 @@
dlg.querySelector('.selectPersonType', dlg).value = person.Type || '';
dlg.querySelector('.txtPersonRole', dlg).value = person.Role || '';
if (layoutManager.tv) {
scrollHelper.centerFocus.on(dlg.querySelector('.dialogContent'), false);
}
dialogHelper.open(dlg);
dlg.addEventListener('close', function () {

View file

@ -1,13 +1,12 @@
<div class="dialogHeader" style="margin:0 0 2em;">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1">
<i class="md-icon">&#xE5C4;</i>
</button>
<div class="dialogHeader">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><i class="md-icon">&#xE5C4;</i></button>
<div class="dialogHeaderTitle">
${ButtonEdit}
</div>
</div>
<form class="popupEditPersonForm" style="max-width: none;margin:0;">
<div class="dialogContent smoothScrollY" style="padding-top:2em;">
<form class="popupEditPersonForm dialogContentInner centeredContent">
<div class="inputContainer">
<input type="text" is="emby-input" class="txtPersonName" required="required" label="${LabelName}" />
@ -32,4 +31,5 @@
<i class="md-icon">check</i>
<span>${ButtonOk}</span>
</button>
</form>
</form>
</div>

View file

@ -8,15 +8,6 @@ iron-icon {
min-height: 24px;
}
.ui-body-a select {
background: none;
border-color: #757575;
}
.ui-body-a select option {
color: #000;
}
.paperCheckboxFieldDescription {
padding-left: 31px;
padding-top: 5px;
@ -42,25 +33,6 @@ paper-input + .fieldDescription {
}
}
.ui-body-a .emby-collapsible-button {
border: 0;
background-color: #e8e8e8;
text-transform: none;
}
.ui-body-a .emby-collapsible-title {
margin: .25em 0;
color: #000;
padding: 0 0 0 .5em;
font-weight: 500;
}
.ui-body-a .emby-collapsible-content, .ui-body-a .collapseContent {
border-width: 0;
padding: 1em 1.25em;
background-color: #fff;
}
.dashboardDocument .lnkMySync {
display: none !important;
}
@ -279,15 +251,7 @@ paper-textarea.mono textarea {
border-color: #52B54B;
}
.ui-body-a .inputLabel, .ui-body-a .textareaLabel {
color: #555;
}
.ui-body-a .inputLabel.focused:not(.blank), .ui-body-a .textareaLabel.focused:not(.blank) {
color: green;
}
.ui-body-a .paper-input-container-0 .input-content.paper-input-container label, .ui-body-a .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-a paper-textarea label, .ui-body-a .selectLabel, .ui-body-a .paperListLabel, .ui-body-a .fieldDescription {
.ui-body-a .paper-input-container-0 .input-content.paper-input-container label, .ui-body-a .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-a paper-textarea label {
color: #555;
}

View file

@ -529,7 +529,7 @@ progress {
}
.fullWidthContent .supporterPromotionContainer {
position: static!important;
position: static !important;
}
@media all and (min-width: 800px) {
@ -617,3 +617,43 @@ progress {
padding: 1em 1.25em;
background-color: #222;
}
.ui-body-a select {
background: none;
border-color: #757575;
}
.ui-body-a select option {
color: #000;
}
.ui-body-a .emby-collapsible-button {
border: 0;
background-color: #e8e8e8;
text-transform: none;
}
.ui-body-a .emby-collapsible-title {
margin: .25em 0;
color: #000;
padding: 0 0 0 .5em;
font-weight: 500;
}
.ui-body-a .emby-collapsible-content, .ui-body-a .collapseContent {
border-width: 0;
padding: 1em 1.25em;
background-color: #fff;
}
.ui-body-a .inputLabel, .ui-body-a .textareaLabel {
color: #555;
}
.ui-body-a .inputLabel.focused:not(.blank), .ui-body-a .textareaLabel.focused:not(.blank) {
color: green;
}
.ui-body-a .selectLabel, .ui-body-a .paperListLabel, .ui-body-a .fieldDescription {
color: #555;
}

View file

@ -16,7 +16,7 @@
StartIndex: 0,
Limit: LibraryBrowser.getDefaultPageSize()
},
view: LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('Poster', 'Poster')
view: LibraryBrowser.getSavedView(key) || LibraryBrowser.getDefaultItemsView('PosterCard', 'PosterCard')
};
pageData.query.ParentId = LibraryMenu.getTopParentId();