Revision: 1123
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1123&view=rev
Author:   cimorrison
Date:     2009-06-22 22:06:36 +0000 (Mon, 22 Jun 2009)

Log Message:
-----------
Fixed a problem (reported as SF Feature Request 249087) which meant that if 
$clipped is set to FALSE, then empty cells are no longer clickable.  (The fix 
isn't a perfect fix, but at least means that the system is usable when $clipped 
is set to FALSE.   In particular the fix doesn't work on IE6 and IE7 and so for 
those browsers $clipped is ignored and assumed to be TRUE.   For other 
browsers, empty cells are only clickable in the top section - ie if one of the 
cells in a row is stretched because the content is too large for the cell, then 
the empty cells are only clickable in the standard height portion - and 
bookings are only clickable for the height of the text rather than over the 
whole cell.

Modified Paths:
--------------
    mrbs/trunk/web/config.inc.php
    mrbs/trunk/web/mrbs.css.php
    mrbs/trunk/web/style.inc

Added Paths:
-----------
    mrbs/trunk/web/mrbs-ielte7.css.php

Removed Paths:
-------------
    mrbs/trunk/web/mrbs-ielte7.css

Modified: mrbs/trunk/web/config.inc.php
===================================================================
--- mrbs/trunk/web/config.inc.php       2009-06-19 21:58:03 UTC (rev 1122)
+++ mrbs/trunk/web/config.inc.php       2009-06-22 22:06:36 UTC (rev 1123)
@@ -294,7 +294,23 @@
 // Default is 0
 $default_room = 0;
 
+// Define clipping behaviour for the cells in the day and week views.
+// Set to TRUE if you want the cells in the day and week views to be clipped.  
 This
+// gives a table where all the rows have the same hight, regardless of content.
+// Alternatively set to FALSE if you want the cells to expand to fit the 
content.
+// (FALSE not supported in IE6 and IE7 due to their incomplete CSS support)
+$clipped = TRUE;                
 
+// Define clipping behaviour for the cells in the month view.                  
         
+// Set to TRUE if you want the cells in the month view to scroll if there are 
too
+// many bookings to display; set to FALSE if you want the table cell to expand 
to
+// accommodate the bookings.   (NOTE: (1) scrolling doesn't work in IE6 and so 
the table
+// cell will always expand in IE6.  (2) In IE8 Beta 2 scrolling doesn't work 
either and
+// the cell content is clipped when $month_cell_scrolling is set to TRUE.)
+$month_cell_scrolling = TRUE;   
+                                
+
+
 /************************
  * Miscellaneous settings
  ************************/

Deleted: mrbs/trunk/web/mrbs-ielte7.css
===================================================================
--- mrbs/trunk/web/mrbs-ielte7.css      2009-06-19 21:58:03 UTC (rev 1122)
+++ mrbs/trunk/web/mrbs-ielte7.css      2009-06-22 22:06:36 UTC (rev 1123)
@@ -1,13 +0,0 @@
-/* $Id$ */
-
-/* Fixes for Internet Explorer 7 and less */
-
-
-/* ------------ TRAILER.INC ---------------------*/
-
-/* opacity for IE7 and below is implemented with filter, but only works if the 
*/
-/* element is positioned;  you can also get filter to work by using zoom.      
*/
-#trailer span.hidden {
-    zoom: 1;                   /* to force the filter to work */
-    filter: alpha(opacity=50); /* keep the value in step with the main 
stylesheet */
-}

