diff --git src/wp-admin/css/common.css src/wp-admin/css/common.css
index 6a1e9d7..0ccc758 100644
|
|
h2 .nav-tab { |
1931 | 1931 | margin: 2px 5px 0; |
1932 | 1932 | } |
1933 | 1933 | |
| 1934 | .spinner.is-active { |
| 1935 | display: inline-block !important; |
| 1936 | } |
| 1937 | |
1934 | 1938 | #template div { |
1935 | 1939 | margin-right: 190px; |
1936 | 1940 | } |
diff --git src/wp-admin/js/dashboard.js src/wp-admin/js/dashboard.js
index f5e37e6..22385ee 100644
|
|
jQuery(document).ready( function($) { |
68 | 68 | $( '#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]' ).prop( 'disabled' , false ); |
69 | 69 | |
70 | 70 | t = $('#quick-press').submit( function() { |
71 | | $('#dashboard_quick_press #publishing-action .spinner').show(); |
| 71 | $('#dashboard_quick_press #publishing-action .spinner').addClass( 'is-active' ); |
72 | 72 | $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop('disabled', true); |
73 | 73 | |
74 | 74 | $.post( t.attr( 'action' ), t.serializeArray(), function( data ) { |
diff --git src/wp-admin/js/edit-comments.js src/wp-admin/js/edit-comments.js
index 72b81e2..05419c5 100644
|
|
commentReply = { |
352 | 352 | $('#replycontent').css('height', '').val(''); |
353 | 353 | $('#edithead input').val(''); |
354 | 354 | $('.error', replyrow).empty().hide(); |
355 | | $('.spinner', replyrow).hide(); |
| 355 | $( '.spinner', replyrow ).removeClass( 'is-active' ); |
356 | 356 | |
357 | 357 | this.cid = ''; |
358 | 358 | }, |
… |
… |
commentReply = { |
442 | 442 | var post = {}; |
443 | 443 | |
444 | 444 | $('#replysubmit .error').hide(); |
445 | | $('#replysubmit .spinner').show(); |
| 445 | $( '#replysubmit .spinner' ).addClass( 'is-active' ); |
446 | 446 | |
447 | 447 | $('#replyrow input').not(':button').each(function() { |
448 | 448 | var t = $(this); |
… |
… |
commentReply = { |
525 | 525 | error : function(r) { |
526 | 526 | var er = r.statusText; |
527 | 527 | |
528 | | $('#replysubmit .spinner').hide(); |
| 528 | $( '#replysubmit .spinner' ).removeClass( 'is-active' ); |
529 | 529 | |
530 | 530 | if ( r.responseText ) |
531 | 531 | er = r.responseText.replace( /<.[^<>]*?>/g, '' ); |
diff --git src/wp-admin/js/image-edit.js src/wp-admin/js/image-edit.js
index 7bf2928..0abf6ef 100644
|
|
var imageEdit = window.imageEdit = { |
306 | 306 | btn = $('#imgedit-open-btn-' + postid), spin = btn.siblings('.spinner'); |
307 | 307 | |
308 | 308 | btn.prop('disabled', true); |
309 | | spin.show(); |
| 309 | spin.addClass( 'is-active' ); |
310 | 310 | |
311 | 311 | data = { |
312 | 312 | 'action': 'image-editor', |
… |
… |
var imageEdit = window.imageEdit = { |
324 | 324 | head.fadeOut('fast', function(){ |
325 | 325 | elem.fadeIn('fast'); |
326 | 326 | btn.removeAttr('disabled'); |
327 | | spin.hide(); |
| 327 | spin.removeClass( 'is-active' ); |
328 | 328 | }); |
329 | 329 | }); |
330 | 330 | |
diff --git src/wp-admin/js/inline-edit-post.js src/wp-admin/js/inline-edit-post.js
index 1249904..a1a9c02 100644
|
|
inlineEditPost = { |
250 | 250 | id = this.getId(id); |
251 | 251 | } |
252 | 252 | |
253 | | $('table.widefat .spinner').show(); |
| 253 | $( 'table.widefat .spinner' ).addClass( 'is-active' ); |
254 | 254 | |
255 | 255 | params = { |
256 | 256 | action: 'inline-save', |
… |
… |
inlineEditPost = { |
266 | 266 | // make ajax request |
267 | 267 | $.post( ajaxurl, params, |
268 | 268 | function(r) { |
269 | | $('table.widefat .spinner').hide(); |
| 269 | $( 'table.widefat .spinner' ).removeClass( 'is-active' ); |
270 | 270 | |
271 | 271 | if (r) { |
272 | 272 | if ( -1 !== r.indexOf( '<tr' ) ) { |
… |
… |
inlineEditPost = { |
289 | 289 | var id = $('table.widefat tr.inline-editor').attr('id'); |
290 | 290 | |
291 | 291 | if ( id ) { |
292 | | $('table.widefat .spinner').hide(); |
| 292 | $( 'table.widefat .spinner' ).removeClass( 'is-active' ); |
293 | 293 | |
294 | 294 | if ( 'bulk-edit' === id ) { |
295 | 295 | $('table.widefat #bulk-edit').removeClass('inline-editor').hide().siblings('tr.hidden').remove(); |
diff --git src/wp-admin/js/inline-edit-tax.js src/wp-admin/js/inline-edit-tax.js
index a996f24..e174646 100644
|
|
inlineEditTax = { |
81 | 81 | id = this.getId(id); |
82 | 82 | } |
83 | 83 | |
84 | | $('table.widefat .spinner').show(); |
| 84 | $( 'table.widefat .spinner' ).addClass( 'is-active' ); |
85 | 85 | |
86 | 86 | params = { |
87 | 87 | action: 'inline-save-tax', |
… |
… |
inlineEditTax = { |
97 | 97 | $.post( ajaxurl, params, |
98 | 98 | function(r) { |
99 | 99 | var row, new_id, option_value; |
100 | | $('table.widefat .spinner').hide(); |
| 100 | $( 'table.widefat .spinner' ).removeClass( 'is-active' ); |
101 | 101 | |
102 | 102 | if (r) { |
103 | 103 | if ( -1 !== r.indexOf( '<tr' ) ) { |
… |
… |
inlineEditTax = { |
133 | 133 | var id = $('table.widefat tr.inline-editor').attr('id'); |
134 | 134 | |
135 | 135 | if ( id ) { |
136 | | $('table.widefat .spinner').hide(); |
| 136 | $( 'table.widefat .spinner' ).removeClass( 'is-active' ); |
137 | 137 | $('#'+id).siblings('tr.hidden').addBack().remove(); |
138 | 138 | id = id.substr( id.lastIndexOf('-') + 1 ); |
139 | 139 | $(this.what+id).show(); |
diff --git src/wp-admin/js/media.js src/wp-admin/js/media.js
index 59c1f1a..f0c2175 100644
|
|
var findPosts; |
51 | 51 | }, |
52 | 52 | spinner = $( '.find-box-search .spinner' ); |
53 | 53 | |
54 | | spinner.show(); |
| 54 | spinner.addClass( 'is-active' ); |
55 | 55 | |
56 | 56 | $.ajax( ajaxurl, { |
57 | 57 | type: 'POST', |
58 | 58 | data: post, |
59 | 59 | dataType: 'json' |
60 | 60 | }).always( function() { |
61 | | spinner.hide(); |
| 61 | spinner.removeClass( 'is-active' ); |
62 | 62 | }).done( function( x ) { |
63 | 63 | if ( ! x.success ) { |
64 | 64 | $( '#find-posts-response' ).text( attachMediaBoxL10n.error ); |
diff --git src/wp-admin/js/nav-menu.js src/wp-admin/js/nav-menu.js
index bf59c6f..9f8916a 100644
|
|
var wpNavMenu; |
177 | 177 | return false; |
178 | 178 | |
179 | 179 | // Show the ajax spinner |
180 | | t.find('.spinner').show(); |
| 180 | t.find( '.spinner' ).addClass( 'is-active' ); |
181 | 181 | |
182 | 182 | // Retrieve menu item data |
183 | 183 | $(checkboxes).each(function(){ |
… |
… |
var wpNavMenu; |
194 | 194 | api.addItemToMenu(menuItems, processMethod, function(){ |
195 | 195 | // Deselect the items and hide the ajax spinner |
196 | 196 | checkboxes.removeAttr('checked'); |
197 | | t.find('.spinner').hide(); |
| 197 | t.find( '.spinner' ).removeClass( 'is-active' ); |
198 | 198 | }); |
199 | 199 | }); |
200 | 200 | }, |
… |
… |
var wpNavMenu; |
862 | 862 | loc.find('select').each(function() { |
863 | 863 | params[this.name] = $(this).val(); |
864 | 864 | }); |
865 | | loc.find('.spinner').show(); |
| 865 | loc.find( '.spinner' ).addClass( 'is-active' ); |
866 | 866 | $.post( ajaxurl, params, function() { |
867 | | loc.find('.spinner').hide(); |
| 867 | loc.find( '.spinner' ).removeClass( 'is-active' ); |
868 | 868 | }); |
869 | 869 | return false; |
870 | 870 | }); |
… |
… |
var wpNavMenu; |
906 | 906 | 'type': input.attr('name') |
907 | 907 | }; |
908 | 908 | |
909 | | $('.spinner', panel).show(); |
| 909 | $( '.spinner', panel ).addClass( 'is-active' ); |
910 | 910 | |
911 | 911 | $.post( ajaxurl, params, function(menuMarkup) { |
912 | 912 | api.processQuickSearchQueryResponse(menuMarkup, params, panel); |
… |
… |
var wpNavMenu; |
923 | 923 | return false; |
924 | 924 | |
925 | 925 | // Show the ajax spinner |
926 | | $('.customlinkdiv .spinner').show(); |
| 926 | $( '.customlinkdiv .spinner' ).addClass( 'is-active' ); |
927 | 927 | this.addLinkToMenu( url, label, processMethod, function() { |
928 | 928 | // Remove the ajax spinner |
929 | | $('.customlinkdiv .spinner').hide(); |
| 929 | $( '.customlinkdiv .spinner' ).removeClass( 'is-active' ); |
930 | 930 | // Set custom link form back to defaults |
931 | 931 | $('#custom-menu-item-name').val('').blur(); |
932 | 932 | $('#custom-menu-item-url').val('http://'); |
… |
… |
var wpNavMenu; |
1174 | 1174 | |
1175 | 1175 | if( ! $items.length ) { |
1176 | 1176 | $('.categorychecklist', panel).html( '<li><p>' + navMenuL10n.noResultsFound + '</p></li>' ); |
1177 | | $('.spinner', panel).hide(); |
| 1177 | $( '.spinner', panel ).removeClass( 'is-active' ); |
1178 | 1178 | return; |
1179 | 1179 | } |
1180 | 1180 | |
… |
… |
var wpNavMenu; |
1201 | 1201 | }); |
1202 | 1202 | |
1203 | 1203 | $('.categorychecklist', panel).html( $items ); |
1204 | | $('.spinner', panel).hide(); |
| 1204 | $( '.spinner', panel ).removeClass( 'is-active' ); |
1205 | 1205 | }, |
1206 | 1206 | |
1207 | 1207 | removeMenuItem : function(el) { |
diff --git src/wp-admin/js/post.js src/wp-admin/js/post.js
index 32c5f9c..8dfdf37 100644
|
|
commentsBox = { |
20 | 20 | |
21 | 21 | this.st += num; |
22 | 22 | this.total = total; |
23 | | $('#commentsdiv .spinner').show(); |
| 23 | $( '#commentsdiv .spinner' ).addClass( 'is-active' ); |
24 | 24 | |
25 | 25 | data = { |
26 | 26 | 'action' : 'get-comments', |
… |
… |
commentsBox = { |
35 | 35 | function(r) { |
36 | 36 | r = wpAjax.parseAjaxResponse(r); |
37 | 37 | $('#commentsdiv .widefat').show(); |
38 | | $('#commentsdiv .spinner').hide(); |
| 38 | $( '#commentsdiv .spinner' ).removeClass( 'is-active' ); |
39 | 39 | |
40 | 40 | if ( 'object' == typeof r && r.responses[0] ) { |
41 | 41 | $('#the-comment-list').append( r.responses[0].data ); |
… |
… |
jQuery(document).ready( function($) { |
272 | 272 | $submitButtons.addClass( 'disabled' ); |
273 | 273 | |
274 | 274 | if ( $button.attr('id') === 'publish' ) { |
275 | | $submitpost.find('#major-publishing-actions .spinner').show(); |
| 275 | $submitpost.find( '#major-publishing-actions .spinner' ).addClass( 'is-active' ); |
276 | 276 | } else { |
277 | | $submitpost.find('#minor-publishing .spinner').show(); |
| 277 | $submitpost.find( '#minor-publishing .spinner' ).addClass( 'is-active' ); |
278 | 278 | } |
279 | 279 | }); |
280 | 280 | }); |
… |
… |
jQuery(document).ready( function($) { |
676 | 676 | wp.autosave.enableButtons(); |
677 | 677 | } |
678 | 678 | |
679 | | $('#publishing-action .spinner').hide(); |
| 679 | $( '#publishing-action .spinner' ).removeClass( 'is-active' ); |
680 | 680 | } |
681 | 681 | }); |
682 | 682 | |
diff --git src/wp-admin/js/widgets.js src/wp-admin/js/widgets.js
index a149a29..43e6f8c 100644
|
|
wpWidgets = { |
321 | 321 | }; |
322 | 322 | |
323 | 323 | if ( sidebarId ) { |
324 | | $( '#' + sidebarId ).find('.spinner:first').css('display', 'inline-block'); |
| 324 | $( '#' + sidebarId ).find( '.spinner:first' ).addClass( 'is-active' ); |
325 | 325 | } |
326 | 326 | |
327 | 327 | $('div.widgets-sortables').each( function() { |
… |
… |
wpWidgets = { |
331 | 331 | }); |
332 | 332 | |
333 | 333 | $.post( ajaxurl, data, function() { |
334 | | $('.spinner').hide(); |
| 334 | $( '.spinner' ).removedClass( 'is-active' ); |
335 | 335 | }); |
336 | 336 | }, |
337 | 337 | |
… |
… |
wpWidgets = { |
340 | 340 | data = widget.find('form').serialize(), a; |
341 | 341 | |
342 | 342 | widget = $(widget); |
343 | | $('.spinner', widget).show(); |
| 343 | $( '.spinner', widget ).addClass( 'is-active' ); |
344 | 344 | |
345 | 345 | a = { |
346 | 346 | action: 'save-widget', |
… |
… |
wpWidgets = { |
377 | 377 | widget.remove(); |
378 | 378 | } |
379 | 379 | } else { |
380 | | $('.spinner').hide(); |
| 380 | $( '.spinner' ).removeClass( 'is-active' ); |
381 | 381 | if ( r && r.length > 2 ) { |
382 | 382 | $( 'div.widget-content', widget ).html( r ); |
383 | 383 | wpWidgets.appendTitle( widget ); |
diff --git src/wp-admin/js/wp-fullscreen.js src/wp-admin/js/wp-fullscreen.js
index 2431738..cb8c8e0 100644
|
|
|
267 | 267 | $saveMessage = $('#wp-fullscreen-save .wp-fullscreen-saved-message'), |
268 | 268 | $errorMessage = $('#wp-fullscreen-save .wp-fullscreen-error-message'); |
269 | 269 | |
270 | | $spinner.show(); |
| 270 | $spinner.addClass( 'is-active' ); |
271 | 271 | $errorMessage.hide(); |
272 | 272 | $saveMessage.hide(); |
273 | 273 | $hidden.val('wp-fullscreen-save-post'); |
… |
… |
|
282 | 282 | data: $('form#post').serialize(), |
283 | 283 | dataType: 'json' |
284 | 284 | }).done( function( response ) { |
285 | | $spinner.hide(); |
| 285 | $spinner.removeClass( 'is-active' ); |
286 | 286 | |
287 | 287 | if ( response && response.success ) { |
288 | 288 | $saveMessage.show(); |
… |
… |
|
298 | 298 | $errorMessage.show(); |
299 | 299 | } |
300 | 300 | }).fail( function() { |
301 | | $spinner.hide(); |
| 301 | $spinner.removeClass( 'is-active' ); |
302 | 302 | $errorMessage.show(); |
303 | 303 | }); |
304 | 304 | |
diff --git src/wp-admin/options-general.php src/wp-admin/options-general.php
index 960c4f0..c1256df 100644
|
|
function options_general_add_js() { |
60 | 60 | }); |
61 | 61 | $("input[name='date_format_custom'], input[name='time_format_custom']").change( function() { |
62 | 62 | var format = $(this); |
63 | | format.siblings('.spinner').css('display', 'inline-block'); // show(); can't be used here |
| 63 | format.siblings( '.spinner' ).addClass( 'is-active' ); |
64 | 64 | $.post(ajaxurl, { |
65 | 65 | action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format', |
66 | 66 | date : format.val() |
67 | | }, function(d) { format.siblings('.spinner').hide(); format.siblings('.example').text(d); } ); |
| 67 | }, function(d) { format.siblings( '.spinner' ).removeClass( 'is-active' ); format.siblings('.example').text(d); } ); |
68 | 68 | }); |
69 | 69 | |
70 | 70 | var languageSelect = $( '#WPLANG' ); |
diff --git src/wp-includes/js/wplink.js src/wp-includes/js/wplink.js
index 7aa0f70..14361a2 100644
|
|
var wpLink; |
405 | 405 | return; |
406 | 406 | |
407 | 407 | wpLink.lastSearch = search; |
408 | | waiting = t.parent().find('.spinner').show(); |
| 408 | waiting = t.parent().find( '.spinner' ).addClass( 'is-active' ); |
409 | 409 | |
410 | 410 | rivers.search.change( search ); |
411 | 411 | rivers.search.ajax( function() { |
412 | | waiting.hide(); |
| 412 | waiting.removeClass( 'is-active' ); |
413 | 413 | }); |
414 | 414 | } else { |
415 | 415 | rivers.search.hide(); |
… |
… |
var wpLink; |
645 | 645 | if ( ! self.query.ready() || newBottom < self.contentHeight.height() - wpLink.riverBottomThreshold ) |
646 | 646 | return; |
647 | 647 | |
648 | | self.waiting.show(); |
| 648 | self.waiting.addClass( 'is-active' ); |
649 | 649 | el.scrollTop( newTop + self.waiting.outerHeight() ); |
650 | 650 | |
651 | 651 | self.ajax( function() { |
652 | | self.waiting.hide(); |
| 652 | self.waiting.removeClass( 'is-active' ); |
653 | 653 | }); |
654 | 654 | }, wpLink.timeToTriggerRiver ); |
655 | 655 | } |