Pass the form fields names as strings when saving widgets, fixes #9703

git-svn-id: https://develop.svn.wordpress.org/trunk@11163 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-05-03 23:17:47 +00:00
parent 4c01def10f
commit c549ff4e42
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -122,9 +122,9 @@ wpWidgets = {
if ( del )
a['delete_widget'] = 1;
$.map(data, function(n,i){ a[n.name] = n.value; });
data += '&' + $.param(a);
$.post( ajaxurl, a, function(r){
$.post( ajaxurl, data, function(r){
var id;
$('.ajax-feedback').css('visibility', 'hidden');
if ( !t )
@@ -171,11 +171,11 @@ wpWidgets = {
return false;
});
$('.widget-control-save', sc).click(function(){
wpWidgets.save( $(this).parents('form').serializeArray(), $(this).parents('.widgets-sortables').attr('id'), 0, this );
wpWidgets.save( $(this).parents('form').serialize(), $(this).parents('.widgets-sortables').attr('id'), 0, this );
return false;
});
$('.widget-control-remove', sc).click(function(){
wpWidgets.save( $(this).parents('form').serializeArray(), $(this).parents('.widgets-sortables').attr('id'), 1, this );
wpWidgets.save( $(this).parents('form').serialize(), $(this).parents('.widgets-sortables').attr('id'), 1, this );
return false;
});
}