Part of MKWS-64.
authorMike Taylor <mike@indexdata.com>
Sat, 2 May 2015 19:13:56 +0000 (20:13 +0100)
committerMike Taylor <mike@indexdata.com>
Sat, 2 May 2015 19:13:56 +0000 (20:13 +0100)
When a page-size is selected, update the URL rather then changing
state directly.

src/mkws-widget-main.js

index 509939f..733dfb2 100644 (file)
@@ -227,10 +227,7 @@ mkws.registerWidgetType('per-page', function() {
   var that = this;
 
   this.node.change(function() {
-    that.team.set_perpage(that.node.val());
-    if (that.team.submitted()) {
-      that.team.reShow();
-    }
+    window.location.href = '#' + that.team.urlFragment({ size: that.node.val() });
     return false;
   });
 });