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-checkbox', 'paper-dialog'], function () {
|
||||
|
||||
function onSubmit() {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -192,39 +192,36 @@
|
|||
|
||||
items = items || [];
|
||||
|
||||
require(['components/paperdialoghelper'], function () {
|
||||
var dlg = PaperDialogHelper.createDialog({
|
||||
size: 'small'
|
||||
});
|
||||
|
||||
var dlg = PaperDialogHelper.createDialog({
|
||||
size: 'small'
|
||||
});
|
||||
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 = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection');
|
||||
|
||||
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 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>';
|
||||
|
||||
html += '<div class="editorContent" style="max-width:800px;margin:auto;">';
|
||||
html += getEditorHtml();
|
||||
html += '</div>';
|
||||
dlg.innerHTML = html;
|
||||
document.body.appendChild(dlg);
|
||||
|
||||
dlg.innerHTML = html;
|
||||
document.body.appendChild(dlg);
|
||||
var editorContent = dlg.querySelector('.editorContent');
|
||||
initEditor(editorContent, items);
|
||||
|
||||
var editorContent = dlg.querySelector('.editorContent');
|
||||
initEditor(editorContent, items);
|
||||
$(dlg).on('iron-overlay-closed', onDialogClosed);
|
||||
|
||||
$(dlg).on('iron-overlay-closed', onDialogClosed);
|
||||
PaperDialogHelper.openWithHash(dlg, 'collectioneditor');
|
||||
|
||||
PaperDialogHelper.openWithHash(dlg, 'collectioneditor');
|
||||
$('.btnCloseDialog', dlg).on('click', function () {
|
||||
|
||||
$('.btnCloseDialog', dlg).on('click', function () {
|
||||
|
||||
PaperDialogHelper.close(dlg);
|
||||
});
|
||||
PaperDialogHelper.close(dlg);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue