r13297 - in Products.AddRemoveWidget/trunk: Products/AddRemoveWidget/skins/AddRemoveWidget docs

"Roel Bruggink" <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: jaroel
Date: Thu Nov 25 16:13:53 2010
New Revision: 13297

Modified:
   Products.AddRemoveWidget/trunk/Products/AddRemoveWidget/skins/AddRemoveWidget/widget_addremove.js
   Products.AddRemoveWidget/trunk/docs/HISTORY.txt
Log:
Add empty element to submitContainer when no items are selected. Fixes #13.

Modified: Products.AddRemoveWidget/trunk/Products/AddRemoveWidget/skins/AddRemoveWidget/widget_addremove.js
==============================================================================
--- Products.AddRemoveWidget/trunk/Products/AddRemoveWidget/skins/AddRemoveWidget/widget_addremove.js	(original)
+++ Products.AddRemoveWidget/trunk/Products/AddRemoveWidget/skins/AddRemoveWidget/widget_addremove.js	Thu Nov 25 16:13:53 2010
@@ -116,7 +116,14 @@
 		node.value = value;
 		submitContainer.appendChild(node);
 	}
-	
+
+	// Add an empty node if no values are selected.
+	if (!selectedList.length) {
+	    var node = document.createElement('input');
+	    node.type = "hidden";
+	    node.name = field + ":list";
+	    submitContainer.appendChild(node);
+	}
 }
 
 // Sort the submit box

Modified: Products.AddRemoveWidget/trunk/docs/HISTORY.txt
==============================================================================
--- Products.AddRemoveWidget/trunk/docs/HISTORY.txt	(original)
+++ Products.AddRemoveWidget/trunk/docs/HISTORY.txt	Thu Nov 25 16:13:53 2010
@@ -5,7 +5,9 @@
 ------------------
 
 * Removed 'unicodeTestIn' call. This fixes #14.
-  [jaroel]
+  [jaroel/maerteijn]
+* Add empty element to submitContainer when no items are selected. Fixes #13.
+  [jaroel/maerteijn]
 
 1.4.4 (2010-08-16)
 ------------------

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.