mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fix issues with creation and modification dates
There were several places where tiddlers were being written without the creation/modification details being updated. See https://groups.google.com/d/msgid/tiddlywiki/17ef8ab0-0128-4467-8a9d-f17 bdbcf3618%40googlegroups.com
This commit is contained in:
parent
35e84c41ed
commit
eb9fb6635d
@ -170,7 +170,7 @@ var Command = function(params,commander,callback) {
|
|||||||
if(fields.revision) {
|
if(fields.revision) {
|
||||||
delete fields.revision;
|
delete fields.revision;
|
||||||
}
|
}
|
||||||
state.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title}));
|
state.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title},state.wiki.getModificationFields()));
|
||||||
var changeCount = state.wiki.getChangeCount(title).toString();
|
var changeCount = state.wiki.getChangeCount(title).toString();
|
||||||
response.writeHead(204, "OK",{
|
response.writeHead(204, "OK",{
|
||||||
Etag: "\"default/" + encodeURIComponent(title) + "/" + changeCount + ":\"",
|
Etag: "\"default/" + encodeURIComponent(title) + "/" + changeCount + ":\"",
|
||||||
|
@ -82,9 +82,11 @@ Story.prototype.addToStory = function(navigateTo,navigateFromTitle,options) {
|
|||||||
Story.prototype.saveStoryList = function(storyList) {
|
Story.prototype.saveStoryList = function(storyList) {
|
||||||
var storyTiddler = this.wiki.getTiddler(this.storyTitle);
|
var storyTiddler = this.wiki.getTiddler(this.storyTitle);
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(
|
this.wiki.addTiddler(new $tw.Tiddler(
|
||||||
|
this.wiki.getCreationFields(),
|
||||||
{title: this.storyTitle},
|
{title: this.storyTitle},
|
||||||
storyTiddler,
|
storyTiddler,
|
||||||
{list: storyList}
|
{list: storyList},
|
||||||
|
this.wiki.getModificationFields()
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
|||||||
removeFields[name] = undefined;
|
removeFields[name] = undefined;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,removeFields));
|
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,removeFields,this.wiki.getCreationFields()));
|
||||||
}
|
}
|
||||||
return true; // Action was invoked
|
return true; // Action was invoked
|
||||||
};
|
};
|
||||||
|
@ -125,7 +125,7 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(hasChanged) {
|
if(hasChanged) {
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));
|
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ EditBitmapWidget.prototype.saveChanges = function() {
|
|||||||
type = dataURL.substring(posColon+1,posSemiColon),
|
type = dataURL.substring(posColon+1,posSemiColon),
|
||||||
text = dataURL.substring(posComma+1);
|
text = dataURL.substring(posComma+1);
|
||||||
var update = {type: type, text: text};
|
var update = {type: type, text: text};
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,update));
|
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,update,this.wiki.getCreationFields()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ RadioWidget.prototype.setValue = function() {
|
|||||||
var tiddler = this.wiki.getTiddler(this.radioTitle),
|
var tiddler = this.wiki.getTiddler(this.radioTitle),
|
||||||
addition = {};
|
addition = {};
|
||||||
addition[this.radioField] = this.radioValue;
|
addition[this.radioField] = this.radioValue;
|
||||||
this.wiki.addTiddler(new $tw.Tiddler({title: this.radioTitle},tiddler,addition,this.wiki.getModificationFields()));
|
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),{title: this.radioTitle},tiddler,addition,this.wiki.getModificationFields()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user