Paging repairs for Event definition admin UI user/berick/event-def-ui-sorting-improvement
authorBill Erickson <berick@esilibrary.com>
Wed, 1 Feb 2012 18:53:55 +0000 (13:53 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 1 Feb 2012 18:53:55 +0000 (13:53 -0500)
If there are multiple event definitions with the same name that lie along
the page boundaries, it's possible to page through event definitions
seeing some def's multiple times and others never.  This is a result of
sorting solely on event def. name when fetching event def's for display.
This patch adds secondary (and tertiary, and quaternary, and quinary)
sort columns as tie breakers to guarantee a unique set of defs across
pages.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/conify/global/action_trigger/event_definition.js

index 1eba4a6..2867bb1 100644 (file)
@@ -17,7 +17,7 @@ function loadEventDef() {
     eventDefGranularity.attr('value', null);
     edGrid.overrideEditWidgets.granularity = eventDefGranularity;
     edGrid.overrideEditWidgets.granularity.shove = {"create": ""};
-    edGrid.loadAll({order_by:{atevdef : 'name'}}); 
+    edGrid.loadAll({order_by:{atevdef : 'name, owner, hook, reactor, delay'}});
     openils.widget.Textarea.width = '600px';
     openils.widget.Textarea.height = '600px';
     edGrid.overrideEditWidgetClass.template = 'openils.widget.Textarea';