Ticket #14466: 14466.3.diff
File 14466.3.diff, 1.8 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/widgets.php
67 67 function wp_list_widget_controls( $sidebar ) { 68 68 add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' ); 69 69 70 echo "<div id=' $sidebar' class='widgets-sortables'>\n";70 echo "<div id='widget-area-$sidebar' class='widgets-sortables'>\n"; 71 71 72 72 $description = wp_sidebar_description( $sidebar ); 73 73 -
wp-admin/js/widgets.js
115 115 var add = ui.item.find('input.add_new').val(), 116 116 n = ui.item.find('input.multi_number').val(), 117 117 id = the_id, 118 sb = $(this).attr('id') ;118 sb = $(this).attr('id').replace(/^widget-area-/, ''); 119 119 120 120 ui.item.css({margin:'', 'width':''}); 121 121 the_id = ''; 122 122 … … 186 187 187 188 $('div.widgets-sortables').each( function() { 188 189 if ( $(this).sortable ) 189 a['sidebars[' + $(this).attr('id') + ']'] = $(this).sortable('toArray').join(',');190 a['sidebars[' + $(this).attr('id').replace(/^widget-area-/, '') + ']'] = $(this).sortable('toArray').join(','); 190 191 }); 191 192 192 193 $.post( ajaxurl, a, function() { … … 197 198 }, 198 199 199 200 save : function(widget, del, animate, order) { 200 var sb = widget.closest('div.widgets-sortables').attr('id') , data = widget.find('form').serialize(), a;201 var sb = widget.closest('div.widgets-sortables').attr('id').replace(/^widget-area-/, ''), data = widget.find('form').serialize(), a; 201 202 widget = $(widget); 202 203 $('.ajax-feedback', widget).css('visibility', 'visible'); 203 204