[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4325] branches/1.3



Revision: 4325
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4325&view=rev
Author:   einhverfr
Date:     2012-02-17 10:13:13 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
Correcting dropdown handling where values have () in them

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/UI/lib/elements.html

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-02-17 09:59:36 UTC (rev 4324)
+++ branches/1.3/Changelog	2012-02-17 10:13:13 UTC (rev 4325)
@@ -4,6 +4,7 @@
 
 Changelog for 1.3.12
 * Corrected processing of <?lsmb tags in order/invoice numbers (Chris T)
+* Corrected handling of accounts in dropdowns where () are present (Chris T)
 
 Changelog for 1.3.11
 * Fixed outstanding report for payment reversal and partial payments (Chris T)

Modified: branches/1.3/UI/lib/elements.html
===================================================================
--- branches/1.3/UI/lib/elements.html	2012-02-17 09:59:36 UTC (rev 4324)
+++ branches/1.3/UI/lib/elements.html	2012-02-17 10:13:13 UTC (rev 4325)
@@ -227,10 +227,11 @@
     END ?>
   <?lsmb option_data.id = "${parent_id}-${optindex}" -?>
   <?lsmb  # Selected is a special case -- no attribute key, so it is handled here by looking for the option value in the default_values list.
-    IF element_data.defined('default_values') AND element_data.default_values.grep("^${option_data.value}\$").size;
-    option_data.selected = ' selected="selected"';
-    ELSE;
-      option_data.selected = "";
+    option_data.selected = "";
+    FOREACH test_val IN element_data.default_values;
+       IF option_data.value == test_val;
+           option_data.selected = ' selected="selected"';
+       END;
     END;
   ?>
   <?lsmb PROCESS attributes  # Process regular attributes.

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.