mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 20:23:16 +08:00
Merge branch 'features/global-search' of github.com:scinote-eln/scinote-web into features/global-search
This commit is contained in:
commit
103964e566
5 changed files with 38 additions and 10 deletions
|
@ -12,6 +12,12 @@
|
|||
|
||||
.panel-heading {
|
||||
padding: 7px 30px 7px 15px;
|
||||
|
||||
.panel-title {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
|
@ -97,4 +103,18 @@
|
|||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.bootstrap-select .dropdown-toggle:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.filter-option-inner {
|
||||
height: 100%;
|
||||
|
||||
.filter-option-inner-inner {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
<template>
|
||||
<div class="flex items-center gap-1.5 h-9 mt-0.5">
|
||||
<template v-if="params.data.tags.length > 0 || params.data.permissions.manage_tags">
|
||||
<div v-if="params.data.tags.length > 0"
|
||||
class="h-6 px-1.5 flex items-center rounded text-white max-w-[150px]"
|
||||
:style="{'background': params.data.tags[0].color}">
|
||||
<div class="truncate">{{ params.data.tags[0].name }}</div>
|
||||
</div>
|
||||
<GeneralDropdown v-if="params.data.tags.length > 1" >
|
||||
<GeneralDropdown v-if="params.data.tags.length > 0">
|
||||
<template v-slot:field>
|
||||
<div class="h-6 min-w-[24px] text-sn-dark-grey flex items-center justify-center rounded-full text-[.625rem]
|
||||
bg-sn-light-grey border !border-sn-sleepy-grey cursor-pointer">
|
||||
<div
|
||||
class="h-6 px-1.5 inline-flex items-center rounded text-white max-w-[150px]"
|
||||
:style="{'background': params.data.tags[0].color}">
|
||||
<div class="truncate">{{ params.data.tags[0].name }}</div>
|
||||
</div>
|
||||
<div v-if="params.data.tags.length > 1"
|
||||
class="h-6 min-w-[24px] text-sn-dark-grey inline-flex items-center justify-center rounded-full text-[.625rem]
|
||||
ml-1.5 bg-sn-light-grey border !border-sn-sleepy-grey cursor-pointer">
|
||||
<span>+{{ params.data.tags.length - 1 }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
@dragenter.prevent="dragEnter($event)"
|
||||
@dragover.prevent
|
||||
:data-id="step.id"
|
||||
:class="{ 'draging-file': dragingFile, 'editing-name': editingName, 'locked': !urls.update_url }"
|
||||
:class="{ 'draging-file': dragingFile, 'editing-name': editingName, 'locked': !urls.update_url, 'pointer-events-none': addingContent }"
|
||||
>
|
||||
<div class="drop-message" @dragleave.prevent="!showFileModal ? dragingFile = false : null">
|
||||
{{ i18n.t('protocols.steps.drop_message', { position: step.attributes.position + 1 }) }}
|
||||
|
@ -116,6 +116,7 @@
|
|||
:reorderElementUrl="elements.length > 1 ? urls.reorder_elements_url : ''"
|
||||
:assignableMyModuleId="assignableMyModuleId"
|
||||
:isNew="element.isNew"
|
||||
@component:adding-content="($event) => addingContent = $event"
|
||||
@component:delete="deleteElement"
|
||||
@update="updateElement"
|
||||
@reorder="openReorderModal"
|
||||
|
@ -201,6 +202,7 @@
|
|||
attachments: [],
|
||||
attachmentsReady: false,
|
||||
confirmingDelete: false,
|
||||
addingContent: false,
|
||||
showFileModal: false,
|
||||
showCommentsSidebar: false,
|
||||
dragingFile: false,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
@dragenter.prevent="dragEnter($event)"
|
||||
@dragover.prevent
|
||||
:data-id="result.id"
|
||||
:class="{ 'bg-sn-super-light-blue': dragingFile, 'bg-white': !dragingFile, 'locked': locked }"
|
||||
:class="{ 'bg-sn-super-light-blue': dragingFile, 'bg-white': !dragingFile, 'locked': locked, 'pointer-events-none': addingContent }"
|
||||
>
|
||||
<div class="text-xl items-center flex flex-col text-sn-blue h-full justify-center left-0 absolute top-0 w-full"
|
||||
v-if="dragingFile"
|
||||
|
@ -110,6 +110,7 @@
|
|||
:reorderElementUrl="elements.length > 1 ? urls.reorder_elements_url : ''"
|
||||
:assignableMyModuleId="result.attributes.my_module_id"
|
||||
:isNew="element.isNew"
|
||||
@component:adding-content="($event) => addingContent = $event"
|
||||
@component:delete="deleteElement"
|
||||
@update="updateElement"
|
||||
@reorder="openReorderModal"
|
||||
|
@ -164,6 +165,7 @@ export default {
|
|||
elements: [],
|
||||
attachments: [],
|
||||
attachmentsReady: false,
|
||||
addingContent: false,
|
||||
showFileModal: false,
|
||||
dragingFile: false,
|
||||
wellPlateOptions: [
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
export default {
|
||||
methods: {
|
||||
duplicateElement() {
|
||||
this.$emit('component:adding-content', true);
|
||||
$.post(this.element.attributes.orderable.urls.duplicate_url, (result) => {
|
||||
this.$emit('component:insert', result.data);
|
||||
HelperModule.flashAlertMsg(this.i18n.t('protocols.steps.component_duplicated'), 'success');
|
||||
}).fail(() => {
|
||||
HelperModule.flashAlertMsg(this.i18n.t('protocols.steps.component_duplication_failed'), 'danger');
|
||||
}).always(() => {
|
||||
this.$emit('component:adding-content', false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue