1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-25 23:40:02 +00:00

Fix edit-text widget to work with indexed values

This commit is contained in:
Jeremy Ruston 2013-10-16 16:29:51 +01:00
parent 7f6d770ca6
commit adb395d10f

View File

@ -68,7 +68,9 @@ EditTextWidget.prototype.getEditInfo = function() {
// Get the edit value // Get the edit value
var tiddler = this.wiki.getTiddler(this.editTitle), var tiddler = this.wiki.getTiddler(this.editTitle),
value; value;
if(this.editField) { if(this.editIndex) {
value = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);
} else {
// Get the current tiddler and the field name // Get the current tiddler and the field name
if(tiddler) { if(tiddler) {
// If we've got a tiddler, the value to display is the field string value // If we've got a tiddler, the value to display is the field string value
@ -88,8 +90,6 @@ EditTextWidget.prototype.getEditInfo = function() {
} }
value = this.editDefault; value = this.editDefault;
} }
} else {
value = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);
} }
return {tiddler: tiddler, value: value}; return {tiddler: tiddler, value: value};
}; };