mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4720 from grafixeyehero/cleanup-use-file-name-for-export
Cleanup rename default class name based on file name
This commit is contained in:
commit
d79a8a0421
3 changed files with 33 additions and 37 deletions
|
@ -11,25 +11,23 @@ function render() {
|
||||||
|
|
||||||
class AppFooter {
|
class AppFooter {
|
||||||
constructor() {
|
constructor() {
|
||||||
const self = this;
|
this.element = render();
|
||||||
|
|
||||||
self.element = render();
|
this.add = function (elem) {
|
||||||
self.add = function (elem) {
|
this.element.appendChild(elem);
|
||||||
self.element.appendChild(elem);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.insert = function (elem) {
|
this.insert = function (elem) {
|
||||||
if (typeof elem === 'string') {
|
if (typeof elem === 'string') {
|
||||||
self.element.insertAdjacentHTML('afterbegin', elem);
|
this.element.insertAdjacentHTML('afterbegin', elem);
|
||||||
} else {
|
} else {
|
||||||
self.element.insertBefore(elem, self.element.firstChild);
|
this.element.insertBefore(elem, this.element.firstChild);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
destroy() {
|
|
||||||
const self = this;
|
|
||||||
|
|
||||||
self.element = null;
|
destroy() {
|
||||||
|
this.element = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,32 +80,28 @@ function saveValues(context, options) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showEditor(itemType, options, availableOptions) {
|
class ImageOptionsEditor {
|
||||||
const dlg = dialogHelper.createDialog({
|
show(itemType, options, availableOptions) {
|
||||||
size: 'small',
|
const dlg = dialogHelper.createDialog({
|
||||||
removeOnClose: true,
|
size: 'small',
|
||||||
scrollY: false
|
removeOnClose: true,
|
||||||
});
|
scrollY: false
|
||||||
dlg.classList.add('formDialog');
|
});
|
||||||
dlg.innerHTML = globalize.translateHtml(template);
|
dlg.classList.add('formDialog');
|
||||||
dlg.addEventListener('close', function () {
|
dlg.innerHTML = globalize.translateHtml(template);
|
||||||
saveValues(dlg, options);
|
dlg.addEventListener('close', function () {
|
||||||
});
|
saveValues(dlg, options);
|
||||||
loadValues(dlg, itemType, options, availableOptions);
|
});
|
||||||
dialogHelper.open(dlg).then(() => {
|
loadValues(dlg, itemType, options, availableOptions);
|
||||||
return;
|
dialogHelper.open(dlg).then(() => {
|
||||||
}).catch(() => {
|
return;
|
||||||
return;
|
}).catch(() => {
|
||||||
});
|
return;
|
||||||
dlg.querySelector('.btnCancel').addEventListener('click', function () {
|
});
|
||||||
dialogHelper.close(dlg);
|
dlg.querySelector('.btnCancel').addEventListener('click', function () {
|
||||||
});
|
dialogHelper.close(dlg);
|
||||||
}
|
});
|
||||||
|
|
||||||
export class editor {
|
|
||||||
constructor() {
|
|
||||||
this.show = showEditor;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default editor;
|
export default ImageOptionsEditor;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<div class="formDialogHeader">
|
<div class="formDialogHeader">
|
||||||
<button type="button" is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}"><span class="material-icons arrow_back" aria-hidden="true"></span></button>
|
<button type="button" is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1" title="${ButtonBack}">
|
||||||
|
<span class="material-icons arrow_back" aria-hidden="true"></span>
|
||||||
|
</button>
|
||||||
<h3 class="formDialogHeaderTitle">
|
<h3 class="formDialogHeaderTitle">
|
||||||
${HeaderImageOptions}
|
${HeaderImageOptions}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue