From ee2ed5b10dc202c31b82fa58c440c5fa444e5d06 Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Mon, 19 May 2014 14:23:17 -0400 Subject: [PATCH] RU widget linking directly and hardcoding target --- examples/htdocs/mkws-widget-ru.css | 2 +- examples/htdocs/mkws-widget-ru.js | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/examples/htdocs/mkws-widget-ru.css b/examples/htdocs/mkws-widget-ru.css index 39765ff..fa406fb 100644 --- a/examples/htdocs/mkws-widget-ru.css +++ b/examples/htdocs/mkws-widget-ru.css @@ -26,6 +26,6 @@ h2 { a { text-decoration: none; - font-weight:normal; + font-weight:bold; color: #2B77AF; } diff --git a/examples/htdocs/mkws-widget-ru.js b/examples/htdocs/mkws-widget-ru.js index 4b7054f..0fb6c67 100644 --- a/examples/htdocs/mkws-widget-ru.js +++ b/examples/htdocs/mkws-widget-ru.js @@ -1,7 +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"; - this.node.html("

Reference Universe results:

\n" + - this.subwidget('Records', { sort: 'position', perpage: 5 })); + 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')); }); -- 1.7.10.4