[javascript][preferences] fix setCurrentValues to consider all kind of widgets (textarea, select, etc.) not just inputs stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 23 Jun 2009 17:15:52 +0200
branchstable
changeset 2154 558079860667
parent 2152 edec2c9055e5
child 2155 1dd3dfc6fd76
[javascript][preferences] fix setCurrentValues to consider all kind of widgets (textarea, select, etc.) not just inputs
web/data/cubicweb.preferences.js
--- a/web/data/cubicweb.preferences.js	Tue Jun 23 16:31:15 2009 +0200
+++ b/web/data/cubicweb.preferences.js	Tue Jun 23 17:15:52 2009 +0200
@@ -113,7 +113,7 @@
 }
 
 function setCurrentValues(form){
-    jQuery(form).find('input[name^=value]').each(function () {
+    jQuery(form).find('[name^=value]').each(function () {
 	    var input = jQuery(this);
 	    if(input.attr('type') == 'radio'){
 		// NOTE: there seems to be a bug with jQuery(input).attr('checked')
@@ -127,7 +127,7 @@
 	    }
 	});
 }
-     
+
 function initEvents(){
   jQuery('form').each(function() {
 	  var form = jQuery(this);