From: Jason Skomorowski Date: Thu, 23 Oct 2014 18:57:59 +0000 (-0400) Subject: More accurately name image widget as images X-Git-Tag: 1.0.0~122 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=23bacc1691b42d9b2e131b7f47c9fcb2f72e3e6f;p=mkws-moved-to-github.git More accurately name image widget as images --- diff --git a/src/mkws-widget-record.js b/src/mkws-widget-record.js index 044d574..ad62425 100644 --- a/src/mkws-widget-record.js +++ b/src/mkws-widget-record.js @@ -11,13 +11,13 @@ mkws.registerWidgetType('record', function() { that.autosearch(); }); -mkws.registerWidgetType('image', function() { +mkws.registerWidgetType('images', function() { mkws.promotionFunction('records').call(this); - if (!this.config.template) this.config.template = 'Image'; + if (!this.config.template) this.config.template = 'images'; }); mkws.registerWidgetType('google-image', function() { - mkws.promotionFunction('image').call(this); + mkws.promotionFunction('images').call(this); if (!this.config.target) this.config.target = 'Google_Images'; }); @@ -27,6 +27,6 @@ mkws.registerWidgetType('lolcat', function() { }); mkws.registerWidgetType('cover-art', function() { - mkws.promotionFunction('image').call(this); + mkws.promotionFunction('images').call(this); if (!this.config.target) this.config.target = 'AmazonBooks'; }); diff --git a/src/templates/image.handlebars b/src/templates/image.handlebars deleted file mode 100644 index f74f174..0000000 --- a/src/templates/image.handlebars +++ /dev/null @@ -1,21 +0,0 @@ -{{! -Records presented as images. - -The non-metadata keys enable an optional link to display an AJAX popup that -fetches additional record detail. - -hits: - containerClass - partial class attribute for element containing a record - detailLinkId - id for the element triggering detail display - detailClick - a click event handler for details - renderedDetails - active record details rendered from the Record template - md-* - metadata fields passed through from backend -}} -{{#each hits}} - - {{#mkws-first md-thumburl}} - {{../md-title}} - {{/mkws-first}} -
-
-{{/each}} diff --git a/src/templates/images.handlebars b/src/templates/images.handlebars new file mode 100644 index 0000000..f74f174 --- /dev/null +++ b/src/templates/images.handlebars @@ -0,0 +1,21 @@ +{{! +Records presented as images. + +The non-metadata keys enable an optional link to display an AJAX popup that +fetches additional record detail. + +hits: + containerClass - partial class attribute for element containing a record + detailLinkId - id for the element triggering detail display + detailClick - a click event handler for details + renderedDetails - active record details rendered from the Record template + md-* - metadata fields passed through from backend +}} +{{#each hits}} + + {{#mkws-first md-thumburl}} + {{../md-title}} + {{/mkws-first}} +
+
+{{/each}}