Hi,

The ascending/descending order is not working in the backgrid while
clicking on the headers.
If this functionality is required then please find the attached fix for the
same.

Thanks,
Khushboo
diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js
index e1bdf81..debdfb7 100644
--- a/web/pgadmin/static/js/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid.pgadmin.js
@@ -144,6 +144,15 @@
           else
             return 1;
         }
+        else {
+          // if descending order, swap left and right
+          if (order === 1) t = l, l = r, r = t;
+
+           // compare as usual
+          if (l === r) return 0;
+          else if (l < r) return -1;
+          return 1;
+        }
       };
     }
   });
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to