mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-07 20:40:26 +08:00
changed axios to jquery, removed page refresh after file creation
This commit is contained in:
parent
14592ebea6
commit
0ea7d6b75e
2 changed files with 6 additions and 4 deletions
|
@ -71,7 +71,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios'
|
|
||||||
import ContextMenuMixin from './mixins/context_menu.js';
|
import ContextMenuMixin from './mixins/context_menu.js';
|
||||||
import ContextMenu from './context_menu.vue';
|
import ContextMenu from './context_menu.vue';
|
||||||
import PdfViewer from '../../shared/pdf_viewer.vue';
|
import PdfViewer from '../../shared/pdf_viewer.vue';
|
||||||
|
@ -92,8 +91,12 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reloadAsset() {
|
reloadAsset() {
|
||||||
axios.get(this.attachment.attributes.urls.load_asset, {
|
$.ajax({
|
||||||
params: { asset: { view_mode: this.attachment.attributes.view_mode } },
|
method: 'GET',
|
||||||
|
url: this.attachment.attributes.urls.load_asset,
|
||||||
|
data: {
|
||||||
|
asset: { view_mode: this.attachment.attributes.view_mode }
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,6 @@ export default {
|
||||||
$wopiModal.modal('hide');
|
$wopiModal.modal('hide');
|
||||||
window.open(data.edit_url, '_blank');
|
window.open(data.edit_url, '_blank');
|
||||||
window.focus();
|
window.focus();
|
||||||
window.location.reload();
|
|
||||||
} else {
|
} else {
|
||||||
HelperModule.flashAlertMsg(this.i18n.t('errors.general'), 'danger');
|
HelperModule.flashAlertMsg(this.i18n.t('errors.general'), 'danger');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue