mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Merge pull request #6120 from G-Chubinidze/gc_SCI_9185
Placeholder text in the "Move to different result" modal dropdown [SCI-9185]
This commit is contained in:
commit
7b73e03a5f
|
@ -90,6 +90,10 @@
|
|||
width: calc(100%);
|
||||
}
|
||||
|
||||
.select__option-placeholder {
|
||||
color: var(--sn-grey);
|
||||
}
|
||||
|
||||
.sn-select__no-options {
|
||||
color: var(--sn-grey);
|
||||
padding: .5em;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="w-full">
|
||||
<Select
|
||||
:value="target"
|
||||
:options="targets"
|
||||
:options="targetOptions"
|
||||
v-bind:disabled="false"
|
||||
@change="setTarget"
|
||||
></Select>
|
||||
|
@ -78,6 +78,15 @@
|
|||
cancel() {
|
||||
$(this.$refs.modal).modal('hide');
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
targetOptions() {
|
||||
return this.targets.map(target => [
|
||||
target[0],
|
||||
target[1] || this.i18n.t('protocols.steps.modals.move_element.result.untitled_result'),
|
||||
target[1] === null ? true : false
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
<template v-if="options.length">
|
||||
<div
|
||||
v-for="option in options"
|
||||
:key="option[0]" @mousedown.prevent.stop="setValue(option[0])"
|
||||
:key="option[0]"
|
||||
@mousedown.prevent.stop="setValue(option[0])"
|
||||
class="sn-select__option"
|
||||
:class="{ 'select__option-placeholder': option[2] }"
|
||||
>
|
||||
{{ option[1] }}
|
||||
</div>
|
||||
|
|
|
@ -3136,6 +3136,7 @@ en:
|
|||
result:
|
||||
title: Move to different result
|
||||
targets_label: Select result
|
||||
untitled_result: Untitled result
|
||||
delete_step:
|
||||
title: 'Delete step'
|
||||
description_1: 'You’re about to delete a whole step from your protocol. It might contain data you don’t want to lose. You won’t be able to get it back.'
|
||||
|
|
Loading…
Reference in a new issue