Copied: mrbs/trunk/web/mrbs-ielte7.css.php (from rev 1121, 
mrbs/trunk/web/mrbs-ielte7.css)
===================================================================
--- mrbs/trunk/web/mrbs-ielte7.css.php                          (rev 0)
+++ mrbs/trunk/web/mrbs-ielte7.css.php  2009-06-22 22:06:36 UTC (rev 1123)
@@ -0,0 +1,51 @@
+<?php 
+
+// $Id$
+
+header("Content-type: text/css");
+require_once "config.inc.php";
+require_once "theme.inc"; 
+
+?>
+
+/* Fixes for Internet Explorer 7 and less */
+
+/* ------------ DAY/WEEK/MONTH.PHP ------------------*/
+
+<?php
+// IE7 and below do not support the value of inherit for min-height (and
+// indeed support for min-height is patchy) so we cannot support $clipped = 
FALSE
+// as that relies on it.    If $clipped is FALSE, we'll just use the same rule 
as
+// we do when $clipped is TRUE.
+?>
+
+.dwm_main a {height: 100%}  /* for IE7 */
+
+<?php
+if (!$clipped)
+{
+  $classes_required = ($times_along_top) ? 1 : $max_slots;
+  for ($i=1; $i<=$classes_required; $i++) 
+  {
+    $div_height = $main_cell_height * $i;
+    $div_height = $div_height + (($i-1)*$main_table_cell_border_width);
+    $div_height = (int) $div_height;    // Make absolutely sure it's an int to 
avoid generating invalid CSS
+  
+    $rule = "div.slots" . $i . " {";
+    $rule .= "max-height: " . $div_height . "px";
+    $rule .= "; height: "   . $div_height . "px";
+    $rule .= "}";
+    echo $rule . "\n";
+  }
+}
+?>
+
+
+/* ------------ TRAILER.INC ---------------------*/
+
+/* opacity for IE7 and below is implemented with filter, but only works if the 
*/
+/* element is positioned;  you can also get filter to work by using zoom.      
*/
+#trailer span.hidden {
+    zoom: 1;                   /* to force the filter to work */
+    filter: alpha(opacity=50); /* keep the value in step with the main 
stylesheet */
+}

Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2009-06-19 21:58:03 UTC (rev 1122)
+++ mrbs/trunk/web/mrbs.css.php 2009-06-22 22:06:36 UTC (rev 1123)
@@ -6,20 +6,7 @@
 require_once "config.inc.php";
 require_once "theme.inc";
 
-
-// ***** SETTINGS ***********************
-
-$clipped = TRUE;                // Set to TRUE if you want the cells in the 
day and week views to be clipped.   This
-                                // gives a table where all the rows have the 
same hight, regardless of content.
-                                // Alternatively set to FALSE if you want the 
cells to expand to fit the content.
-  
-$month_cell_scrolling = TRUE;   // set to TRUE if you want the cells in the 
month view to scroll if there are too
-                                // many bookings to display; set to FALSE if 
you want the table cell to expand to
-                                // accommodate the bookings.   (NOTE: (1) 
scrolling doesn't work in IE6 and so the table
-                                // cell will always expand in IE6.  (2) In IE8 
Beta 2 scrolling doesn't work either and
-                                // the cell content is clipped when 
$month_cell_scrolling is set to TRUE.)
                                 
-                                
 // IMPORTANT 
*************************************************************************************************
 // In order to avoid problems in locales where the decimal point is 
represented as a comma, it is important to
 //   (1) specify all PHP length variables as strings, eg $border_width = 
'1.5'; and not $border_width = 1.5;
@@ -174,11 +161,12 @@
     background-color: <?php echo $header_back_color ?>;
     border-left: <?php echo $main_table_cell_border_width ?>px solid <?php 
echo $main_table_header_border_color ?>}
 .dwm_main th:first-child {border-left: 0}
-.dwm_main a {display: block; height: 100%}
+.dwm_main a {display: block; min-height: inherit}
 .dwm_main tbody a {padding: 0 2px}
 .dwm_main th a:link    {color: <?php echo $anchor_link_color_header ?>;    
text-decoration: none; font-weight: normal}
 .dwm_main th a:visited {color: <?php echo $anchor_visited_color_header ?>; 
text-decoration: none; font-weight: normal}
 .dwm_main th a:hover   {color: <?php echo $anchor_hover_color_header ?>;   
text-decoration:underline; font-weight: normal}
+.dwm_main#day_main tbody td, .dwm_main#week_main tbody td {min-height: <?php 
echo $main_cell_height ?>px}
 .dwm_main#day_main th.first_last {width: <?php echo $column_row_labels_width 
