Revision: 2161
http://mrbs.svn.sourceforge.net/mrbs/?rev=2161&view=rev
Author: cimorrison
Date: 2011-11-02 10:26:36 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Fixed minor bug in the generation of autocomplete options for custom fields
that have $select_options defined (extra blank options were being generated)
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-02 10:00:46 UTC (rev
2160)
+++ mrbs/trunk/web/Themes/default/header.inc 2011-11-02 10:26:36 UTC (rev
2161)
@@ -4,13 +4,15 @@
// Generates the JavaScript code to turn the input with id $id
// into an autocomplete box, with options contained in the
-// array $options.
+// array $options. $options can be a simple or an associative array.
function generate_autocomplete($id, $options)
{
global $autocomplete_length_breaks;
-
+
$js = '';
+ // Turn the array into a simple, numerically indexed, array
+ $options = array_values($options);
$n_options = count($options);
if ($n_options > 0)
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA® 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