Revision: 1044
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1044&view=rev
Author:   cimorrison
Date:     2009-03-05 17:31:16 +0000 (Thu, 05 Mar 2009)

Log Message:
-----------
Fixed bug which caused highlighting not to work in IE6 when the 
$main_cell_height is increased from its default.   See SF Tracker 2548900.  
Thanks to D. Faulkner for the solution.

Modified Paths:
--------------
    mrbs/trunk/web/mrbs.css.php
    mrbs/trunk/web/xbLib.js

Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2009-03-02 15:03:05 UTC (rev 1043)
+++ mrbs/trunk/web/mrbs.css.php 2009-03-05 17:31:16 UTC (rev 1044)
@@ -73,6 +73,7 @@
     vertical-align: middle}
     
 .naked {margin: 0; padding: 0; border-width: 0} /* Invisible tables used for 
internal needs */
+table.naked {width: 100%; height: 100%}
 table:hover.naked {cursor: pointer}   /* set cursor to pointer; if you don't 
it doesn't show up when show_plus_link is false */
 
 

Modified: mrbs/trunk/web/xbLib.js
===================================================================
--- mrbs/trunk/web/xbLib.js     2009-03-02 15:03:05 UTC (rev 1043)
+++ mrbs/trunk/web/xbLib.js     2009-03-05 17:31:16 UTC (rev 1044)
@@ -435,7 +435,20 @@
 |                   IE5+, NS6+    Yes.                                        |
 |                   Opera 6       Yes.                                        |
 |                                                                             |
-|   Notes:          This code implements 3 methods for highlighting cells:    |
+|   Notes:          For all browsers other than IE6 and below, highlighting   |
+|                   is done using CSS, i.e. by using tr:hover and td:hover.   |
+|                   But since IE6 and below do not support the hover pseudo-  |
+|                   class on elements other than <a>, we have to use          |
+|                   JavaScript for those browsers.    (Theoretically we       |
+|                   would also have to for early versions of other browsers,  |
+|                   but we are making the assumption that if people are       |
+|                   using non-IE browsers, then they will have upgraded at    |
+|                   least to a version that properly supports the :hover      |
+|                   pseudo-class).                                            |
+|                                                                             |
+|                   For IE6 and below, this code implements 3 methods for     |
+|                   highlighting cells, all using JavaScript:                 |
+|                                                                             |
 |                   highlight_method="bgcolor"                                |
 |                       Dynamically changes the cell background color.        |
 |                       Advantage: Works with most javascript-capable browsers.
@@ -453,6 +466,17 @@
 |                       Advantage: Fast on all machines; color defined in CSS.|
 |                       Drawback: Not as powerful as the class method.        |
 |                                                                             |
+|                   (Note that if you try and force newer browsers to use     |
+|                   JavaScript highlighting, by forcing use_css_highlighting  |
+|                   to be false, then this won't work unless you remove the   |
+|                   CSS rules.    What can happen is that if the CSS :hover   |
+|                   event gets triggered before the onMouseOver event, then   |
+|                   the CSS will change the background colour, and when       |
+|                   JavaScript eventually arrives and reads what it thinks is |
+|                   the "old" background colour it actually reads the         |
+|                   highlight colour that has just been set by CSS.  So the   |
+|                   cell gets stuck at the highlight colour.)                 |
+|                                                                             |
 |   History:                                                                  |
 |                                                                             |
 |    2004/03/01 JFL Initial implementation.                                   |
@@ -742,7 +766,7 @@
 {
   if (useJS)
   {
-    document.write("<table class=\"naked\" width=\"100%\" cellSpacing=\"0\" 
onMouseOver=\"ActivateCell(this)\" onMouseOut=\"UnactivateCell(this)\" 
onClick=\"GotoLink(this)\">\n<td class=\"naked\" style=\"border: 0px\">\n");
+    document.write("<table class=\"naked\" cellSpacing=\"0\" 
onMouseOver=\"ActivateCell(this)\" onMouseOut=\"UnactivateCell(this)\" 
onClick=\"GotoLink(this)\">\n<td class=\"naked\" style=\"border: 0\">\n");
     // Note: The &nbsp; below is necessary to fill-up the cell. Empty cells 
behave badly in some browsers.
     if (!show_plus_link)
     {


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

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to