Revision: 1792
http://mrbs.svn.sourceforge.net/mrbs/?rev=1792&view=rev
Author: cimorrison
Date: 2011-02-22 10:26:03 +0000 (Tue, 22 Feb 2011)
Log Message:
-----------
Removed the assumption that the key for the $typel array is a single character
in the range 'A'..'Z', thus paving the way for increasing the number of meeting
types allowed.
Modified Paths:
--------------
mrbs/trunk/web/edit_entry.php
mrbs/trunk/web/functions.inc
mrbs/trunk/web/systemdefaults.inc.php
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2011-02-17 15:13:04 UTC (rev 1791)
+++ mrbs/trunk/web/edit_entry.php 2011-02-22 10:26:03 UTC (rev 1792)
@@ -975,12 +975,9 @@
<label for="type"><?php echo get_vocab("type")?>:</label>
<select id="type" name="type">
<?php
- for ($c = "A"; $c <= "Z"; $c++)
+ foreach ($typel as $key => $value)
{
- if (!empty($typel[$c]))
- {
- echo "<option value=\"$c\"" . ($type == $c ? "
selected=\"selected\"" : "") . ">$typel[$c]</option>\n";
- }
+ echo "<option value=\"$key\"" . (($type == $key) ? "
selected=\"selected\"" : "") . ">$value</option>\n";
}
?>
</select>
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2011-02-17 15:13:04 UTC (rev 1791)
+++ mrbs/trunk/web/functions.inc 2011-02-22 10:26:03 UTC (rev 1792)
@@ -939,27 +939,24 @@
$table_width = 5;
}
echo "<table id=\"colour_key\"><tr>\n";
- $nct = 0;
- for ($ct = "A"; $ct <= "Z"; $ct++)
+ $n = 0;
+ foreach ($typel as $key => $value)
{
- if (!empty($typel[$ct]))
+ if (++$n > $table_width)
{
- if (++$nct > $table_width)
- {
- $nct = 1;
- echo "</tr><tr>";
- }
- tdcell($ct, 1);
- echo "<div class=\"celldiv slots1\" " . // put the description inside a
div which will give clipping in case of long names
- "title=\"$typel[$ct]\">\n"; // but put the name in the title so
you can still read it all if you hover over it
- echo "$typel[$ct]</div></td>\n";
+ $n = 1;
+ echo "</tr><tr>";
}
+ tdcell($key, 1);
+ echo "<div class=\"celldiv slots1\" " . // put the description inside a
div which will give clipping in case of long names
+ "title=\"$value\">\n"; // but put the name in the title so you can
still read it all if you hover over it
+ echo "$value</div></td>\n";
}
// If there is more than one row and the bottom row isn't complete then
// pad it out with a single merged cell
- if ((count($typel) > $table_width) && ($nct < $table_width))
+ if ((count($typel) > $table_width) && ($n < $table_width))
{
- echo "<td colspan=\"" . ($table_width - $nct) . "\"" .
+ echo "<td colspan=\"" . ($table_width - $n) . "\"" .
" id=\"row_padding\"> </td>\n";
}
echo "</tr></table>\n";
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2011-02-17 15:13:04 UTC (rev
1791)
+++ mrbs/trunk/web/systemdefaults.inc.php 2011-02-22 10:26:03 UTC (rev
1792)
@@ -915,7 +915,9 @@
* Entry Types
*************/
-// This array maps entry type codes (letters A through J) into descriptions.
+// This array maps entry type codes into descriptions. The key to the $typel
array
+// is a single char in the MRBS database, and so the array key can be any
permitted
+// PHP array key character.
//
// This is a basic default array which ensures there are at least some types
defined.
// The proper type definitions should be made in config.inc.php: they have to
go there
@@ -938,6 +940,7 @@
// $typel["C"] = "C";
// $typel["D"] = "D";
$typel["E"] = "E";
+$typel["e"] = "lower case e";
// $typel["F"] = "F";
// $typel["G"] = "G";
// $typel["H"] = "H";
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits