diff --git a/app/appinfo.json b/app/appinfo.json index 24dfb8a..3c1a572 100644 --- a/app/appinfo.json +++ b/app/appinfo.json @@ -1,6 +1,6 @@ { "id": "com.monkeystew.todotxtenyo.beta", - "version": "0.2.1", + "version": "0.2.2", "vendor": "Monkeystew", "type": "web", "main": "index.html", diff --git a/app/source/TodoList.js b/app/source/TodoList.js index f34d159..45cbcc5 100644 --- a/app/source/TodoList.js +++ b/app/source/TodoList.js @@ -261,10 +261,6 @@ enyo.kind({ task.pri = null; task.detail = this.owner.$.editView.$.tododetail.getValue(); task.detail = task.detail.replace(/(<\/?[A-Za-z][A-Za-z0-9]*>)+/g," "); - if (this.owner.preferences["dateTasks"] && !this.completeItem) { - var dfmt = new enyo.g11n.DateFmt({date:"yyyy-MM-dd"}); - task.detail = dfmt.format(new Date()) + " " + task.detail; - } if (this.owner.preferences["storage"] != "none" && this.cacheChanges != "YES" && this.cacheChanges != "COMMIT") { console.log("saving backup"); this.owner.saveFile( @@ -278,6 +274,10 @@ enyo.kind({ this.owner.todoList[this.selectedId].pri = task.detail.match(/^\([A-E]\)\s/); this.replaceItem = false; } else { + if (this.owner.preferences["dateTasks"] && !this.completeItem) { + var dfmt = new enyo.g11n.DateFmt({date:"yyyy-MM-dd"}); + task.detail = dfmt.format(new Date()) + " " + task.detail; + } this.owner.todoList.push(task); } this.listRefresh(); diff --git a/pkg/packageinfo.json b/pkg/packageinfo.json index bcabfb2..bcf353a 100644 --- a/pkg/packageinfo.json +++ b/pkg/packageinfo.json @@ -3,7 +3,7 @@ "package_format_version": 2, "loc_name": "Todo.txt Enyo", "icon": "icon.png", - "version": "0.2.1", + "version": "0.2.2", "vendor": "Monkeystew", "app": "com.monkeystew.todotxtenyo.beta", "services": ["com.monkeystew.todotxtenyo.beta.service"]