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