Revision: 2143
http://mrbs.svn.sourceforge.net/mrbs/?rev=2143&view=rev
Author: cimorrison
Date: 2011-10-24 07:09:40 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
Slightly better version of fix in Rev 2141
Revision Links:
--------------
http://mrbs.svn.sourceforge.net/mrbs/?rev=2141&view=rev
Modified Paths:
--------------
mrbs/trunk/web/Themes/default/header.inc
mrbs/trunk/web/edit_entry.php
Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc 2011-10-23 18:47:56 UTC (rev
2142)
+++ mrbs/trunk/web/Themes/default/header.inc 2011-10-24 07:09:40 UTC (rev
2143)
@@ -75,7 +75,6 @@
global $auth, $max_level;
global $default_language_tokens, $disable_automatic_language_changing,
$override_locale;
global $lang_map_windows, $langs, $server_os;
- global $default_duration_all_day;
global $select_options;
global $ajax_refresh_rate;
global $main_table_cell_border_width, $main_cell_height;
@@ -2422,28 +2421,8 @@
}
}
- <?php
- // Check the All Day box if that's the default and then call the function
- // that handles changes. (Note - the call to OnAllDayClick() comes inside
- // an each() in case there isn't an all_day checkbox, which there won't be
- // if we're logging in). However don't check it if (a) $drag is set,
because
- // that means we've come from a drag select and don't want the defaults or
- // (b) the checkbox has been given a class of "no_default", probably because
- // it's an existing booking that we are editing or copying.
- global $drag;
- if ($default_duration_all_day && !isset($drag))
- {
- ?>
- $('#all_day').each(function() {
- if (!$(this).hasClass('no_default'))
- {
- $(this).attr('checked', true);
- OnAllDayClick(true);
- }
- });
- <?php
- }
+ <?php
// Set up handlers if anything like a submit button is pressed. If it's
the Save
// button we need to validate the form first. In addition, for all the
buttons, if
// we are going to submit something we set some data in the form. This
allows
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2011-10-23 18:47:56 UTC (rev 2142)
+++ mrbs/trunk/web/edit_entry.php 2011-10-24 07:09:40 UTC (rev 2143)
@@ -849,12 +849,11 @@
echo "<div class=\"group\">\n";
echo "<div id=\"ad\">\n";
- echo "<input id=\"all_day\" class=\"checkbox" .
+ echo "<input id=\"all_day\" class=\"checkbox\"" .
// If this is an existing booking that we are editing or copying,
then we do
- // not want the JavaScript to apply the default setting to the all
day checkbox,
- // so add a class that will tell the JavaScript that
- ((isset($id)) ? " no_default" : "") .
- "\" name=\"all_day\" type=\"checkbox\" value=\"yes\"
onclick=\"OnAllDayClick(this)\">\n";
+ // not want the default duration applied
+ (($default_duration_all_day && !isset($id) && !$drag) ? "
checked=\"checked\"" : "") .
+ " name=\"all_day\" type=\"checkbox\" value=\"yes\"
onclick=\"OnAllDayClick(this)\">\n";
echo "<label for=\"all_day\">" . get_vocab("all_day") . "</label>\n";
echo "</div>\n";
echo "</div>\n";
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits