Ticket #23120: 23120.patch
File 23120.patch, 1.7 KB (added by , 12 years ago) |
---|
-
wp-admin/css/wp-admin.css
4190 4190 margin: 5px 5px 0; 4191 4191 } 4192 4192 4193 .spinner.confirm-saved { 4194 background: url(../images/yes.png); 4195 } 4196 4193 4197 .no-float { 4194 4198 float: none; 4195 4199 } -
wp-admin/js/widgets.js
175 175 }, 176 176 177 177 saveOrder : function(sb) { 178 if ( sb ) 179 $('#' + sb).closest('div.widgets-holder-wrap').find('.spinner').css('display', 'inline-block'); 178 var spinner; 180 179 180 if ( sb ) { 181 spinner = $('#' + sb).closest('div.widgets-holder-wrap').find('.sidebar-name .spinner'); 182 spinner.css('display', 'inline-block'); 183 } 184 181 185 var a = { 182 186 action: 'widgets-order', 183 187 savewidgets: $('#_wpnonce_widgets').val(), … … 190 194 }); 191 195 192 196 $.post( ajaxurl, a, function() { 193 $('.spinner').hide(); 197 if ( ! spinner ) 198 return; 199 200 spinner.addClass('confirm-saved').delay(1000).animate({ opacity: 0 }, 500, 'linear', function() { 201 $(this).hide().removeClass('confirm-saved').css('opacity', 1); 202 }); 194 203 }); 195 204 196 205 this.resize(); … … 235 244 wpWidgets.resize(); 236 245 } 237 246 } else { 238 $('.spinner').hide(); 247 $('.spinner', widget).addClass('confirm-saved').delay(1000).animate({ opacity: 0 }, 500, 'linear', function() { 248 $(this).hide().removeClass('confirm-saved').css('opacity', 1); 249 }); 239 250 if ( r && r.length > 2 ) { 240 251 $('div.widget-content', widget).html(r); 241 252 wpWidgets.appendTitle(widget);