X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=examples%2Fhtdocs%2Fmkws-widget-wimp.js;fp=examples%2Fhtdocs%2Fmkws-widget-wimp.js;h=55b4488fc65eda7351ca6ce66a9fb1784b50e6d2;hb=86a755a6e5b487f88ca5e6c1612aca6965acc98e;hp=0000000000000000000000000000000000000000;hpb=2fba9babeb2e467b348d545d0011fc703b50a110;p=mkws-moved-to-github.git diff --git a/examples/htdocs/mkws-widget-wimp.js b/examples/htdocs/mkws-widget-wimp.js new file mode 100644 index 0000000..55b4488 --- /dev/null +++ b/examples/htdocs/mkws-widget-wimp.js @@ -0,0 +1,36 @@ +var mkws_config = { + service_proxy_auth: "http://mkws.indexdata.com/service-proxy/?command=auth&action=login&username=paratext&password=paratext_mkc" +}; + +mkws.registerWidgetType('ReferenceUniverse', function() { + if (!this.config.perpage) this.config.perpage = 5; + if (!this.config.sort) this.config.sort = "position"; + this.team.registerTemplate('ReferenceUniverse', '\ +

Results from Reference Universe

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