From 4ece301a97a7db5093a1aa6b42ea24cce2df9413 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 17 Dec 2013 15:04:22 +0000 Subject: [PATCH] Fix fieldmanger to update modified and modifier fields --- core/modules/widgets/fieldmangler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/widgets/fieldmangler.js b/core/modules/widgets/fieldmangler.js index 97fa683b8..86e6fd823 100644 --- a/core/modules/widgets/fieldmangler.js +++ b/core/modules/widgets/fieldmangler.js @@ -75,7 +75,7 @@ FieldManglerWidget.prototype.handleAddFieldEvent = function(event) { if(tiddler && typeof event.param === "string") { var name = event.param.toLowerCase(); if(name !== "" && !$tw.utils.hop(tiddler.fields,name)) { - var addition = {}; + var addition = this.wiki.getModificationFields(); addition[name] = ""; this.wiki.addTiddler(new $tw.Tiddler(tiddler,addition)); } @@ -88,7 +88,7 @@ FieldManglerWidget.prototype.handleRemoveTagEvent = function(event) { if(tiddler && tiddler.fields.tags) { var p = tiddler.fields.tags.indexOf(event.param); if(p !== -1) { - var modification = {}; + var modification = this.wiki.getModificationFields(); modification.tags = (tiddler.fields.tags || []).slice(0); modification.tags.splice(p,1); this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification)); @@ -100,7 +100,7 @@ FieldManglerWidget.prototype.handleRemoveTagEvent = function(event) { FieldManglerWidget.prototype.handleAddTagEvent = function(event) { var tiddler = this.wiki.getTiddler(this.mangleTitle); if(tiddler && typeof event.param === "string" && event.param !== "") { - var modification = {}; + var modification = this.wiki.getModificationFields(); modification.tags = (tiddler.fields.tags || []).slice(0); $tw.utils.pushTop(modification.tags,event.param); this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));