From 0c7d7cc39103aa776108fff06e8f3ebf43e7350c Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 17 Apr 2014 23:17:59 +0100 Subject: [PATCH] Towards a Categories widget that actually does something. --- src/mkws-widget-categories.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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('')); }); }); }); -- 1.7.10.4