mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
Fix reloading of marvinjs attachments [SCI-10903]
This commit is contained in:
parent
5c9eed307f
commit
9116ef7456
1 changed files with 7 additions and 3 deletions
|
@ -202,10 +202,14 @@ var MarvinJsEditorApi = (function() {
|
|||
}
|
||||
$(marvinJsModal).modal('hide');
|
||||
|
||||
config.editor.focus();
|
||||
if (config.editor) config.editor.focus();
|
||||
|
||||
config.button.dataset.inProgress = false;
|
||||
|
||||
if (MarvinJsEditor.saveCallback) MarvinJsEditor.saveCallback();
|
||||
if (MarvinJsEditor.saveCallback) {
|
||||
MarvinJsEditor.saveCallback();
|
||||
delete MarvinJsEditor.saveCallback;
|
||||
}
|
||||
},
|
||||
error: function(response) {
|
||||
if (response.status === 403) {
|
||||
|
@ -264,8 +268,8 @@ var MarvinJsEditorApi = (function() {
|
|||
MarvinJsEditor.save(config);
|
||||
} else if (config.mode === 'edit') {
|
||||
config.objectType = 'Asset';
|
||||
MarvinJsEditor.saveCallback = (() => window.location.reload());
|
||||
MarvinJsEditor.update(config);
|
||||
location.reload();
|
||||
} else if (config.mode === 'new-tinymce') {
|
||||
config.objectType = 'TinyMceAsset';
|
||||
MarvinJsEditor.save(config);
|
||||
|
|
Loading…
Reference in a new issue