moved the insert date to occur only when the task is new and not being modified
This commit is contained in:
parent
1b88123de6
commit
9917680c13
3 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "com.monkeystew.todotxtenyo.beta",
|
"id": "com.monkeystew.todotxtenyo.beta",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"vendor": "Monkeystew",
|
"vendor": "Monkeystew",
|
||||||
"type": "web",
|
"type": "web",
|
||||||
"main": "index.html",
|
"main": "index.html",
|
||||||
|
|
|
@ -261,10 +261,6 @@ enyo.kind({
|
||||||
task.pri = null;
|
task.pri = null;
|
||||||
task.detail = this.owner.$.editView.$.tododetail.getValue();
|
task.detail = this.owner.$.editView.$.tododetail.getValue();
|
||||||
task.detail = task.detail.replace(/(<\/?[A-Za-z][A-Za-z0-9]*>)+/g," ");
|
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") {
|
if (this.owner.preferences["storage"] != "none" && this.cacheChanges != "YES" && this.cacheChanges != "COMMIT") {
|
||||||
console.log("saving backup");
|
console.log("saving backup");
|
||||||
this.owner.saveFile(
|
this.owner.saveFile(
|
||||||
|
@ -278,6 +274,10 @@ enyo.kind({
|
||||||
this.owner.todoList[this.selectedId].pri = task.detail.match(/^\([A-E]\)\s/);
|
this.owner.todoList[this.selectedId].pri = task.detail.match(/^\([A-E]\)\s/);
|
||||||
this.replaceItem = false;
|
this.replaceItem = false;
|
||||||
} else {
|
} 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.owner.todoList.push(task);
|
||||||
}
|
}
|
||||||
this.listRefresh();
|
this.listRefresh();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"package_format_version": 2,
|
"package_format_version": 2,
|
||||||
"loc_name": "Todo.txt Enyo",
|
"loc_name": "Todo.txt Enyo",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"vendor": "Monkeystew",
|
"vendor": "Monkeystew",
|
||||||
"app": "com.monkeystew.todotxtenyo.beta",
|
"app": "com.monkeystew.todotxtenyo.beta",
|
||||||
"services": ["com.monkeystew.todotxtenyo.beta.service"]
|
"services": ["com.monkeystew.todotxtenyo.beta.service"]
|
||||||
|
|
Loading…
Reference in a new issue