X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=examples%2Fhtdocs%2Fmkws-widget-ru.js;h=0fb6c678c31abb925de1303b245f023a47c7153a;hb=ee2ed5b10dc202c31b82fa58c440c5fa444e5d06;hp=97db1a2dafed6716a397bf80fcb756328b7373a9;hpb=dd101a4ca83f33db517c9a794844d81412014300;p=mkws-moved-to-github.git diff --git a/examples/htdocs/mkws-widget-ru.js b/examples/htdocs/mkws-widget-ru.js index 97db1a2..0fb6c67 100644 --- a/examples/htdocs/mkws-widget-ru.js +++ b/examples/htdocs/mkws-widget-ru.js @@ -1,11 +1,23 @@ +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() { - //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); + 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}}\ +'); + this.node.html("

Reference Universe results:

\n" + + this.subwidget('Records')); });