From 2d7871f5bd64583a299f4dc3a48f1a451986c586 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 16 May 2014 12:26:30 +0100 Subject: [PATCH] Rewrite the ReferenceUniverse widget as a one-liner using this.subwidget() Fixes bug MKWS-190 ("Inheriting from widgets is tricky") --- examples/htdocs/mkws-widget-ru.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 })); }); -- 1.7.10.4