Ensure consistent naming of title fields (#134)
Merge branch 'master' into fix/title-fields Change task text field to title Change namespace name field to title Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/134
This commit is contained in:
@ -7,10 +7,10 @@
|
||||
</h1>
|
||||
<div class="is-done" v-if="task.done">Done</div>
|
||||
<h1 class="title input" contenteditable="true" @focusout="saveTaskOnChange()" ref="taskTitle"
|
||||
@keyup.ctrl.enter="saveTaskOnChange()">{{ task.text }}</h1>
|
||||
@keyup.ctrl.enter="saveTaskOnChange()">{{ task.title }}</h1>
|
||||
</div>
|
||||
<h6 class="subtitle" v-if="parent && parent.namespace && parent.list">
|
||||
{{ parent.namespace.name }} >
|
||||
{{ parent.namespace.title }} >
|
||||
<router-link :to="{ name: 'list.list', params: { listId: parent.list.id } }">
|
||||
{{ parent.list.title }}
|
||||
</router-link>
|
||||
@ -410,7 +410,7 @@
|
||||
this.taskService.get({id: this.taskId})
|
||||
.then(r => {
|
||||
this.$set(this, 'task', r)
|
||||
this.taskTitle = this.task.text
|
||||
this.taskTitle = this.task.title
|
||||
this.setActiveFields()
|
||||
})
|
||||
.catch(e => {
|
||||
@ -444,13 +444,13 @@
|
||||
|
||||
// Pull the task title from the contenteditable
|
||||
let taskTitle = this.$refs.taskTitle.textContent
|
||||
this.task.text = taskTitle
|
||||
this.task.title = taskTitle
|
||||
|
||||
// We only want to save if the title was actually change.
|
||||
// Because the contenteditable does not have a change event,
|
||||
// we're building it ourselves and only calling saveTask()
|
||||
// if the task title changed.
|
||||
if (this.task.text !== this.taskTitle) {
|
||||
if (this.task.title !== this.taskTitle) {
|
||||
this.saveTask()
|
||||
this.taskTitle = taskTitle
|
||||
}
|
||||
|
@ -50,7 +50,7 @@
|
||||
'has-high-priority': t.priority >= priorities.HIGH,
|
||||
'has-not-so-high-priority': t.priority === priorities.HIGH,
|
||||
'has-super-high-priority': t.priority === priorities.DO_NOW
|
||||
}">{{t.text}}</span>
|
||||
}">{{t.title}}</span>
|
||||
<priority-label :priority="t.priority"/>
|
||||
<!-- using the key here forces vue to use the updated version model and not the response returned by the api -->
|
||||
<a @click="editTask(theTasks[k])" class="edit-toggle">
|
||||
@ -78,7 +78,7 @@
|
||||
@clicked="setTaskDragged(t)"
|
||||
v-tooltip="'This task has no dates set.'"
|
||||
>
|
||||
<span>{{t.text}}</span>
|
||||
<span>{{t.title}}</span>
|
||||
</VueDragResize>
|
||||
</div>
|
||||
</template>
|
||||
@ -366,7 +366,7 @@
|
||||
if (!this.newTaskFieldActive) {
|
||||
return
|
||||
}
|
||||
let task = new TaskModel({text: this.newTaskTitle, listId: this.listId})
|
||||
let task = new TaskModel({title: this.newTaskTitle, listId: this.listId})
|
||||
this.taskService.create(task)
|
||||
.then(r => {
|
||||
this.tasksWithoutDates.push(this.addGantAttributes(r))
|
||||
|
@ -53,7 +53,7 @@
|
||||
<span v-if="t.listId !== listId" class="different-list" v-tooltip="'This task belongs to a different list.'">
|
||||
{{ $store.getters['lists/getListById'](t.listId) === null ? '' : $store.getters['lists/getListById'](t.listId).title }} >
|
||||
</span>
|
||||
{{t.text}}
|
||||
{{t.title}}
|
||||
</span>
|
||||
</router-link>
|
||||
<a
|
||||
@ -202,8 +202,8 @@
|
||||
this.showDeleteModal = false
|
||||
})
|
||||
},
|
||||
createAndRelateTask(text) {
|
||||
const newTask = new TaskModel({text: text, listId: this.listId})
|
||||
createAndRelateTask(title) {
|
||||
const newTask = new TaskModel({title: title, listId: this.listId})
|
||||
this.taskService.create(newTask)
|
||||
.then(r => {
|
||||
this.newTaskRelationTask = r
|
||||
|
@ -14,11 +14,11 @@
|
||||
<!-- Show any parent tasks to make it clear this task is a sub task of something -->
|
||||
<span class="parent-tasks" v-if="typeof task.relatedTasks.parenttask !== 'undefined'">
|
||||
<template v-for="(pt, i) in task.relatedTasks.parenttask">
|
||||
{{ pt.text }}<template v-if="(i + 1) < task.relatedTasks.parenttask.length">, </template>
|
||||
{{ pt.title }}<template v-if="(i + 1) < task.relatedTasks.parenttask.length">, </template>
|
||||
</template>
|
||||
>
|
||||
</span>
|
||||
{{ task.text }}
|
||||
{{ task.title }}
|
||||
<labels :labels="task.labels"/>
|
||||
<user
|
||||
:user="a"
|
||||
|
Reference in New Issue
Block a user