Revision: 1976
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1976&view=rev
Author:   cimorrison
Date:     2011-09-21 14:58:20 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Made the start time column in the pending table properly sortable

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

Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-21 
14:39:02 UTC (rev 1975)
+++ mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-21 
14:58:20 UTC (rev 1976)
@@ -1286,7 +1286,8 @@
         });
       maxActionWidth += 16; <?php // to allow for padding in the <td> ?>
       var colDefsMain = [{"sWidth": "1.2em", "aTargets": [0] },
-                         {"sWidth": maxActionWidth + "px", "aTargets": [6] }];
+                         {"sWidth": maxActionWidth + "px", "aTargets": [6] },
+                         {"sType": "title-numeric", "aTargets": [5]} ];
       <?php
       // Set up a click event that "opens" the table row and inserts the 
subtable
       ?>
@@ -1306,9 +1307,14 @@
                     ?>
                     maintable.find('tr').eq(0).find('th').each(function(i){
                         var def = new Object();
-                        if (i == 0)
+                        switch (i)
                         {
-                          def.bSortable = false;
+                          case 0: <?php // expand control ?>
+                            def.bSortable = false;
+                            break;
+                          case 5: <?php // start-time ?>
+                            def.sType = "title-numeric";
+                            break;
                         }
                         def.sWidth = ($(this).innerWidth()) + "px";
                         columns.push(def);

Modified: mrbs/branches/datatables/web/pending.php
===================================================================
--- mrbs/branches/datatables/web/pending.php    2011-09-21 14:39:02 UTC (rev 
1975)
+++ mrbs/branches/datatables/web/pending.php    2011-09-21 14:58:20 UTC (rev 
1976)
@@ -143,7 +143,11 @@
   echo "<td>"   . htmlspecialchars($row['area_name']) . "</td>\n";
   echo "<td>"   . htmlspecialchars($row['room_name']) . "</td>\n";
   
-  echo "<td>" . get_vocab("series") . "</td>\n";
+  echo "<td>";
+  // <span> for sorting
+  echo "<span title=\"" . $row['start_time'] . "\"></span>";
+  echo get_vocab("series");
+  echo "</td>\n";
   
   echo "<td>\n";
   display_buttons($row, TRUE);
@@ -169,6 +173,8 @@
   // start date, with a link to the day.php
   $link = getdate($row['start_time']);
   echo "<td>";
+  // <span> for sorting
+  echo "<span title=\"" . $row['start_time'] . "\"></span>";
   echo "<a 
href=\"day.php?day=$link[mday]&amp;month=$link[mon]&amp;year=$link[year]&amp;area=".$row['area_id']."\">";
   if(empty($row['enable_periods']))
   {

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