mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Fix selected default step title and step name placeholder [SCI-7067] (#4326)
* Fix selected default step title in edit mode and step name placeholder [SCI-7067] * Add new placeholder label [SCI-7067]
This commit is contained in:
parent
6bfb25ba50
commit
1ee091aa53
3 changed files with 8 additions and 1 deletions
|
@ -44,6 +44,8 @@
|
|||
:allowBlank="false"
|
||||
:attributeName="`${i18n.t('Step')} ${i18n.t('name')}`"
|
||||
:autofocus="editingName"
|
||||
:placeholder="i18n.t('protocols.steps.placeholder')"
|
||||
:defaultValue="i18n.t('protocols.steps.default_name')"
|
||||
@editingEnabled="editingName = true"
|
||||
@editingDisabled="editingName = false"
|
||||
:editOnload="step.newStep == true"
|
||||
|
|
|
@ -46,7 +46,8 @@
|
|||
allowNewLine: { type: Boolean, default: false },
|
||||
multilinePaste: { type: Boolean, default: false },
|
||||
smartAnnotation: { type: Boolean, default: false },
|
||||
editOnload: { type: Boolean, default: false }
|
||||
editOnload: { type: Boolean, default: false },
|
||||
defaultValue: { type: String, default: '' }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -126,6 +127,9 @@
|
|||
this.editing = true;
|
||||
this.focus();
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.input.value === this.defaultValue) {
|
||||
this.$refs.input.select();
|
||||
}
|
||||
if (this.smartAnnotation) {
|
||||
SmartAnnotation.init($(this.$refs.input));
|
||||
}
|
||||
|
|
|
@ -2525,6 +2525,7 @@ en:
|
|||
success_flash: 'Protocol <strong>%{name}</strong> successfully imported to %{type}.'
|
||||
|
||||
steps:
|
||||
placeholder: 'Enter step name'
|
||||
default_name: 'Untitled step'
|
||||
completed: 'Completed'
|
||||
uncompleted: 'Uncompleted'
|
||||
|
|
Loading…
Reference in a new issue