From: Mike Taylor Date: Thu, 17 Apr 2014 22:17:59 +0000 (+0100) Subject: Towards a Categories widget that actually does something. X-Git-Tag: 1.0.0~907^2~2 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=0c7d7cc39103aa776108fff06e8f3ebf43e7350c;p=mkws-moved-to-github.git Towards a Categories widget that actually does something. --- diff --git a/src/mkws-widget-categories.js b/src/mkws-widget-categories.js index 0b1f114..afb3875 100644 --- a/src/mkws-widget-categories.js +++ b/src/mkws-widget-categories.js @@ -7,7 +7,6 @@ mkws.registerWidgetType('Categories', function() { } this.team.queue("authenticated").subscribe(function(authName, realm) { - $(that.node).append("

Categories for " + realm + "

"); var req = new pzHttpRequest(that.config.pazpar2_url + "?command=categories", function(err) { alert("HTTP call for categories failed: " + err) }); @@ -18,7 +17,19 @@ mkws.registerWidgetType('Categories', function() { return; } that.log("got categories: " + data); - // Parse once we've figured out the format + + var text = []; + text.push("

Categories for " + realm + "

"); + text.push(""); + $(that.node).html(text.join('')); }); }); });