mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +00:00
parent
e577cf7302
commit
9c41fe1d18
@ -32,13 +32,7 @@ JSONTiddlerWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
this.computeAttributes();
|
this.computeAttributes();
|
||||||
this.execute();
|
this.execute();
|
||||||
// Collect the fields from the optional base tiddler
|
// Collect the fields from the optional base tiddler
|
||||||
var fields = {};
|
var fields = this.getTiddlerFields();
|
||||||
if(this.attTiddler) {
|
|
||||||
var tiddler = this.wiki.getTiddler(this.attTiddler);
|
|
||||||
if(tiddler) {
|
|
||||||
fields = tiddler.getFieldStrings({exclude: this.attExclude.split(" ")});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Add custom fields specified in attributes starting with $
|
// Add custom fields specified in attributes starting with $
|
||||||
$tw.utils.each(this.attributes,function(attribute,name) {
|
$tw.utils.each(this.attributes,function(attribute,name) {
|
||||||
if(name.charAt(0) === "$") {
|
if(name.charAt(0) === "$") {
|
||||||
@ -79,6 +73,17 @@ JSONTiddlerWidget.prototype.refresh = function(changedTiddlers) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
JSONTiddlerWidget.prototype.getTiddlerFields = function() {
|
||||||
|
var fields = {};
|
||||||
|
if(this.attTiddler) {
|
||||||
|
var tiddler = this.wiki.getTiddler(this.attTiddler);
|
||||||
|
if(tiddler) {
|
||||||
|
fields = tiddler.getFieldStrings({exclude: this.attExclude.split(" ")});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return fields;
|
||||||
|
};
|
||||||
|
|
||||||
exports.jsontiddler = JSONTiddlerWidget;
|
exports.jsontiddler = JSONTiddlerWidget;
|
||||||
|
|
||||||
})();
|
})();
|
Loading…
Reference in New Issue
Block a user