mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
adjust dependency loading
This commit is contained in:
parent
2eb2a5011d
commit
d7fb9038a4
117 changed files with 639 additions and 29680 deletions
|
@ -1,4 +1,4 @@
|
|||
define([], function () {
|
||||
define(['components/paperdialoghelper', 'paper-dialog'], function () {
|
||||
|
||||
var currentDeferred;
|
||||
var hasChanges;
|
||||
|
@ -186,57 +186,53 @@
|
|||
currentDeferred = deferred;
|
||||
hasChanges = false;
|
||||
|
||||
require(['components/paperdialoghelper'], function () {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'components/medialibrarycreator/medialibrarycreator.template.html', true);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'components/medialibrarycreator/medialibrarycreator.template.html', true);
|
||||
xhr.onload = function (e) {
|
||||
|
||||
xhr.onload = function (e) {
|
||||
var template = this.response;
|
||||
var dlg = PaperDialogHelper.createDialog({
|
||||
size: 'small',
|
||||
theme: 'a',
|
||||
|
||||
var template = this.response;
|
||||
var dlg = PaperDialogHelper.createDialog({
|
||||
size: 'small',
|
||||
theme: 'a',
|
||||
// In (at least) chrome this is causing the text field to not be editable
|
||||
modal: false
|
||||
});
|
||||
|
||||
// In (at least) chrome this is causing the text field to not be editable
|
||||
modal: false
|
||||
});
|
||||
var html = '';
|
||||
html += '<h2 class="dialogHeader">';
|
||||
html += '<paper-fab icon="arrow-back" mini class="btnCloseDialog"></paper-fab>';
|
||||
|
||||
var html = '';
|
||||
html += '<h2 class="dialogHeader">';
|
||||
html += '<paper-fab icon="arrow-back" mini class="btnCloseDialog"></paper-fab>';
|
||||
var title = Globalize.translate('ButtonAddMediaLibrary');
|
||||
|
||||
var title = Globalize.translate('ButtonAddMediaLibrary');
|
||||
html += '<div style="display:inline-block;margin-left:.6em;vertical-align:middle;">' + title + '</div>';
|
||||
html += '</h2>';
|
||||
|
||||
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 += Globalize.translateDocument(template);
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="editorContent" style="max-width:800px;margin:auto;">';
|
||||
html += Globalize.translateDocument(template);
|
||||
html += '</div>';
|
||||
dlg.innerHTML = html;
|
||||
document.body.appendChild(dlg);
|
||||
|
||||
dlg.innerHTML = html;
|
||||
document.body.appendChild(dlg);
|
||||
var editorContent = dlg.querySelector('.editorContent');
|
||||
initEditor(editorContent, options.collectionTypeOptions);
|
||||
|
||||
var editorContent = dlg.querySelector('.editorContent');
|
||||
initEditor(editorContent, options.collectionTypeOptions);
|
||||
$(dlg).on('iron-overlay-closed', onDialogClosed);
|
||||
|
||||
$(dlg).on('iron-overlay-closed', onDialogClosed);
|
||||
PaperDialogHelper.openWithHash(dlg, 'medialibrarycreator');
|
||||
|
||||
PaperDialogHelper.openWithHash(dlg, 'medialibrarycreator');
|
||||
$('.btnCloseDialog', dlg).on('click', function () {
|
||||
|
||||
$('.btnCloseDialog', dlg).on('click', function () {
|
||||
PaperDialogHelper.close(dlg);
|
||||
});
|
||||
|
||||
PaperDialogHelper.close(dlg);
|
||||
});
|
||||
paths = [];
|
||||
renderPaths(editorContent);
|
||||
}
|
||||
|
||||
paths = [];
|
||||
renderPaths(editorContent);
|
||||
}
|
||||
|
||||
xhr.send();
|
||||
|
||||
});
|
||||
xhr.send();
|
||||
|
||||
return deferred.promise();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue