Remove unnecessary (and unused) hardwired default.
[mkws-moved-to-github.git] / src / mkws-widget-main.js
index 0ee99f3..53e2f5c 100644 (file)
@@ -22,6 +22,7 @@ mkws.registerWidgetType('targets', function() {
       cur.id = data[i].id;
       cur.hits = data[i].hits;
       cur.diagnostic = data[i].diagnostic;
+      cur.message = data[i].message;
       cur.records = data[i].records;
       cur.state = data[i].state;
       cleandata.push(cur);
@@ -55,7 +56,7 @@ mkws.registerWidgetType('pager', function() {
     output.found = data.total;
 
     //client indexes pages from 1 but pz2 from 0
-    var onsides = 6;
+    var onsides = 5;
     var pages = Math.ceil(that.team.totalRecordCount() / that.team.perpage());
     var currentPage = that.team.currentPage();
 
@@ -105,7 +106,6 @@ mkws.registerWidgetType('details', function() {
       that.node.html(template(data));
     }
   });
-  that.autosearch();
 });
 
 mkws.registerWidgetType('records', function() {
@@ -130,8 +130,9 @@ mkws.registerWidgetType('records', function() {
       }
     }
     var template = team.loadTemplate(that.config.template || "records");
-    var targs = $.extend({}, {"hits": data.hits}, that.config.template_vars);
-    that.node.html(template(targs));
+    var summaryPartial = team.loadTemplate("summary");
+    var tdata = $.extend({}, {"hits": data.hits}, that.config.template_vars);
+    that.node.html(template(tdata, {"partials":{"summary":summaryPartial}}));
   });
 
   that.autosearch();
@@ -287,7 +288,7 @@ mkws.registerWidgetType('lang', function() {
   var list = [];
 
   /* display a list of configured languages, or all */
-  var lang_options = this.config.lang_options || [];
+  var lang_options = this.config.lang_options;
   var toBeIncluded = {};
   for (var i = 0; i < lang_options.length; i++) {
     toBeIncluded[lang_options[i]] = true;