fix sort bug introduced with multi-sort
authorJason Etheridge <jason@esilibrary.com>
Tue, 10 Apr 2012 17:15:09 +0000 (13:15 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Tue, 10 Apr 2012 17:37:28 +0000 (13:37 -0400)
The bug happens on columns without a defined sort_value

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/xul/staff_client/chrome/content/util/list.js

index b35c289..61d4853 100644 (file)
@@ -1749,8 +1749,8 @@ util.list.prototype = {
                                 } else {
                                     a = a.value;
                                     b = b.value;
-                                    if (obj.columns[p].getAttribute('sort_type')) {
-                                        switch(obj.columns[p].getAttribute('sort_type')) {
+                                    if (obj.columns[p].sort_type) {
+                                        switch(obj.columns[p].sort_type) {
                                             case 'date' :
                                                 JSAN.use('util.date'); // to pull in dojo.date.locale
                                                 a = dojo.date.locale.parse(a,{});