From: Mike Taylor Date: Fri, 16 May 2014 11:26:30 +0000 (+0100) Subject: Rewrite the ReferenceUniverse widget as a one-liner using this.subwidget() X-Git-Tag: 1.0.0~661 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=2d7871f5bd64583a299f4dc3a48f1a451986c586 Rewrite the ReferenceUniverse widget as a one-liner using this.subwidget() Fixes bug MKWS-190 ("Inheriting from widgets is tricky") --- diff --git a/examples/htdocs/mkws-widget-ru.js b/examples/htdocs/mkws-widget-ru.js index 97db1a2..4b7054f 100644 --- a/examples/htdocs/mkws-widget-ru.js +++ b/examples/htdocs/mkws-widget-ru.js @@ -2,10 +2,6 @@ mkws.registerWidgetType('ReferenceUniverse', function() { //this.team.config.service_proxy_auth = "http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=paratext&password=paratext_mkc"; // this.team.config.perpage_default = 5; // this.team.config.sort_default = "position"; - var teamClass = 'mkwsTeam_' + this.team.name(); - var html = "

Reference Universe results:

\n"; - html += '
'; - this.node.html(html); + this.node.html("

Reference Universe results:

\n" + + this.subwidget('Records', { sort: 'position', perpage: 5 })); });