Revision: 2068
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2068&view=rev
Author:   cimorrison
Date:     2011-10-07 14:53:10 +0000 (Fri, 07 Oct 2011)
Log Message:
-----------
Simplified the markup in the day and week views

Modified Paths:
--------------
    mrbs/trunk/web/Themes/default/header.inc
    mrbs/trunk/web/day.php
    mrbs/trunk/web/functions.inc
    mrbs/trunk/web/mrbs-print.css.php
    mrbs/trunk/web/mrbs.css.php
    mrbs/trunk/web/week.php

Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc    2011-10-07 12:25:46 UTC (rev 
2067)
+++ mrbs/trunk/web/Themes/default/header.inc    2011-10-07 14:53:10 UTC (rev 
2068)
@@ -1247,10 +1247,13 @@
     ?>
     if (lteIE6)
     {
-      $('#day_main, #week_main').find('a.new_booking')
-        .parent().parent()
+      var dayWeekTable = $('#day_main, #week_main');
+      dayWeekTable.find('td.new')
         .hover(function() {
-            $(this).not('.multiple_booking').toggleClass('hover');
+            $(this).not('.multiple_booking').toggleClass('new_hover');
+          });
+      dayWeekTable.find('td')
+        .hover(function() {
             
$(this).parent().find('td.row_labels').toggleClass('row_labels_hover');
           });
       $('#month_main .valid a.new_booking')

Modified: mrbs/trunk/web/day.php
===================================================================
--- mrbs/trunk/web/day.php      2011-10-07 12:25:46 UTC (rev 2067)
+++ mrbs/trunk/web/day.php      2011-10-07 14:53:10 UTC (rev 2068)
@@ -340,7 +340,7 @@
     // with times along the top and rooms down the side
     for ($i = 0; ($row = sql_row_keyed($res, $i)); $i++, $row_class = 
($row_class == "even_row")?"odd_row":"even_row")
     {
-      echo "<tr>\n";
+      echo "<tr class=\"$row_class\">\n";
       $room_id = $row['id']; 
       $room_cell_link = 
"week.php?year=$year&amp;month=$month&amp;day=$day&amp;area=$area&amp;room=$room_id";
       draw_room_cell($row, $room_cell_link);
@@ -399,7 +399,12 @@
       $minute = date("i",$t);
   
       // Show the time linked to the URL for highlighting that time
-      echo "<tr>";
+      $class = $row_class;
+      if (isset($timetohighlight) && ($time_t == $timetohighlight))
+      {
+        $class .= " row_highlight";
+      }
+      echo "<tr class=\"$class\">";
       draw_time_cell($t, $time_t, $time_t_stripped, $hilite_url);
   
       // Loop through the list of rooms we have for this area
@@ -415,14 +420,6 @@
         {
           $today[$room_id][$day][$time_t] = array();  // to avoid an undefined 
index NOTICE error
         }
-        if (isset($timetohighlight) && ($time_t == $timetohighlight))
-        {
-          $cell_class = "row_highlight";
-        }
-        else
-        {
-          $cell_class = $row_class;
-        }
         draw_cell($today[$room_id][$day][$time_t], $query_strings, 
$cell_class);
       }
       

Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc        2011-10-07 12:25:46 UTC (rev 2067)
+++ mrbs/trunk/web/functions.inc        2011-10-07 14:53:10 UTC (rev 2068)
@@ -1742,7 +1742,7 @@
     }
     else
     {
-      $c = $cell_class; // Use the default color class (zebra stripes or 
highlighting).
+      $c = "new";
     }
     
     // Don't put in a <td> cell if the slot is booked and there's no 
description.
@@ -1758,7 +1758,7 @@
       if (!isset($id))
       {
         echo "<div class=\"celldiv slots1\">\n";  // a bookable slot is only 
one unit high
-        echo "<a class=\"new_booking\" href=\"edit_entry.php?" . 
+        echo "<a href=\"edit_entry.php?" . 
               (($enable_periods) ? $query_strings['new_periods'] : 
$query_strings['new_times']) . 
               "\">\n";
         if ($show_plus_link)

Modified: mrbs/trunk/web/mrbs-print.css.php
===================================================================
--- mrbs/trunk/web/mrbs-print.css.php   2011-10-07 12:25:46 UTC (rev 2067)
+++ mrbs/trunk/web/mrbs-print.css.php   2011-10-07 14:53:10 UTC (rev 2068)
@@ -14,7 +14,7 @@
 
 div.screenonly { display: none; }
 
-a.new_booking img { display: none; }
+td.new a, a.new_booking img { display: none; }
 
 <?php
 // redefine table and cell border colours so that they are visible in the 
print view

Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2011-10-07 12:25:46 UTC (rev 2067)
+++ mrbs/trunk/web/mrbs.css.php 2011-10-07 14:53:10 UTC (rev 2068)
@@ -44,8 +44,8 @@
 a:visited {color: <?php echo $anchor_visited_color ?>; text-decoration: none; 
font-weight: bold}
 a:hover   {color: <?php echo $anchor_hover_color ?>;   text-decoration: 
underline; font-weight: bold} 
 
-tr.even_row {background-color: <?php echo $row_even_color ?>}
-tr.odd_row {background-color: <?php echo $row_odd_color ?>}
+tr.even_row td.new {background-color: <?php echo $row_even_color ?>}
+tr.odd_row td.new {background-color: <?php echo $row_odd_color ?>}
 
 td, th {vertical-align: top}
 
@@ -208,17 +208,11 @@
 .dwm_main#month_main td.invalid {background-color: <?php echo 
$main_table_month_invalid_color ?>}
 .dwm_main#month_main a {height: 100%; width: 100%; padding: 0 2px 0 2px}
 
