mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +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');
|
$(marvinJsModal).modal('hide');
|
||||||
|
|
||||||
config.editor.focus();
|
if (config.editor) config.editor.focus();
|
||||||
|
|
||||||
config.button.dataset.inProgress = false;
|
config.button.dataset.inProgress = false;
|
||||||
|
|
||||||
if (MarvinJsEditor.saveCallback) MarvinJsEditor.saveCallback();
|
if (MarvinJsEditor.saveCallback) {
|
||||||
|
MarvinJsEditor.saveCallback();
|
||||||
|
delete MarvinJsEditor.saveCallback;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(response) {
|
error: function(response) {
|
||||||
if (response.status === 403) {
|
if (response.status === 403) {
|
||||||
|
@ -264,8 +268,8 @@ var MarvinJsEditorApi = (function() {
|
||||||
MarvinJsEditor.save(config);
|
MarvinJsEditor.save(config);
|
||||||
} else if (config.mode === 'edit') {
|
} else if (config.mode === 'edit') {
|
||||||
config.objectType = 'Asset';
|
config.objectType = 'Asset';
|
||||||
|
MarvinJsEditor.saveCallback = (() => window.location.reload());
|
||||||
MarvinJsEditor.update(config);
|
MarvinJsEditor.update(config);
|
||||||
location.reload();
|
|
||||||
} else if (config.mode === 'new-tinymce') {
|
} else if (config.mode === 'new-tinymce') {
|
||||||
config.objectType = 'TinyMceAsset';
|
config.objectType = 'TinyMceAsset';
|
||||||
MarvinJsEditor.save(config);
|
MarvinJsEditor.save(config);
|
||||||
|
|
Loading…
Reference in a new issue