Revision: 1983
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1983&view=rev
Author:   cimorrison
Date:     2011-09-21 16:43:51 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Made the Rights column in the users table sort by user level code rather than 
string

Modified Paths:
--------------
    mrbs/branches/datatables/web/Themes/default/header.inc
    mrbs/branches/datatables/web/edit_users.php

Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-21 
16:25:10 UTC (rev 1982)
+++ mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-21 
16:43:51 UTC (rev 1983)
@@ -1211,6 +1211,10 @@
     {
       tableOptions.oColReorder.aiOrder.push(i);
     }
+    <?php
+    // The Rights column has a span with title for sorting
+    ?>
+    tableOptions.aoColumnDefs = [{"sType": "title-numeric", "aTargets": [1]}]; 
     <?php 
     // Fix the left hand two columns.  This has to be done when 
     // initialisation is complete as the language files are loaded

Modified: mrbs/branches/datatables/web/edit_users.php
===================================================================
--- mrbs/branches/datatables/web/edit_users.php 2011-09-21 16:25:10 UTC (rev 
1982)
+++ mrbs/branches/datatables/web/edit_users.php 2011-09-21 16:43:51 UTC (rev 
1983)
@@ -21,7 +21,7 @@
 *                          example by having booking admins, user admins     *
 *                          snd system admins.  (System admins might be       *
 *                          necessary in the future if, for example, some     *
-*                          parameters curreently in the config file are      *
+*                          parameters currently in the config file are      *
 *                          made editable from MRBS)                          *
 *                                                                            *
 *                 Only admins with at least user editing rights (level >=    *
@@ -814,7 +814,10 @@
           // special treatment for some fields
           case 'level':
             // the level field contains a code and we want to display a string
-            echo "<td><div>" . get_vocab("level_$col_value") . "</div></td>\n";
+            // (but we put the code in a span for sorting)
+            echo "<td>";
+            echo "<span title=\"$col_value\"></span>";
+            echo "<div>" . get_vocab("level_$col_value") . "</div></td>\n";
             break;
           case 'email':
             // we don't want to truncate the email address

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to