mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Merge pull request #5448 from aignatov-bio/ai-sci-8413-fix-action-toolbar-init
Fix action toolbar init [SCI-8413]
This commit is contained in:
commit
cdec8023ba
2 changed files with 14 additions and 13 deletions
|
@ -240,13 +240,13 @@ var ProjectsIndex = (function() {
|
|||
}
|
||||
|
||||
function updateProjectsToolbar() {
|
||||
window.actionToolbarComponent.fetchActions(
|
||||
{
|
||||
if (window.actionToolbarComponent) {
|
||||
window.actionToolbarComponent.fetchActions({
|
||||
project_ids: selectedProjects,
|
||||
project_folder_ids: selectedProjectFolders
|
||||
}
|
||||
);
|
||||
window.actionToolbarComponent.setReloadCallback(refreshCurrentView);
|
||||
});
|
||||
window.actionToolbarComponent.setReloadCallback(refreshCurrentView);
|
||||
}
|
||||
}
|
||||
|
||||
function refreshCurrentView() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* global I18n */
|
||||
/* global notTurbolinksPreview */
|
||||
|
||||
import TurbolinksAdapter from 'vue-turbolinks';
|
||||
import Vue from 'vue/dist/vue.esm';
|
||||
|
@ -8,11 +8,12 @@ Vue.use(TurbolinksAdapter);
|
|||
|
||||
window.initActionToolbar = () => {
|
||||
if (window.actionToolbarComponent) return;
|
||||
|
||||
new Vue({
|
||||
el: '#actionToolbar',
|
||||
components: {
|
||||
ActionToolbar
|
||||
}
|
||||
});
|
||||
if (notTurbolinksPreview()) {
|
||||
new Vue({
|
||||
el: '#actionToolbar',
|
||||
components: {
|
||||
ActionToolbar
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue