Revision: 2176
http://mrbs.svn.sourceforge.net/mrbs/?rev=2176&view=rev
Author: tbleher
Date: 2011-11-12 06:45:50 +0000 (Sat, 12 Nov 2011)
Log Message:
-----------
edit_entry: make ajax calls send rep_day[] correctly, so that weekly repeats
are properly checked
Before this change, rep_day[] was not correctly set, which led to
edit_entry_handler assuming that weekly repeats all were on a sunday (only
on ajax requests, the normal booking worked correctly)
This change affects two things:
- the correct name is now checked when deciding if the input has an array type
- multiple checkbox entries with the same name are merged. There are
probably better/more elegant ways to do this (suggestions welcome).
Modified Paths:
--------------
mrbs/trunk/web/Themes/default/header.inc
Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc 2011-11-03 16:36:49 UTC (rev
2175)
+++ mrbs/trunk/web/Themes/default/header.inc 2011-11-12 06:45:50 UTC (rev
2176)
@@ -683,7 +683,7 @@
{
var value;
<?php // Scalar parameters (two types - checkboxes and the rest) ?>
- if ($(this).attr('name').indexOf('[]') == -1)
+ if (formInput.attr('name').indexOf('[]') == -1)
{
if (formInput.filter(':checkbox').length > 0)
{
@@ -751,7 +751,12 @@
if (params[fieldName] === undefined)
{
params[fieldName] = getFormValue($(this));
- }
+ } else {
+ if( $.isArray( params[fieldName] ) ) {
+ var value = getFormValue($(this));
+ $.merge( params[fieldName], value );
+ }
+ }
});
<?php
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits