X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=examples%2Fhtdocs%2Fmkws-widget-ru.js;fp=examples%2Fhtdocs%2Fmkws-widget-ru.js;h=5185d0585183d290d6162c84050adcc37cca537d;hp=0fb6c678c31abb925de1303b245f023a47c7153a;hb=17ac8f1707ae8b1dd20c78c7b0935822e4fc60f1;hpb=f34f0639aee82767969cb4f0353bd184df334b04 diff --git a/examples/htdocs/mkws-widget-ru.js b/examples/htdocs/mkws-widget-ru.js index 0fb6c67..5185d05 100644 --- a/examples/htdocs/mkws-widget-ru.js +++ b/examples/htdocs/mkws-widget-ru.js @@ -1,23 +1,33 @@ var mkws_config = {service_proxy_auth: "http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=paratext&password=paratext_mkc"}; -console.log(JSON.stringify(mkws.config)); mkws.registerWidgetType('ReferenceUniverse', function() { if (!this.config.perpage) this.config.perpage = 5; if (!this.config.sort) this.config.sort = "position"; - this.config.template = 'ReferenceUniverse'; this.team.registerTemplate('ReferenceUniverse', '\ -{{#mkws-first md-electronic-url}}\ -\ -{{/mkws-first}}\ - {{md-title}}\ -\ -{{#if md-title-remainder}}\ - {{md-title-remainder}}\ -{{/if}}\ -{{#if md-title-responsibility}}\ - {{md-title-responsibility}}\ -{{/if}}\ +

Results from Reference Universe

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

Reference Universe results:

\n" + - this.subwidget('Records')); + + var that = this; + var template = that.team.loadTemplate(that.config.template || "ReferenceUniverse"); + this.team.queue("records").subscribe(function(data) { + that.node.html(template(data)); + }); + widget.autosearch(that); });