card title: prevent space and no text
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
committed by
Julius Härtl
parent
0d447fff01
commit
7bddcb877c
@@ -84,8 +84,8 @@
|
|||||||
:disabled="stateCardCreating"
|
:disabled="stateCardCreating"
|
||||||
:placeholder="t('deck', 'Card name')"
|
:placeholder="t('deck', 'Card name')"
|
||||||
required
|
required
|
||||||
|
pattern=".*\S+.*"
|
||||||
@keydown.esc="stopCardCreation">
|
@keydown.esc="stopCardCreation">
|
||||||
|
|
||||||
<input v-show="!stateCardCreating"
|
<input v-show="!stateCardCreating"
|
||||||
class="icon-confirm"
|
class="icon-confirm"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ import {
|
|||||||
getMonthNamesShort,
|
getMonthNamesShort,
|
||||||
} from '@nextcloud/l10n'
|
} from '@nextcloud/l10n'
|
||||||
import moment from '@nextcloud/moment'
|
import moment from '@nextcloud/moment'
|
||||||
|
import { showError } from '@nextcloud/dialogs'
|
||||||
|
|
||||||
const markdownIt = new MarkdownIt({
|
const markdownIt = new MarkdownIt({
|
||||||
linkify: true,
|
linkify: true,
|
||||||
@@ -464,6 +465,10 @@ export default {
|
|||||||
this.descriptionSaving = false
|
this.descriptionSaving = false
|
||||||
},
|
},
|
||||||
updateTitle(newTitle) {
|
updateTitle(newTitle) {
|
||||||
|
if (newTitle.trim === '') {
|
||||||
|
showError('Could not update card title')
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$set(this.copiedCard, 'title', newTitle)
|
this.$set(this.copiedCard, 'title', newTitle)
|
||||||
this.$store.dispatch('updateCardTitle', this.copiedCard).then(() => {
|
this.$store.dispatch('updateCardTitle', this.copiedCard).then(() => {
|
||||||
this.titleEditable = false
|
this.titleEditable = false
|
||||||
|
|||||||
@@ -43,8 +43,12 @@
|
|||||||
class="dragDisabled"
|
class="dragDisabled"
|
||||||
@keyup.esc="cancelEdit"
|
@keyup.esc="cancelEdit"
|
||||||
@submit.prevent="finishedEdit(card)">
|
@submit.prevent="finishedEdit(card)">
|
||||||
<input v-model="copiedCard.title" v-focus type="text">
|
<input v-model="copiedCard.title"
|
||||||
<input type="button" class="icon-confirm" @click="finishedEdit(card)">
|
v-focus
|
||||||
|
type="text"
|
||||||
|
required
|
||||||
|
pattern=".*\S+.*">
|
||||||
|
<input type="submit" value="" class="icon-confirm">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<DueDate v-if="!editing" :card="card" />
|
<DueDate v-if="!editing" :card="card" />
|
||||||
|
|||||||
Reference in New Issue
Block a user