add item path

This commit is contained in:
grafixeyehero 2019-10-18 17:05:50 +03:00
parent 5d23c354d2
commit 9063e153c1
2 changed files with 25 additions and 5 deletions

View File

@ -370,6 +370,14 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false); scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
} }
if (item.Path) {
dlg.querySelector('.fldPath').classList.remove('hide');
} else {
dlg.querySelector('.fldPath').classList.add('hide');
}
dlg.querySelector('.txtPath').innerHTML = item.Path || '';
dialogHelper.open(dlg); dialogHelper.open(dlg);
dlg.querySelector('.popupIdentifyForm').addEventListener('submit', function (e) { dlg.querySelector('.popupIdentifyForm').addEventListener('submit', function (e) {
@ -440,6 +448,8 @@ define(['dialogHelper', 'loading', 'connectionManager', 'require', 'globalize',
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false); scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
} }
dialogHelper.open(dlg); dialogHelper.open(dlg);
dlg.querySelector('.btnCancel').addEventListener('click', function (e) { dlg.querySelector('.btnCancel').addEventListener('click', function (e) {

View File

@ -1,5 +1,7 @@
<div class="formDialogHeader"> <div class="formDialogHeader">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><i class="md-icon">&#xE5C4;</i></button> <button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1">
<i class="md-icon">&#xE5C4;</i>
</button>
<h3 class="formDialogHeaderTitle"> <h3 class="formDialogHeaderTitle">
${Identify} ${Identify}
</h3> </h3>
@ -9,12 +11,19 @@
<div class="dialogContentInner dialog-content-centered"> <div class="dialogContentInner dialog-content-centered">
<form class="popupIdentifyForm" style="margin:auto;"> <form class="popupIdentifyForm" style="margin:auto;">
<div class="padded-bottom fldPath hide">
<div>${LabelPath}</div>
<div class="txtPath fieldDescription">
</div>
</div>
<p>${HeaderIdentifyItemHelp}</p> <p>${HeaderIdentifyItemHelp}</p>
<div class="inputContainer"> <div class="inputContainer">
<input is="emby-input" type="text" id="txtLookupName" class="identifyField" data-lookup="Name" label="${LabelName}" /> <input is="emby-input" type="text" id="txtLookupName" class="identifyField" data-lookup="Name"
label="${LabelName}" />
</div> </div>
<div class="fldLookupYear inputContainer"> <div class="fldLookupYear inputContainer">
<input is="emby-input" type="number" id="txtLookupYear" class="identifyField" data-lookup="Year" pattern="[0-9]*" min="1800" label="${LabelYear}" /> <input is="emby-input" type="number" id="txtLookupYear" class="identifyField" data-lookup="Year"
pattern="[0-9]*" min="1800" label="${LabelYear}" />
</div> </div>
<div class="identifyProviderIds"> <div class="identifyProviderIds">
@ -43,7 +52,8 @@
</label> </label>
<div class="formDialogFooter"> <div class="formDialogFooter">
<button is="emby-button" type="submit" class="raised button-submit block btnSubmit formDialogFooterItem"> <button is="emby-button" type="submit"
class="raised button-submit block btnSubmit formDialogFooterItem">
<span>${ButtonOk}</span> <span>${ButtonOk}</span>
</button> </button>
</div> </div>