Revision: 2037
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2037&view=rev
Author:   cimorrison
Date:     2011-09-30 14:02:58 +0000 (Fri, 30 Sep 2011)
Log Message:
-----------
Added a title tooltip to the name column in the Search table.   Tidied up 
datatables code.

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

Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-30 
13:06:50 UTC (rev 2036)
+++ mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-30 
14:02:58 UTC (rev 2037)
@@ -242,20 +242,21 @@
                                       buttonText: '<?php echo 
get_vocab("show_hide_columns") ?>',
                                       bRestore: true,
                                       sRestore: '<?php echo 
get_vocab("restore_original") ?>'};
-            if (leftFixedMax !== undefined)
-            {
-              <?php 
-              // Fix the left hand column.  This has to be done when 
-              // initialisation is complete as the language files are loaded
-              // asynchronously
 
-              // Try and get a sensible value for the fixed column width, 
which is the
-              // smaller of the actual column width and a proportion of the 
overall table
-              // width.   (Unfortunately the actual column width is just the 
width of the
-              // column on the first page)
-              ?>
-              var leftWidth = getFixedColWidth(table, leftFixedMax);
-              defaultOptions.fnInitComplete = function(){
+            defaultOptions.fnInitComplete = function(){
+                if (leftFixedMax !== undefined)
+                {
+                  <?php 
+                  // Fix the left hand column.  This has to be done when 
+                  // initialisation is complete as the language files are 
loaded
+                  // asynchronously
+
+                  // Try and get a sensible value for the fixed column width, 
which is the
+                  // smaller of the actual column width and a proportion of 
the overall table
+                  // width.   (Unfortunately the actual column width is just 
the width of the
+                  // column on the first page)
+                  ?>
+                  var leftWidth = getFixedColWidth(table, leftFixedMax);
                   var oFC = new FixedColumns(oTable, {"iLeftColumns": 1,
                                                       "iLeftWidth": leftWidth,
                                                       "sLeftWidth": "fixed"});
@@ -265,18 +266,21 @@
                   // when first drawn
                   ?>
                   oTable.fnAdjustColumnSizing();
-                  $('.js div.datatable_container').css('visibility', 
'visible');
-                };
+                }
+                $('.js div.datatable_container').css('visibility', 'visible');
+              };
+              
+            if (leftFixedMax !== undefined)
+            {  
               <?php
-              // Remove the first column from the column visibility
-              // list because it is fixed
+              // If we've fixed the left hand column, then (a) remove the 
first column
+              // from the column visibility list because it is fixed and (b) 
stop it
+              // being reordered
               ?>
               defaultOptions.oColVis = {aiExclude: [0]};
-              <?php
-              // and stop it being reordered
-              ?>
               defaultOptions.oColReorder = {iFixedColumns: 1};
             }
+            
             <?php
             // Merge the specific options with the default options.  We do a 
deep
             // merge.
@@ -1399,11 +1403,8 @@
     // Turn the list of users into a dataTable
     ?>
     var tableOptions = new Object();
-    <?php
-    // The Rights column has a span with title for sorting
-    ?>
+    <?php // The Rights column has a span with title for sorting ?>
     tableOptions.aoColumnDefs = [{"sType": "title-numeric", "aTargets": [1]}]; 
-    
     var usersTable = makeDataTable('#users_table', tableOptions, 0.33);
     <?php
   }
@@ -1526,7 +1527,7 @@
         };
       <?php
       // Remove the first column from the column visibility
-      // list because it is fixed
+      // list because it is the control column
       ?>
       tableOptions.oColVis = {aiExclude: [0]};
       <?php

Modified: mrbs/branches/datatables/web/search.php
===================================================================
--- mrbs/branches/datatables/web/search.php     2011-09-30 13:06:50 UTC (rev 
2036)
+++ mrbs/branches/datatables/web/search.php     2011-09-30 14:02:58 UTC (rev 
2037)
@@ -69,7 +69,8 @@
   
   $values = array();
   // booking name
-  $values[] = "<a href=\"view_entry.php?id=".$row['entry_id']."\">" . 
htmlspecialchars($row['name']) . "</a>";
+  $html_name = htmlspecialchars($row['name']);
+  $values[] = "<a title=\"$html_name\" href=\"view_entry.php?id=" . 
$row['entry_id'] . "\">$html_name</a>";
   // created by
   $values[] = htmlspecialchars($row['create_by']);
   // start time and link to day view

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


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to