From b873df0ba26a16106c8ed88fd5797052cb99fd2b Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 6 Jan 2016 09:38:39 +0000 Subject: [PATCH] Revert "Merge pull request #2166 from matabele/patch-5" This reverts commit 83c54f4bb5131645aa5cc4456d7adf9b2d6e26e7, reversing changes made to 0cbe97615ad41b7263e56b49efaf275e919e4ec9. --- core/modules/widgets/action-setfield.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/core/modules/widgets/action-setfield.js b/core/modules/widgets/action-setfield.js index d9c2b2edf..98079f00c 100644 --- a/core/modules/widgets/action-setfield.js +++ b/core/modules/widgets/action-setfield.js @@ -59,16 +59,14 @@ Invoke the action associated with this widget */ SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) { var self = this, - options = {}; + options = {}; options.suppressTimestamp = !this.actionTimestamp; - if (this.actionField) { - this.wiki.setText(this.actionTiddler, this.actionField, this.actionIndex, this.actionValue, options); + if((typeof this.actionField == "string") || (typeof this.actionIndex == "string") || (typeof this.actionValue == "string")) { + this.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options); } - $tw.utils.each(this.attributes, function (attribute, name) { - if (name.charAt(0) !== "$") { - (name.search("!!") !== -1 || name.search("##") !== -1) ? - self.wiki.setTextReference(name, attribute, self.actionTiddler): - self.wiki.setText(self.actionTiddler, name, undefined, attribute, options); + $tw.utils.each(this.attributes,function(attribute,name) { + if(name.charAt(0) !== "$") { + self.wiki.setText(self.actionTiddler,name,undefined,attribute,options); } }); return true; // Action was invoked