mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-30 20:23:14 +08:00
Merge pull request #6664 from aignatov-bio/ai-sci-9726-fix-task-result-dropdown
Fixes vue3 migration [SCI-9726][SCI-9728][SCI-9729]
This commit is contained in:
commit
76e4dfc49d
4 changed files with 13 additions and 16 deletions
|
@ -2,13 +2,10 @@ import PerfectScrollbar from 'vue3-perfect-scrollbar';
|
|||
import { createApp } from 'vue/dist/vue.esm-bundler.js';
|
||||
import 'vue3-perfect-scrollbar/dist/vue3-perfect-scrollbar.css';
|
||||
import ShareLinkContainer from '../../vue/shareable_links/container.vue';
|
||||
import { mountWithTurbolinks } from './helpers/turbolinks.js';
|
||||
|
||||
function initShareTaskContainer() {
|
||||
const app = createApp({});
|
||||
app.component('ShareLinkContainer', ShareLinkContainer);
|
||||
app.use(PerfectScrollbar);
|
||||
app.config.globalProperties.i18n = window.I18n;
|
||||
app.mount('.share-task-container');
|
||||
}
|
||||
|
||||
initShareTaskContainer();
|
||||
const app = createApp({});
|
||||
app.component('ShareTaskContainer', ShareLinkContainer);
|
||||
app.use(PerfectScrollbar);
|
||||
app.config.globalProperties.i18n = window.I18n;
|
||||
mountWithTurbolinks(app, '#share-task-container');
|
||||
|
|
|
@ -136,8 +136,8 @@ export default {
|
|||
changeAttachmentsViewMode(viewMode) {
|
||||
this.attachmentsParent.attributes.assets_view_mode = viewMode;
|
||||
this.attachments.forEach((attachment) => {
|
||||
this.$set(attachment.attributes, 'view_mode', viewMode);
|
||||
this.$set(attachment.attributes, 'asset_order', this.viewModeOrder[viewMode]);
|
||||
attachment.attributes['view_mode'] = viewMode;
|
||||
attachment.attributes['asset_order'] = this.viewModeOrder[viewMode];
|
||||
});
|
||||
$.post(this.attachmentsParent.attributes.urls.update_asset_view_mode_url, {
|
||||
assets_view_mode: viewMode
|
||||
|
@ -145,8 +145,8 @@ export default {
|
|||
},
|
||||
updateAttachmentViewMode(id, viewMode) {
|
||||
const attachment = this.attachments.find(e => e.id === id);
|
||||
this.$set(attachment.attributes, 'view_mode', viewMode);
|
||||
this.$set(attachment.attributes, 'asset_order', this.viewModeOrder[viewMode]);
|
||||
attachment.attributes['view_mode'] = viewMode;
|
||||
attachment.attributes['asset_order'] = this.viewModeOrder[viewMode];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="relative" v-if="listItems.length > 0" >
|
||||
<div class="relative" v-if="listItems.length > 0" v-click-outside="closeMenu">
|
||||
<button ref="openBtn" :class="btnClasses" @click="showMenu = !showMenu">
|
||||
<i v-if="btnIcon" :class="btnIcon"></i>
|
||||
{{ btnText }}
|
||||
|
@ -15,7 +15,7 @@
|
|||
'!mb-0': !openUp,
|
||||
}"
|
||||
v-if="showMenu"
|
||||
v-click-outside="closeMenu">
|
||||
>
|
||||
<span v-for="(item, i) in listItems" :key="i" class="contents">
|
||||
<div v-if="item.dividerBefore" class="border-0 border-t border-solid border-sn-light-grey"></div>
|
||||
<a :href="item.url" v-if="!item.submenu"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<%= render partial: 'my_modules/status_flow/task_flow_button', locals: { my_module: @my_module } if @my_module.my_module_status_flow %>
|
||||
<%= javascript_include_tag("my_modules/status_flow") %>
|
||||
<% if current_team.shareable_links_enabled? && can_share_my_module?(@my_module) %>
|
||||
<div class="share-task-container" data-behaviour="vue">
|
||||
<div id="share-task-container" data-behaviour="vue">
|
||||
<share-task-container
|
||||
shareable-link-url="<%= my_module_shareable_link_path(@my_module) %>"
|
||||
:shared="<%= @my_module.shared? %>"
|
||||
|
|
Loading…
Reference in a new issue