mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +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
4 changed files with 18 additions and 2 deletions
|
@ -90,6 +90,10 @@
|
||||||
width: calc(100%);
|
width: calc(100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select__option-placeholder {
|
||||||
|
color: var(--sn-grey);
|
||||||
|
}
|
||||||
|
|
||||||
.sn-select__no-options {
|
.sn-select__no-options {
|
||||||
color: var(--sn-grey);
|
color: var(--sn-grey);
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<Select
|
<Select
|
||||||
:value="target"
|
:value="target"
|
||||||
:options="targets"
|
:options="targetOptions"
|
||||||
v-bind:disabled="false"
|
v-bind:disabled="false"
|
||||||
@change="setTarget"
|
@change="setTarget"
|
||||||
></Select>
|
></Select>
|
||||||
|
@ -78,6 +78,15 @@
|
||||||
cancel() {
|
cancel() {
|
||||||
$(this.$refs.modal).modal('hide');
|
$(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>
|
</script>
|
||||||
|
|
|
@ -14,8 +14,10 @@
|
||||||
<template v-if="options.length">
|
<template v-if="options.length">
|
||||||
<div
|
<div
|
||||||
v-for="option in options"
|
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="sn-select__option"
|
||||||
|
:class="{ 'select__option-placeholder': option[2] }"
|
||||||
>
|
>
|
||||||
{{ option[1] }}
|
{{ option[1] }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3136,6 +3136,7 @@ en:
|
||||||
result:
|
result:
|
||||||
title: Move to different result
|
title: Move to different result
|
||||||
targets_label: Select result
|
targets_label: Select result
|
||||||
|
untitled_result: Untitled result
|
||||||
delete_step:
|
delete_step:
|
||||||
title: '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.'
|
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