?>%}
 .dwm_main#week_main th {width: <?php echo $column_week ?>%}
 .dwm_main#week_main th.first_last {width: <?php echo $column_row_labels_width 
?>%; vertical-align: bottom}
@@ -188,7 +176,7 @@
 .dwm_main#month_main td.invalid {background-color: <?php echo 
$main_table_month_invalid_color ?>}
 .dwm_main#month_main a {padding: 0 2px 0 2px}
 
-a.new_booking {display: block; width: 100%; font-size: medium; text-align: 
center}
+a.new_booking {display: block; font-size: medium; text-align: center}
 .new_booking img {margin: auto; border: 0; padding: 4px 0 2px 0}
 <?php
 if (!$show_plus_link)
@@ -347,28 +335,30 @@
 
 */
 
-if ($clipped)
+
+// work out how many classes we'll need.   If we're transposing the table then 
we'll only need one, since all
+// cells are the same height (it's the width that varies, controlled by the 
colspan attribute).   For a normal
+// table we'll need at least as many as we've got slots, since a booking could 
span as many as all the slots
+// (in this case controlled by a rowspan).
+$classes_required = ($times_along_top) ? 1 : $max_slots;
+for ($i=1; $i<=$classes_required; $i++) 
 {
-  // work out how many classes we'll need.   If we're transposing the table 
then we'll only need one, since all
-  // cells are the same height (it's the width that varies, controlled by the 
colspan attribute).   For a normal
-  // table we'll need at least as many as we've got slots, since a booking 
could span as many as all the slots
-  // (in this case controlled by a rowspan).
-  $classes_required = ($times_along_top) ? 1 : $max_slots;
-  for ($i=1; $i<=$classes_required; $i++) 
+  $div_height = $main_cell_height * $i;
+  $div_height = $div_height + (($i-1)*$main_table_cell_border_width);
+  $div_height = (int) $div_height;    // Make absolutely sure it's an int to 
avoid generating invalid CSS
+  
+  $rule = "div.slots" . $i . " {min-height: " . $div_height . "px";
+  if ($clipped)
   {
-    $div_height = $main_cell_height * $i;
-    $div_height = $div_height + (($i-1)*$main_table_cell_border_width);
-    $div_height = (int) $div_height;    // Make absolutely sure it's an int to 
avoid generating invalid CSS
-    
-    echo "div.slots" . $i . " {" . 
-       "height:"      . $div_height . "px; " . 
-       "max-height: " . $div_height . "px; " . 
-       "min-height: " . $div_height . "px;}\n";
+    $rule .= "; max-height: " . $div_height . "px"; 
+    $rule .= "; height: "     . $div_height . "px";
   }
-  echo "div.celldiv {overflow: hidden}\n";
+  $rule .= "}";
+  echo $rule . "\n";
 }
+
 ?>
-div.celldiv {margin: 0; padding: 0}
+div.celldiv {overflow: hidden; margin: 0; padding: 0}
 .row_labels div.celldiv {overflow: visible}  /* we want to see the content in 
the row label columns */
 <?php
 

Modified: mrbs/trunk/web/style.inc
===================================================================
--- mrbs/trunk/web/style.inc    2009-06-19 21:58:03 UTC (rev 1122)
+++ mrbs/trunk/web/style.inc    2009-06-22 22:06:36 UTC (rev 1123)
@@ -25,7 +25,7 @@
     <link rel="stylesheet" href="mrbs-ie8.css" type="text/css">
     <![endif]-->
     <!--[if lte IE 7]>
-    <link rel="stylesheet" href="mrbs-ielte7.css" type="text/css">
+    <link rel="stylesheet" href="mrbs-ielte7.css.php" type="text/css">
     <![endif]-->
     <!--[if lte IE 6]>
     <link rel="stylesheet" href="mrbs-ielte6.css" type="text/css">


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

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to