X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget-record.js;h=ba3fce2527ae9a7ca7cb11ef5a87073bd023e571;hb=36721667730b5d8aae5b6df304f69d96f2c1d21d;hp=13d67c37299f491acdfeac8fc3a8b864921426cf;hpb=6c46a50ba2658fb08aeb3cf12fa1b6558ca28057;p=mkws-moved-to-github.git diff --git a/src/mkws-widget-record.js b/src/mkws-widget-record.js index 13d67c3..ba3fce2 100644 --- a/src/mkws-widget-record.js +++ b/src/mkws-widget-record.js @@ -1,32 +1,32 @@ // A widget for one record -mkws.registerWidgetType('Record', function() { +mkws.registerWidgetType('record', function() { if (!this.config.maxrecs) this.config.maxrecs = 1; var that = this; var team = this.team; team.queue("records").subscribe(function(data) { - var template = team.loadTemplate(that.config.template || "Record"); - var targs = $.extend({}, data.hits[0], that.config.template_vars); + var template = team.loadTemplate(that.config.template || "details"); + var targs = mkws.$.extend({}, data.hits[0], that.config.template_vars); that.node.html(template(targs)); }); that.autosearch(); }); -mkws.registerWidgetType('Image', function() { - mkws.promotionFunction('Records').call(this); +mkws.registerWidgetType('image', function() { + mkws.promotionFunction('records').call(this); if (!this.config.template) this.config.template = 'Image'; }); -mkws.registerWidgetType('GoogleImage', function() { - mkws.promotionFunction('Image').call(this); +mkws.registerWidgetType('google-image', function() { + mkws.promotionFunction('image').call(this); if (!this.config.target) this.config.target = 'Google_Images'; }); -mkws.registerWidgetType('Lolcat', function() { - mkws.promotionFunction('GoogleImage').call(this); +mkws.registerWidgetType('lolcat', function() { + mkws.promotionFunction('google-image').call(this); if (!this.config.autosearch) this.config.autosearch = 'kitteh'; }); -mkws.registerWidgetType('Coverart', function() { - mkws.promotionFunction('Image').call(this); +mkws.registerWidgetType('cover-art', function() { + mkws.promotionFunction('image').call(this); if (!this.config.target) this.config.target = 'AmazonBooks'; });