Skip to content

Commit

Permalink
Add tag ability
Browse files Browse the repository at this point in the history
  • Loading branch information
ploth committed Nov 7, 2017
1 parent dff148c commit be9cb51
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
11 changes: 11 additions & 0 deletions qml/pages/DetailTask.qml
Expand Up @@ -8,6 +8,7 @@ Dialog {
property var taskData;
property string description: getJsonField("description")
property string project: getJsonField("project")
property variant tags: getJsonField("tags")
property string due: getJsonField("due")
property string wait: getJsonField("wait")

Expand Down Expand Up @@ -43,6 +44,14 @@ Dialog {
placeholderText: qsTr("Project")
inputMethodHints: Qt.ImhNoAutoUppercase
}
TextField {
id: tagsfield
width: parent.width
label: qsTr("Tags")
text: tags.toString()
placeholderText: qsTr("Tags")
inputMethodHints: Qt.ImhNoAutoUppercase
}
Item {
anchors.left: parent.left
anchors.right: parent.right
Expand Down Expand Up @@ -116,6 +125,7 @@ Dialog {
if (typeof taskData == "undefined") {
json["description"] = descriptionfield.text;
json["project"] = projectfield.text !== "" ? projectfield.text : undefined
json["tags"] = tagsfield.text !== "" ? tagsfield.text : undefined
json["due"] = due !== "" ? due : undefined
json["wait"] = wait !== "" ? wait : undefined
console.log(JSON.stringify(json));
Expand All @@ -125,6 +135,7 @@ Dialog {
json = UT.copyItem(taskData.rawData);
json["description"] = descriptionfield.text;
json["project"] = projectfield.text !== "" ? projectfield.text : undefined
json["tags"] = tagsfield.text !== "" ? tagsfield.text : undefined
json["due"] = due !== "" ? due : undefined
json["wait"] = wait !== "" ? wait : undefined
console.log(JSON.stringify(json));
Expand Down
16 changes: 11 additions & 5 deletions translations/harbour-taskwarrior-de.ts
Expand Up @@ -4,19 +4,25 @@
<context>
<name>DetailTask</name>
<message>
<location filename="../qml/pages/DetailTask.qml" line="33"/>
<location filename="../qml/pages/DetailTask.qml" line="35"/>
<location filename="../qml/pages/DetailTask.qml" line="34"/>
<location filename="../qml/pages/DetailTask.qml" line="36"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/DetailTask.qml" line="41"/>
<location filename="../qml/pages/DetailTask.qml" line="43"/>
<location filename="../qml/pages/DetailTask.qml" line="42"/>
<location filename="../qml/pages/DetailTask.qml" line="44"/>
<source>Project</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/DetailTask.qml" line="150"/>
<location filename="../qml/pages/DetailTask.qml" line="50"/>
<location filename="../qml/pages/DetailTask.qml" line="52"/>
<source>Tags</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/DetailTask.qml" line="161"/>
<source>no due date set</source>
<translation type="unfinished"></translation>
</message>
Expand Down
16 changes: 11 additions & 5 deletions translations/harbour-taskwarrior.ts
Expand Up @@ -4,19 +4,25 @@
<context>
<name>DetailTask</name>
<message>
<location filename="../qml/pages/DetailTask.qml" line="33"/>
<location filename="../qml/pages/DetailTask.qml" line="35"/>
<location filename="../qml/pages/DetailTask.qml" line="34"/>
<location filename="../qml/pages/DetailTask.qml" line="36"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/DetailTask.qml" line="41"/>
<location filename="../qml/pages/DetailTask.qml" line="43"/>
<location filename="../qml/pages/DetailTask.qml" line="42"/>
<location filename="../qml/pages/DetailTask.qml" line="44"/>
<source>Project</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/DetailTask.qml" line="150"/>
<location filename="../qml/pages/DetailTask.qml" line="50"/>
<location filename="../qml/pages/DetailTask.qml" line="52"/>
<source>Tags</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/DetailTask.qml" line="161"/>
<source>no due date set</source>
<translation type="unfinished"></translation>
</message>
Expand Down

0 comments on commit be9cb51

Please sign in to comment.