1 mkws.registerWidgetType('Categories', function() {
4 if (!this.config.use_service_proxy) {
5 alert("can't use categories widget without Service Proxy");
9 this.team.queue("authenticated").subscribe(function(authName, realm) {
10 $(that.node).append("<p><b>Categories for " + realm + "</b></p>");
11 var req = new pzHttpRequest(that.config.pazpar2_url + "?command=categories", function(err) {
12 alert("HTTP call for categories failed: " + err)
15 req.get(null, function(data) {
16 if (!$.isXMLDoc(data)) {
17 alert("categories response document is not XML");
20 that.log("got categories: " + data);
21 // Parse once we've figured out the format