-a.new_booking {display: block; font-size: medium; text-align: center}
-.new_booking img {margin: auto; padding: 4px 0 2px 0}
+td.new a, a.new_booking {display: block; font-size: medium; text-align: center}
+td.new img, .new_booking img {margin: auto; padding: 4px 0 2px 0}
 img.repeat_symbol {float: right; padding: 3px}
 .dwm_main#month_main img.repeat_symbol {padding: 2px}
 
-<?php
-if (!$show_plus_link)
-{
-  echo ".new_booking img {display: none}\n";
-}
-?>
 
 <?php
 // The following section deals with the contents of the table cells in the 
month view.    It is designed
@@ -273,10 +267,8 @@
       echo (empty($column_hidden_width) ? " display: none" : ""); // if the 
width is set to zero, then don't display anything at all
     ?>
     }
-td.row_highlight  {background-color: <?php echo $row_highlight_color ?>} /* 
used for highlighting a row */
-td.even_row       {background-color: <?php echo $row_even_color ?>}      /* 
even rows in the day view */
-td.odd_row        {background-color: <?php echo $row_odd_color ?>}       /* 
odd rows in the day view */
-td.row_labels     {background-color: <?php echo $main_table_labels_back_color 
?>; white-space: nowrap}    /* used for the row labels column */
+tr.row_highlight td.new {background-color: <?php echo $row_highlight_color ?>} 
/* used for highlighting a row */
+.dwm_main td.row_labels     {background-color: <?php echo 
$main_table_labels_back_color ?>; white-space: nowrap}    /* used for the row 
labels column */
 .row_labels a:link    {color: <?php echo $anchor_link_color_header ?>;    
text-decoration: none; font-weight: normal}
 .row_labels a:visited {color: <?php echo $anchor_visited_color_header ?>; 
text-decoration: none; font-weight: normal}
 .row_labels a:hover   {color: <?php echo $anchor_hover_color_header ?>;   
text-decoration:underline; font-weight: normal}
@@ -305,9 +297,7 @@
 // The *hover classes are applied by JavaScript when running IE6 because IE6 
does
 // not support the :hover pseudo class on anything other than an anchor.
 ?>
-.dwm_main td:hover.odd_row, .dwm_main td:hover.even_row, .dwm_main td.hover 
{background-color: <?php echo $row_highlight_color ?>}
-.dwm_main td:hover.multiple_booking.odd_row {background-color: <?php echo 
$row_odd_color ?>}
-.dwm_main td:hover.multiple_booking.even_row {background-color: <?php echo 
$row_even_color ?>}
+.dwm_main td:hover.new, .dwm_main td.new_hover {background-color: <?php echo 
$row_highlight_color ?>}
 .dwm_main tr:hover td.row_labels, .dwm_main td.row_labels_hover 
{background-color: <?php echo $row_highlight_color ?>; color: <?php echo 
$standard_font_color ?>}
 .dwm_main#month_main td:hover.valid, .dwm_main#month_main td.valid_hover 
{background-color: <?php echo $row_highlight_color ?>}
 

Modified: mrbs/trunk/web/week.php
===================================================================
--- mrbs/trunk/web/week.php     2011-10-07 12:25:46 UTC (rev 2067)
+++ mrbs/trunk/web/week.php     2011-10-07 14:53:10 UTC (rev 2068)
@@ -335,7 +335,7 @@
     
     else
     {
-      echo "<tr>\n";
+      echo "<tr class=\"$row_class\">\n";
       
       $wt = mktime( 12, 0, 0, $month, $day_start_week+$thisday, $year );
       $wday = date("d", $wt);
@@ -408,7 +408,12 @@
     $minute  = date("i",$t);
     
     // Show the time linked to the URL for highlighting that time:
-    echo "<tr>";
+    $class = $row_class;
+    if (isset($timetohighlight) && ($time_t == $timetohighlight))
+    {
+      $class .= " row_highlight";
+    }
+    echo "<tr class=\"$class\">";
     draw_time_cell($t, $time_t, $time_t_stripped, $hilite_url);
   
   
@@ -438,14 +443,6 @@
         {
           $week_map[$room][$thisday][$time_t] = array();  // to avoid an 
undefined index NOTICE error
         }
-        if (isset($timetohighlight) && ($time_t == $timetohighlight))
-        {
-          $cell_class = "row_highlight";
-        }
-        else
-        {
-          $cell_class = $row_class;
-        }
         draw_cell($week_map[$room][$thisday][$time_t], $query_strings, 
$cell_class);
       }
   

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