Change mkws-widget-categories.js to access the pazpar2 URL via the new
authorMike Taylor <mike@indexdata.com>
Fri, 22 Aug 2014 09:54:35 +0000 (10:54 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 22 Aug 2014 09:54:35 +0000 (10:54 +0100)
API function. But this makes me uneasy -- that seems like too low a
level for the widget to be operating at. I think it should be sending
its categories request via the team's existing m_paz object.

src/mkws-widget-categories.js

index 339e28b..6982db8 100644 (file)
@@ -7,7 +7,7 @@ mkws.registerWidgetType('Categories', function() {
   }
 
   this.team.queue("authenticated").subscribe(function(authName, realm) {
-    var req = new pzHttpRequest(that.config.pazpar2_url + "?command=categories", function(err) {
+    var req = new pzHttpRequest(mkws.pazpar2_url() + "?command=categories", function(err) {
       alert("HTTP call for categories failed: " + err)
     });