Ticket #23120: 23120.3.diff
File 23120.3.diff, 3.3 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/js/post-formats.js
12 12 $this.addClass('nav-tab-active').blur(); 13 13 $('#post_format').val(format); 14 14 $('#post-body-content').attr('class', 'wp-format-' + format ); 15 16 if ( typeof(tinymce) !== 'undefined' ) { 17 var ed = tinymce.get( 'content' ), edBody, pformat; 18 if ( ed && this.id ) { 19 edBody = ed.getBody(); 20 pformat = 'post-format-' + this.id; // also need to handle 'post-format-0' 21 edBody.className = edBody.className.replace( /\bpost-format-[^ ]+/, '' ); 22 ed.dom.addClass( edBody, format ); 23 } 24 } 15 25 }); 16 26 17 27 // Image selection -
wp-admin/css/wp-admin.css
4625 4625 margin: 5px 5px 0; 4626 4626 } 4627 4627 4628 .spinner.success, 4629 .spinner.error { 4630 background-image: url(../images/uploader-icons.png); 4631 height: 15px; 4632 width: 15px; 4633 padding: 0; 4634 background-size: 134px 15px; 4635 filter: alpha(opacity=100); 4636 } 4637 4638 .spinner.error { 4639 background-position: -100px 0; 4640 } 4641 4642 .spinner.success { 4643 background-position: -1px 0; 4644 } 4645 4628 4646 .no-float { 4629 4647 float: none; 4630 4648 } … … 9105 9123 .customize-loading #customize-container { 9106 9124 background-image: url(../images/wpspin_light-2x.gif); 9107 9125 } 9126 9127 .spinner.success, 9128 .spinner.error { 9129 background-image: url(../images/uploader-icons-2x.png); 9130 height: 30px; 9131 width: 30px; 9132 padding: 0; 9133 background-size: 267px 30px; 9134 filter: alpha(opacity=100); 9135 } 9136 9137 .spinner.success { 9138 background-position: -2px 0; 9139 } 9140 9141 .spinner.error { 9142 background-position: -200px 0; 9143 } 9108 9144 } 9109 9145 9110 9146 /* =Localized CSS