From: Jason Skomorowski Date: Fri, 6 Feb 2015 16:01:16 +0000 (-0500) Subject: Template waiting widget MKWS-375 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=8f25a83e45be2679b195e104a1bec3e2300869ce;p=mkws-moved-to-github.git Template waiting widget MKWS-375 --- diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index 2a68283..22a5f59 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -388,8 +388,10 @@ mkws.registerWidgetType('waiting', function() { var that = this; this.node.css("visibility", "hidden"); - var src = this.config.src || "http://mkws.indexdata.com/progress.gif"; - this.node.html(''); + var template = that.team.loadTemplate(that.config.template || "waiting"); + this.node.html(template({ + src: this.config.src || "http://mkws.indexdata.com/progress.gif" + })); this.team.queue("searchtriggered").subscribe(function(data) { that.node.css("visibility", "visible"); diff --git a/src/templates/waiting.handlebars b/src/templates/waiting.handlebars new file mode 100644 index 0000000..b9c1ab4 --- /dev/null +++ b/src/templates/waiting.handlebars @@ -0,0 +1,6 @@ +{{! +Search activity indicator + +src - image to display when active +}} +