Ticket #23120: 23120.diff
File 23120.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
4190 4190 margin: 5px 5px 0; 4191 4191 } 4192 4192 4193 .spinner.success { 4194 background-image: url(../images/yes.png); 4195 } 4196 4197 .spinner.error { 4198 background-image: url(../images/no.png); 4199 } 4200 4193 4201 .no-float { 4194 4202 float: none; 4195 4203 } … … 8512 8520 .customize-loading #customize-container { 8513 8521 background-image: url(../images/wpspin_light-2x.gif); 8514 8522 } 8523 8524 .spinner.success { 8525 background-image: url(../images/yes-2x.png); 8526 } 8527 8528 .spinner.error { 8529 background-image: url(../images/no-2x.png); 8530 } 8515 8531 } 8516 8532 8517 8533 /* =Localized CSS