Revision: 1882
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1882&view=rev
Author:   cimorrison
Date:     2011-08-24 09:52:34 +0000 (Wed, 24 Aug 2011)

Log Message:
-----------
Turned the report table into a DataTable.   Still lots of rough edges.

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

Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc      2011-08-24 
09:28:52 UTC (rev 1881)
+++ mrbs/branches/datatables/web/Themes/default/header.inc      2011-08-24 
09:52:34 UTC (rev 1882)
@@ -142,7 +142,7 @@
     
     <?php
     // dataTables initialisation
-    if (in_array($page, array('admin', 'edit_users')))
+    if (in_array($page, array('admin', 'edit_users', 'report')))
     {
 
       // Include the JavaScript for those pages that use dataTables
@@ -1116,6 +1116,30 @@
         echo generate_autocomplete('match_' . substr($field, 
strlen('entry.')), $options);
       }
     }
+    
+    // Turn the list of users into a dataTable
+    ?>
+    var tableOptions = new Object();
+    <?php 
+    // Fix the left hand two columns.  This has to be done when 
+    // initialisation is complete as the language files are loaded
+    // asynchronously
+    ?>
+    tableOptions.fnInitComplete = function(){
+        new FixedColumns(reportTable, {"iLeftColumns": 2});
+      };
+    <?php
+    // Remove the first two columns from the column visibility
+    // list because these two are fixed
+    ?>
+    tableOptions.oColVis = {aiExclude: [0,1]};
+    <?php
+    // and stop those first two columns being reordered
+    ?>
+    tableOptions.oColReorder = {iFixedColumns: 2};
+    
+    var reportTable = makeDataTable('#report_table', tableOptions);
+    <?php
   }
 
   // SEARCH.PHP

Modified: mrbs/branches/datatables/web/report.php
===================================================================
--- mrbs/branches/datatables/web/report.php     2011-08-24 09:28:52 UTC (rev 
1881)
+++ mrbs/branches/datatables/web/report.php     2011-08-24 09:52:34 UTC (rev 
1882)
@@ -84,8 +84,8 @@
   $values[] = get_vocab("area") . ' - ' . get_vocab("room");
   $values[] = get_vocab("namebooker");
   $values[] = get_vocab("start_date");
+  $values[] = get_vocab("end_date");
   $values[] = get_vocab("duration");
-  $values[] = get_vocab("end_date");
   $values[] = get_vocab("fulldescription_short");
   $values[] = get_vocab("type"); 
   $values[] = get_vocab("createdby");


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

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to