Re-indent.
authorMike Taylor <mike@indexdata.com>
Wed, 7 May 2014 12:19:54 +0000 (13:19 +0100)
committerMike Taylor <mike@indexdata.com>
Wed, 7 May 2014 12:19:54 +0000 (13:19 +0100)
src/mkws-widget-categories.js

index 6ce09fe..e9e004a 100644 (file)
@@ -1,35 +1,35 @@
 mkws.registerWidgetType('Categories', function() {
 mkws.registerWidgetType('Categories', function() {
-    var that = this;
+  var that = this;
 
 
-    if (!this.config.use_service_proxy) {
-       alert("can't use categories widget without Service Proxy");
-       return;
-    }
+  if (!this.config.use_service_proxy) {
+    alert("can't use categories widget without Service Proxy");
+    return;
+  }
 
 
-    this.team.queue("authenticated").subscribe(function(authName, realm) {
-       var req = new pzHttpRequest(that.config.pazpar2_url + "?command=categories", function(err) {
-           alert("HTTP call for categories failed: " + err)
-       });
+  this.team.queue("authenticated").subscribe(function(authName, realm) {
+    var req = new pzHttpRequest(that.config.pazpar2_url + "?command=categories", function(err) {
+      alert("HTTP call for categories failed: " + err)
+    });
 
 
-       req.get(null, function(data) {
-           if (!$.isXMLDoc(data)) {
-               alert("categories response document is not XML");
-               return;
-           }
-           that.log("got categories: " + data);
+    req.get(null, function(data) {
+      if (!$.isXMLDoc(data)) {
+       alert("categories response document is not XML");
+       return;
+      }
+      that.log("got categories: " + data);
 
 
-            var text = [];
-            text.push("Select category: ");
-            text.push("<select name='mkwsCategory' " +
-                     "onchange='mkws.limitCategory(\"" + that.team.name() + "\", this.value)'>");
-            text.push("<option value=''>[All]</option>");
-            $(data).find('category').each(function() {
-                var name = $(this).find('categoryName').text();
-                var id = $(this).find('categoryId').text();
-                text.push("<option value='", id, "'>", name, "</option>");
-            });
-            text.push("</select>");
-           $(that.node).html(text.join(''));
-       });
+      var text = [];
+      text.push("Select category: ");
+      text.push("<select name='mkwsCategory' " +
+               "onchange='mkws.limitCategory(\"" + that.team.name() + "\", this.value)'>");
+      text.push("<option value=''>[All]</option>");
+      $(data).find('category').each(function() {
+        var name = $(this).find('categoryName').text();
+        var id = $(this).find('categoryId').text();
+        text.push("<option value='", id, "'>", name, "</option>");
+      });
+      text.push("</select>");
+      $(that.node).html(text.join(''));
     });
     });
+  });
 });
 });