From 23bacc1691b42d9b2e131b7f47c9fcb2f72e3e6f Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Thu, 23 Oct 2014 14:57:59 -0400 Subject: [PATCH] More accurately name image widget as images --- src/mkws-widget-record.js | 8 ++++---- src/templates/image.handlebars | 21 --------------------- src/templates/images.handlebars | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 src/templates/image.handlebars create mode 100644 src/templates/images.handlebars 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}} -- 1.7.10.4