mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-17 23:34:50 +00:00
parent
b77aa3908f
commit
b8f15feca4
@ -72,10 +72,13 @@ FieldManglerWidget.prototype.handleRemoveFieldEvent = function(event) {
|
|||||||
|
|
||||||
FieldManglerWidget.prototype.handleAddFieldEvent = function(event) {
|
FieldManglerWidget.prototype.handleAddFieldEvent = function(event) {
|
||||||
var tiddler = this.wiki.getTiddler(this.mangleTitle);
|
var tiddler = this.wiki.getTiddler(this.mangleTitle);
|
||||||
if(tiddler && typeof event.param === "string" && event.param !== "" && !$tw.utils.hop(tiddler.fields,event.param)) {
|
if(tiddler && typeof event.param === "string") {
|
||||||
var addition = {};
|
var name = event.param.toLowerCase();
|
||||||
addition[event.param] = "";
|
if(name !== "" && !$tw.utils.hop(tiddler.fields,name)) {
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));
|
var addition = {};
|
||||||
|
addition[name] = "";
|
||||||
|
this.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user