mkws.registerWidgetType('Reference', function() {
- mkws.promotionFunction('Record').call(this);
- if (!this.config.target) this.config.target = 'wikimedia_wikipedia_single_result';
- if (!this.config.template) this.config.template = 'Reference';
+ mkws.promotionFunction('Record').call(this);
+ if (!this.config.target) this.config.target = 'wikimedia_wikipedia_single_result';
+ if (!this.config.template) this.config.template = 'Reference';
- this.team.registerTemplate('Reference', '\
-<a href="{{md-electronic-url}}">\
- <h1>{{md-title}}</h1>\
-</a>\
+ this.team.registerTemplate('Reference', '\
+ <img src="{{md-thumburl}}" alt="{{md-title}}">\
+ <h1><a href="{{md-electronic-url}}">{{md-title}}</a></h1>\
{{#if md-title-remainder}}\
<b>{{md-title-remainder}}</b>\
{{/if}}\
<i>{{md-title-responsibility}}</i>\
{{/if}}\
<p>\
- <img style="float:right; margin: 0 0 1em 3em" src="{{md-thumburl}}" alt="{{md-title}}">\
- {{md-description}}\
+ {{{mkws-paragraphs md-description}}}\
</p>\
');
-
- var that = this;
- this.team.queue("record").subscribe(function(data) {
- that.log("got data " + $.toJSON(data));
- });
});