0fb6c678c31abb925de1303b245f023a47c7153a
[mkws-moved-to-github.git] / examples / htdocs / mkws-widget-ru.js
1 var mkws_config = {service_proxy_auth: "http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=paratext&password=paratext_mkc"};
2 console.log(JSON.stringify(mkws.config));
3
4 mkws.registerWidgetType('ReferenceUniverse', function() {
5   if (!this.config.perpage) this.config.perpage = 5;
6   if (!this.config.sort) this.config.sort = "position";
7   this.config.template = 'ReferenceUniverse';
8   this.team.registerTemplate('ReferenceUniverse', '\
9 {{#mkws-first md-electronic-url}}\
10 <a href="{{this}}">\
11 {{/mkws-first}}\
12   {{md-title}}\
13 </a>\
14 {{#if md-title-remainder}}\
15   <span>{{md-title-remainder}}</span>\
16 {{/if}}\
17 {{#if md-title-responsibility}}\
18   <span><i>{{md-title-responsibility}}</i></span>\
19 {{/if}}\
20 ');
21   this.node.html("<h2>Reference Universe results:</h2>\n" +
22                  this.subwidget('Records'));
23 });