From 8f25a83e45be2679b195e104a1bec3e2300869ce Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Fri, 6 Feb 2015 11:01:16 -0500 Subject: [PATCH] Template waiting widget MKWS-375 --- src/mkws-widget-main.js | 6 ++++-- src/templates/waiting.handlebars | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/templates/waiting.handlebars 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 +}} + -- 1.7.10.4