Revision: 1127
http://mrbs.svn.sourceforge.net/mrbs/?rev=1127&view=rev
Author: cimorrison
Date: 2009-06-23 14:35:08 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
- Added a class for private bookings so that they can be styled using that
class, rather than by defining extra booking types. The default styling is for
the opacity of the cell to be set to 0.6 (ie they are slightly washed out
versions of public bookings) and the text to be in italics. Note that the
opacity changes do not show up in IE because its support for opacity is
temperamental, but the italic font will still show up and the font colour is
also lightened to simulate the opacity change.
- Added colour coding of private bookings to the month view (and used the same
opacity/italic treatment as in the day and week views).
- Minor changes to default text for private bookings
Modified Paths:
--------------
mrbs/trunk/web/Themes/classic126/styling.inc
mrbs/trunk/web/Themes/default/styling.inc
mrbs/trunk/web/functions.inc
mrbs/trunk/web/lang.en
mrbs/trunk/web/month.php
mrbs/trunk/web/mrbs.css.php
mrbs/trunk/web/style.inc
mrbs/trunk/web/view_entry.php
Added Paths:
-----------
mrbs/trunk/web/mrbs-ielte8.css
Modified: mrbs/trunk/web/Themes/classic126/styling.inc
===================================================================
--- mrbs/trunk/web/Themes/classic126/styling.inc 2009-06-23 11:35:30 UTC
(rev 1126)
+++ mrbs/trunk/web/Themes/classic126/styling.inc 2009-06-23 14:35:08 UTC
(rev 1127)
@@ -85,17 +85,8 @@
'G' => "#FF6666",
'H' => "#66FFFF",
'I' => "#DDFFDD",
- 'J' => "#CCCCCC",
- 'PA' => "#D0A8D0", // PA-PJ are "Private" entry colors for A-J
- 'PB' => "#85b3b3",
- 'PC' => "#f08f8f",
- 'PD' => "#e6e38a",
- 'PE' => "#b2c8ed",
- 'PF' => "#e1ad7a",
- 'PG' => "#dc5959",
- 'PH' => "#50c6ce",
- 'PI' => "#aedeae",
- 'PJ' => "#959595");
+ 'J' => "#CCCCCC");
+
// ***** DIMENSIONS *******************
$banner_border_width = '1'; // (px) border width for the outside of
the banner
Modified: mrbs/trunk/web/Themes/default/styling.inc
===================================================================
--- mrbs/trunk/web/Themes/default/styling.inc 2009-06-23 11:35:30 UTC (rev
1126)
+++ mrbs/trunk/web/Themes/default/styling.inc 2009-06-23 14:35:08 UTC (rev
1127)
@@ -84,17 +84,7 @@
'G' => "#ccffcc",
'H' => "#d9d982",
'I' => "#99cc66",
- 'J' => "#e6ffe6",
- 'PA' => "#D8D871", // PA-PJ are "Private" entry colors for A-J
- 'PB' => "#85b3b3",
- 'PC' => "#e9e9c0",
- 'PD' => "#b5c7c7",
- 'PE' => "#5db6a7",
- 'PF' => "#668484",
- 'PG' => "#aed8ae",
- 'PH' => "#bdbd71",
- 'PI' => "#99aa44",
- 'PJ' => "#c9dcc9");
+ 'J' => "#e6ffe6");
// ***** DIMENSIONS *******************
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2009-06-23 11:35:30 UTC (rev 1126)
+++ mrbs/trunk/web/functions.inc 2009-06-23 14:35:08 UTC (rev 1127)
@@ -662,6 +662,7 @@
// $column is a column of the map of the screen that will be displayed
// It looks like:
// $column[Time][n][id]
+ // [is_private]
// [color]
// [data]
// [long_descr]
@@ -703,8 +704,8 @@
!getWritable($row['entry_create_by'],$user))
{
$is_private = TRUE;
- $row['name']= "- ".get_vocab('unavailable')." -";
- $row['entry_description']= "- ".get_vocab('unavailable')." -";
+ $row['name']= "[".get_vocab('unavailable')."]";
+ $row['entry_description']= "[".get_vocab('unavailable')."]";
}
else
{
@@ -730,28 +731,22 @@
}
// fill in the id, type and start time
- $column[$time_t][$n]["id"] = $row['entry_id'];
- if ($is_private)
- {
- $column[$time_t][$n]["color"] = 'P'.$row['type'];
- }
- else
- {
- $column[$time_t][$n]["color"] = $row['type'];
- }
+ $column[$time_t][$n]["id"] = $row['entry_id'];
+ $column[$time_t][$n]["is_private"] = $is_private;
+ $column[$time_t][$n]["color"] = $row['type'];
$column[$time_t][$n]["start_time"] = utf8_strftime(hour_min_format(),
$row['start_time']);
$column[$time_t][$n]["slots"] = null; // to avoid undefined index NOTICE
errors
// if it's a multiple booking also fill in the name and description
if ($n > 0)
{
- $column[$time_t][$n]["data"] = $row['name'];
- $column[$time_t][$n]["long_descr"] = $row['entry_description'];
+ $column[$time_t][$n]["data"] = $row['name'];
+ $column[$time_t][$n]["long_descr"] = $row['entry_description'];
}
// otherwise just leave them blank (we'll fill in the first whole slot
later)
else
{
- $column[$time_t][$n]["data"] = "";
- $column[$time_t][$n]["long_descr"] = "";
+ $column[$time_t][$n]["data"] = "";
+ $column[$time_t][$n]["long_descr"] = "";
}
} // end for
@@ -867,6 +862,7 @@
// display and looks like this:
//
// $cell[n][id]
+ // [is_private]
// [color]
// [data]
// [long_descr]
@@ -932,12 +928,18 @@
// and (b) each stripe is at least
1 unit high
for ($n=0; $n<$n_bookings; $n++)
{
- $id = $cell[$n]["id"];
- $color = $cell[$n]["color"];
- $descr = htmlspecialchars($cell[$n]["data"]);
+ $id = $cell[$n]["id"];
+ $is_private = $cell[$n]["is_private"];
+ $color = $cell[$n]["color"];
+ $descr = htmlspecialchars($cell[$n]["data"]);
$long_descr = htmlspecialchars($cell[$n]["long_descr"]);
+ $class = $color;
+ if ($is_private)
+ {
+ $class .= " private";
+ }
echo "<tr>\n";
- echo "<td class=\"$color\"" .
+ echo "<td class=\"$class\"" .
(($n==0) ? " style=\"border-top-width: 0\"" : "") . // no border
for first row
">\n";
echo "<div style=\"overflow: hidden; " .
@@ -967,12 +969,18 @@
echo "<tbody>\n";
for ($n=0; $n<$n_bookings; $n++)
{
- $id = $cell[$n]["id"];
- $color = $cell[$n]["color"];
- $descr = htmlspecialchars($cell[$n]["start_time"] . " " .
$cell[$n]["data"]);
+ $id = $cell[$n]["id"];
+ $is_private = $cell[$n]["is_private"];
+ $color = $cell[$n]["color"];
+ $descr = htmlspecialchars($cell[$n]["start_time"] . " " .
$cell[$n]["data"]);
$long_descr = htmlspecialchars($cell[$n]["long_descr"]);
+ $class = $color;
+ if ($is_private)
+ {
+ $class .= " private";
+ }
echo "<tr>\n";
- echo "<td class=\"$color\"" .
+ echo "<td class=\"$class\"" .
(($n==0) ? " style=\"border-top-width: 0\"" : "") . // no border
for first row
">\n";
echo "<div class=\"celldiv slots1\">\n"; // we want clipping of
overflow
@@ -994,11 +1002,12 @@
{
if(isset($cell[0]["id"]))
{
- $id = $cell[0]["id"];
- $color = $cell[0]["color"];
- $descr = htmlspecialchars($cell[0]["data"]);
+ $id = $cell[0]["id"];
+ $is_private = $cell[0]["is_private"];
+ $color = $cell[0]["color"];
+ $descr = htmlspecialchars($cell[0]["data"]);
$long_descr = htmlspecialchars($cell[0]["long_descr"]);
- $slots = $cell[0]["slots"];
+ $slots = $cell[0]["slots"];
}
else // id not set
{
@@ -1013,6 +1022,10 @@
if (isset($id))
{
$c = $color;
+ if ($is_private)
+ {
+ $c .= " private";
+ }
}
else
{
@@ -1066,7 +1079,7 @@
echo "</div>\n";
}
else // if it is booked then show the booking
- {
+ {
if ($times_along_top)
{
echo "<div class=\"celldiv slots1\">\n";
Modified: mrbs/trunk/web/lang.en
===================================================================
--- mrbs/trunk/web/lang.en 2009-06-23 11:35:30 UTC (rev 1126)
+++ mrbs/trunk/web/lang.en 2009-06-23 14:35:08 UTC (rev 1127)
@@ -91,7 +91,7 @@
$vocab["brief_description"] = "Brief Description.";
$vocab["useful_n-weekly_value"] = "useful n-weekly value.";
$vocab["private"] = "Private";
-$vocab["unavailable"] = "Unavailable";
+$vocab["unavailable"] = "Private";
// Used in view_entry.php
$vocab["description"] = "Description";
Modified: mrbs/trunk/web/month.php
===================================================================
--- mrbs/trunk/web/month.php 2009-06-23 11:35:30 UTC (rev 1126)
+++ mrbs/trunk/web/month.php 2009-06-23 14:35:08 UTC (rev 1127)
@@ -349,15 +349,16 @@
if ($private)
{
- $d[$day_num]["shortdescrip"][] = '- '.get_vocab('unavailable').' -';
- $d[$day_num]["color"][] = 'P';
+ $d[$day_num]["shortdescrip"][] = '['.get_vocab('unavailable').']';
}
else
{
$d[$day_num]["shortdescrip"][] = htmlspecialchars($row['name']);
- $d[$day_num]["color"][] = $row['type'];
}
-
+
+ $d[$day_num]["is_private"][] = $private;
+
+ $d[$day_num]["color"][] = $row['type'];
// Describe the start and end time, accounting for "all day"
// and for entries starting before/ending after today.
@@ -580,7 +581,12 @@
{
// give the enclosing div the appropriate width: full width if both,
// otherwise half-width (but use 49.9% to avoid rounding problems in
some browsers)
- echo "<div class=\"" . $d[$cday]["color"][$i] . "\"" .
+ $class = $d[$cday]["color"][$i];
+ if ($d[$cday]["is_private"][$i])
+ {
+ $class .= " private";
+ }
+ echo "<div class=\"" . $class . "\"" .
" style=\"width: " . (($monthly_view_entries_details == "both") ?
'100%' : '49.9%') . "\">\n";
$booking_link = "view_entry.php?id=" . $d[$cday]["id"][$i] .
"&day=$cday&month=$month&year=$year";
$slot_text = $d[$cday]["data"][$i];
Added: mrbs/trunk/web/mrbs-ielte8.css
===================================================================
--- mrbs/trunk/web/mrbs-ielte8.css (rev 0)
+++ mrbs/trunk/web/mrbs-ielte8.css 2009-06-23 14:35:08 UTC (rev 1127)
@@ -0,0 +1,11 @@
+/* $Id$ */
+
+/* Fixes for Internet Explorer 8 and below */
+
+/* ------------ PRIVATE BOOKINGS ---------------------------*/
+
+/* Opacity doesn't work well in IE8 and below, so we'll just change */
+/* the font color for private bookings */
+
+.private {color: #637582}
+.private a {color: #637582}
Property changes on: mrbs/trunk/web/mrbs-ielte8.css
___________________________________________________________________
Added: svn:keywords
+ id
Added: svn:eol-style
+ native
Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2009-06-23 11:35:30 UTC (rev 1126)
+++ mrbs/trunk/web/mrbs.css.php 2009-06-23 14:35:08 UTC (rev 1127)
@@ -389,6 +389,8 @@
.minimized div.mini {display: block}
.minimized div.maxi {display: none}
+/* private bookings */
+.private {opacity: 0.6; font-style: italic}
/* ------------ DEL.PHP -----------------------------*/
Modified: mrbs/trunk/web/style.inc
===================================================================
--- mrbs/trunk/web/style.inc 2009-06-23 11:35:30 UTC (rev 1126)
+++ mrbs/trunk/web/style.inc 2009-06-23 14:35:08 UTC (rev 1127)
@@ -24,6 +24,9 @@
<!--[if IE 8]>
<link rel="stylesheet" href="mrbs-ie8.css" type="text/css">
<![endif]-->
+ <!--[if lte IE 8]>
+ <link rel="stylesheet" href="mrbs-ielte8.css" type="text/css">
+ <![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" href="mrbs-ielte7.css.php" type="text/css">
<![endif]-->
Modified: mrbs/trunk/web/view_entry.php
===================================================================
--- mrbs/trunk/web/view_entry.php 2009-06-23 11:35:30 UTC (rev 1126)
+++ mrbs/trunk/web/view_entry.php 2009-06-23 14:35:08 UTC (rev 1127)
@@ -123,10 +123,15 @@
$writeable = getWritable($create_by,$user);
if (is_private_event($private) && !$writeable)
{
- $name = "-".get_vocab('private')."-";
- $description = $name ;
- $create_by = $name ;
+ $name = "[".get_vocab('private')."]";
+ $description = $name;
+ $create_by = $name;
+ $keep_private = TRUE;
}
+else
+{
+ $keep_private = FALSE;
+}
if ($enable_periods)
{
@@ -227,19 +232,22 @@
// Now that we know all the data we start drawing it
+
+echo "<h3" . (($keep_private) ? " class=\"private\"" : "") . ">\n";
+echo $name;
+if (is_private_event($private) && $writeable)
+{
+ echo ' ('.get_vocab('private').')';
+}
+echo "</h3>\n";
+
?>
-
-<h3><?php
- echo $name;
- if (is_private_event($private) && $writeable)
- {
- echo ' ('.get_vocab('private').')';
- }
-?></h3>
<table id="entry">
<tr>
<td><?php echo get_vocab("description") ?>:</td>
- <td><?php echo mrbs_nl2br($description) ?></td>
+ <?php
+ echo "<td" . (($keep_private) ? " class=\"private\"" : "") . ">" .
mrbs_nl2br($description) . "</td>\n";
+ ?>
</tr>
<tr>
<td><?php echo get_vocab("room") ?>:</td>
@@ -263,9 +271,9 @@
</tr>
<tr>
<td><?php echo get_vocab("createdby") ?>:</td>
- <td><?php
- echo $create_by ;
- ?></td>
+ <?php
+ echo "<td" . (($keep_private) ? " class=\"private\"" : "") . ">" .
$create_by . "</td>\n";
+ ?>
</tr>
<tr>
<td><?php echo get_vocab("lastupdate") ?>:</td>
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