Ticket #23120: 23120.2.diff
File 23120.2.diff, 2.2 KB (added by , 12 years ago) |
---|
-
wp-admin/js/widgets.js
175 175 }, 176 176 177 177 saveOrder : function(sb) { 178 var spinner; 179 178 180 if ( sb ) 179 $('#' + sb).closest('div.widgets-holder-wrap').find('.spinner').css('display', 'inline-block');181 spinner = $('#' + sb).closest('div.widgets-holder-wrap').find('.sidebar-name .spinner').css('display', 'inline-block'); 180 182 181 183 var a = { 182 184 action: 'widgets-order', … … 190 192 }); 191 193 192 194 $.post( ajaxurl, a, function() { 193 $('.spinner').hide(); 195 if ( spinner ) { 196 spinner.addClass('success').fadeOut('slow', function() { 197 $(this).removeClass('success'); 198 }); 199 } 200 }) 201 .error( function() { 202 if ( spinner ) { 203 spinner.addClass('error').fadeOut('slow', function() { 204 $(this).removeClass('error'); 205 }); 206 } 194 207 }); 195 208 196 209 this.resize(); … … 235 248 wpWidgets.resize(); 236 249 } 237 250 } else { 238 $('.spinner').hide(); 251 $('.spinner', widget).addClass('success').fadeOut('slow', function() { 252 $(this).removeClass('success'); 253 }); 254 239 255 if ( r && r.length > 2 ) { 240 256 $('div.widget-content', widget).html(r); 241 257 wpWidgets.appendTitle(widget); … … 244 260 } 245 261 if ( order ) 246 262 wpWidgets.saveOrder(); 263 }) 264 .error( function() { 265 $('.spinner', widget).addClass('error').fadeOut('slow', function() { 266 $(this).removeClass('error'); 267 }); 247 268 }); 248 269 }, 249 270 -
wp-admin/css/wp-admin.css
4625 4625 margin: 5px 5px 0; 4626 4626 } 4627 4627 4628 .spinner.success { 4629 background-image: url(../images/yes.png); 4630 } 4631 4632 .spinner.error { 4633 background-image: url(../images/no.png); 4634 } 4635 4628 4636 .no-float { 4629 4637 float: none; 4630 4638 } … … 9105 9113 .customize-loading #customize-container { 9106 9114 background-image: url(../images/wpspin_light-2x.gif); 9107 9115 } 9116 9117 .spinner.success { 9118 background-image: url(../images/yes-2x.png); 9119 } 9120 9121 .spinner.error { 9122 background-image: url(../images/no-2x.png); 9123 } 9108 9124 } 9109 9125 9110 9126 /* =Localized CSS