change values in "edits-value" input stable
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Tue, 23 Jun 2009 20:04:15 +0200
branchstable
changeset 2155 1dd3dfc6fd76
parent 2154 558079860667
child 2160 17d624698661
child 2174 7f576dc9502e
child 2210 b40131032ff1
change values in "edits-value" input
web/data/cubicweb.preferences.js
--- a/web/data/cubicweb.preferences.js	Tue Jun 23 17:15:52 2009 +0200
+++ b/web/data/cubicweb.preferences.js	Tue Jun 23 20:04:15 2009 +0200
@@ -115,16 +115,18 @@
 function setCurrentValues(form){
     jQuery(form).find('[name^=value]').each(function () {
 	    var input = jQuery(this);
+	    var name = input.attr('name');
 	    if(input.attr('type') == 'radio'){
 		// NOTE: there seems to be a bug with jQuery(input).attr('checked')
 		//       in our case, we can't rely on its value, we use
 		//       the DOM API instead.
 		if(input[0].checked){
-		    prefsValues[input.attr('name')] = input.val();
+		    prefsValues[name] = input.val();
 		}
 	    }else{
-		prefsValues[input.attr('name')] = input.val();
+		prefsValues[name] = input.val();
 	    }
+	    jQuery('[name=edits-'+ name + ']').val(prefsValues[name]);
 	});
 }