Revision: 1952
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1952&view=rev
Author:   cimorrison
Date:     2011-09-15 17:06:59 +0000 (Thu, 15 Sep 2011)
Log Message:
-----------
Turned off table enhancement for IE6

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

Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-15 
16:54:21 UTC (rev 1951)
+++ mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-15 
17:06:59 UTC (rev 1952)
@@ -189,7 +189,7 @@
         {
           if (lteIE6)
           {
-            return FALSE;
+            return false;
           }
           else
           {
@@ -461,7 +461,7 @@
         formInput = form.find('[name="<?php echo $param ?>"]:not(:disabled)');
         <?php
         // Scalar parameters (two types - checkboxes and the rest)
-        if (strpos($param, '[]') === FALSE)
+        if (strpos($param, '[]') === false)
         {
           ?>
           if (formInput.filter(':checkbox').length > 0)
@@ -1204,109 +1204,111 @@
     // something clever with the main search box and get it to search the 
subtables as well)
     //
     ?>
-    var maintable = $('#pending_table');
-    <?php
-    // Add a '-' control to the subtables and make them close on clicking it
-    ?>
-    maintable.find('table.sub th.control')
-             .text('-')
-             .live('click', function (event) {
-                  var nTr = 
$(this).parents('.table_container').parent().prev();
-                  var serial = 
$(this).parent().parent().parent().attr('id').replace('subtable_', '');
-                  $('#subtable_' + serial + '_wrapper').slideUp( function () {
-                      pendingTable.fnClose(nTr.get(0));
-                      nTr.show();
-                    });
-                });
-    <?php
-    // Detach all the subtables from the DOM (detach keeps a copy) so that they
-    // don't appear, but so that we've got the data when we want to "open" a 
row
-    ?>
-    var subtables = maintable.find('tr.sub_table').detach();
-    <?php
-    // Set up the column definitions, fixing the widths of the first and last 
columns
-    ?>
-    var actionWidth = $('div.div_buttons').eq(0).outerWidth() + 30;  <?php // 
30 to allow for padding in the <td> ?>
-    var colDefsMain = [{"sWidth": "1.2em", "aTargets": [0] },
-                       {"sWidth": actionWidth + "px", "aTargets": [6] }];
-    var colDefsSub = colDefsMain.slice(0);
-    colDefsSub.push({"bSortable": false, "aTargets": [ 0 ]});
+    if (!lteIE6)
+    {
+      var maintable = $('#pending_table');
+      <?php
+      // Add a '-' control to the subtables and make them close on clicking it
+      ?>
+      maintable.find('table.sub th.control')
+               .text('-')
+               .live('click', function (event) {
+                    var nTr = 
$(this).parents('.table_container').parent().prev();
+                    var serial = 
$(this).parent().parent().parent().attr('id').replace('subtable_', '');
+                    $('#subtable_' + serial + '_wrapper').slideUp( function () 
{
+                        pendingTable.fnClose(nTr.get(0));
+                        nTr.show();
+                      });
+                  });
+      <?php
+      // Detach all the subtables from the DOM (detach keeps a copy) so that 
they
+      // don't appear, but so that we've got the data when we want to "open" a 
row
+      ?>
+      var subtables = maintable.find('tr.sub_table').detach();
+      <?php
+      // Set up the column definitions, fixing the widths of the first and 
last columns
+      ?>
+      var actionWidth = $('div.div_buttons').eq(0).outerWidth() + 30;  <?php 
// 30 to allow for padding in the <td> ?>
+      var colDefsMain = [{"sWidth": "1.2em", "aTargets": [0] },
+                         {"sWidth": actionWidth + "px", "aTargets": [6] }];
+      var colDefsSub = colDefsMain.slice(0);
+      colDefsSub.push({"bSortable": false, "aTargets": [ 0 ]});
     
-    <?php
-    // Set up a click event that "opens" the table row and inserts the subtable
-    ?>
-    maintable.find('td.control')
-             .text('+')
-             .live('click', function (event) {
-                  var nTr = $(this).parent();
-                  var serial = nTr.attr('id').replace('row_', '');
-                  var subtableId = 'subtable_' + serial;
-                  var subtable = subtables.find('#' + 
subtableId).parent().clone();
+      <?php
+      // Set up a click event that "opens" the table row and inserts the 
subtable
+      ?>
+      maintable.find('td.control')
+               .text('+')
+               .live('click', function (event) {
+                    var nTr = $(this).parent();
+                    var serial = nTr.attr('id').replace('row_', '');
+                    var subtableId = 'subtable_' + serial;
+                    var subtable = subtables.find('#' + 
subtableId).parent().clone();
                                    
-                  var colDefsSub = [{"bAutoWidth": false}];
-                  var columns = [];
+                    var colDefsSub = [{"bAutoWidth": false}];
+                    var columns = [];
                   
-                  <?php
-                  // We want the columns in the main and sub tables to align.  
So
-                  // find the widths of the main table columns and use those 
values
-                  // to set the widths of the subable columns.   [This doesn't 
work
-                  // 100% - I'm not sure why - but I have left the code in]
-                  ?>
-                  maintable.find('tr').eq(0).find('th').each(function(i){
-                      var def = new Object();
-                      if (i == 0)
-                      {
-                        def.bSortable = false;
-                      }
-                      def.sWidth = ($(this).innerWidth()) + "px";
-                      columns.push(def);
-                    });
+                    <?php
+                    // We want the columns in the main and sub tables to 
align.  So
+                    // find the widths of the main table columns and use those 
values
+                    // to set the widths of the subable columns.   [This 
doesn't work
+                    // 100% - I'm not sure why - but I have left the code in]
+                    ?>
+                    maintable.find('tr').eq(0).find('th').each(function(i){
+                        var def = new Object();
+                        if (i == 0)
+                        {
+                          def.bSortable = false;
+                        }
+                        def.sWidth = ($(this).innerWidth()) + "px";
+                        columns.push(def);
+                      });
 
-                  nTr.hide();
-                  pendingTable.fnOpen(nTr.get(0), subtable.get(0), 
'table_container');
+                    nTr.hide();
+                    pendingTable.fnOpen(nTr.get(0), subtable.get(0), 
'table_container');
 
-                  $('#' + subtableId).dataTable({"bAutoWidth": false,
-                                                 "sDom": 't',
-                                                 "aoColumns": columns});
+                    $('#' + subtableId).dataTable({"bAutoWidth": false,
+                                                   "sDom": 't',
+                                                   "aoColumns": columns});
 
-                  $('#subtable_' + serial + '_wrapper').hide().slideDown();
-                });
+                    $('#subtable_' + serial + '_wrapper').hide().slideDown();
+                  });
                   
-    <?php // Turn the table into a datatable ?>
-    var tableOptions = new Object();
-    tableOptions.aoColumnDefs = colDefsMain;
+      <?php // Turn the table into a datatable ?>
+      var tableOptions = new Object();
+      tableOptions.aoColumnDefs = colDefsMain;
+      <?php
+      // For some reason I don't understand, fnOpen() doesn't seem to work when
+      // using FixedColumns.    You also have to disable bStateSave to get it 
to work.
+      // I have raised this on the dataTables forum.  In the meantime we 
disable
+      // bStateSave and sScrollX and comment out the FixedColumns.
+      ?>
+      tableOptions.bStateSave = false;
+      tableOptions.sScrollX = '';
+      <?php 
+      // Fix the left hand column.  This has to be done when 
+      // initialisation is complete as the language files are loaded
+      // asynchronously
+      /*
+      ?>
+      tableOptions.fnInitComplete = function(){
+          new FixedColumns(pendingTable, {"iLeftColumns": 1,
+                                          "iLeftWidth": 30,
+                                          "sLeftWidth": "fixed"});
+        };
+      <?php
+      */
+      // Remove the first column from the column visibility
+      // list because it is fixed
+      ?>
+      tableOptions.oColVis = {aiExclude: [0]};
+      <?php
+      // and stop the first column being reordered
+      ?>
+      tableOptions.oColReorder = {"iFixedColumns": 1};
+      var pendingTable = makeDataTable('#pending_table', tableOptions);
+    }  // if (!lteie6)
     <?php
-    // For some reason I don't understand, fnOpen() doesn't seem to work when
-    // using FixedColumns.    You also have to disable bStateSave to get it to 
work.
-    // I have raised this on the dataTables forum.  In the meantime we disable
-    // bStateSave and sScrollX and comment out the FixedColumns.
-    ?>
-    tableOptions.bStateSave = false;
-    tableOptions.sScrollX = '';
-    <?php 
-    // Fix the left hand column.  This has to be done when 
-    // initialisation is complete as the language files are loaded
-    // asynchronously
-    /*
-    ?>
-    tableOptions.fnInitComplete = function(){
-        new FixedColumns(pendingTable, {"iLeftColumns": 1,
-                                        "iLeftWidth": 30,
-                                        "sLeftWidth": "fixed"});
-      };
-    <?php
-    */
-    // Remove the first column from the column visibility
-    // list because it is fixed
-    ?>
-    tableOptions.oColVis = {aiExclude: [0]};
-    <?php
-    // and stop the first column being reordered
-    ?>
-    tableOptions.oColReorder = {"iFixedColumns": 1};
-    var pendingTable = makeDataTable('#pending_table', tableOptions);
-
-    <?php
   }
 
   // REPORT.PHP

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


------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to