Author: jfthomps
Date: Wed Feb 25 15:02:24 2015
New Revision: 1662240

URL: http://svn.apache.org/r1662240
Log:
utils.php: modified getDojoHTML: added dojo initialization javascript for 
viewGroups section to set comparatorMap['name'] to nocasesort for 
usergroupstore and resourcegroupstore; this makes case get ignored when the 
tables are sorted by name

groups.js: added nocasesort

Modified:
    vcl/trunk/web/.ht-inc/utils.php
    vcl/trunk/web/js/groups.js

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1662240&r1=1662239&r2=1662240&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Wed Feb 25 15:02:24 2015
@@ -13127,6 +13127,12 @@ function getDojoHTML($refresh) {
                        $rt .= "   dojo.ready(function() {\n";
                        $rt .= "     buildUserFilterStores();\n";
                        $rt .= "     buildResourceFilterStores();\n";
+                       $rt .= "     if(! usergroupstore.comparatorMap)\n";
+                       $rt .= "       usergroupstore.comparatorMap = {};\n";
+                       $rt .= "     usergroupstore.comparatorMap['name'] = 
nocasesort;\n";
+                       $rt .= "     if(! resourcegroupstore.comparatorMap)\n";
+                       $rt .= "       resourcegroupstore.comparatorMap = 
{};\n";
+                       $rt .= "     resourcegroupstore.comparatorMap['name'] = 
nocasesort;\n";
                        $rt .= "   });\n";
                        if($mode == 'viewGroups')
                                $rt .= "  var firstscroll = 1;\n";

Modified: vcl/trunk/web/js/groups.js
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/js/groups.js?rev=1662240&r1=1662239&r2=1662240&view=diff
==============================================================================
--- vcl/trunk/web/js/groups.js (original)
+++ vcl/trunk/web/js/groups.js Wed Feb 25 15:02:24 2015
@@ -18,6 +18,16 @@ var xhrobj;
 var blockHide = 0;
 var currentOver = '';
 
+function nocasesort(a, b) {
+       var al = a.toLowerCase();
+       var bl = b.toLowerCase();
+       if(al < bl)
+               return -1;
+       if(bl < al)
+               return 1;
+       return 0;
+}
+
 function getGroupInfo(groupid) {
        var cont = dojo.byId('jsongroupinfocont').value;
        var domid = 'listicon' + groupid;


Reply via email to