Ticket #30725: 30725.5.diff
File 30725.5.diff, 5.5 KB (added by , 10 years ago) |
---|
-
src/wp-includes/css/media-views.css
1494 1494 background: url(../images/spinner.gif) no-repeat; 1495 1495 -webkit-background-size: 20px 20px; 1496 1496 background-size: 20px 20px; 1497 display: none;1498 1497 opacity: 0.7; 1499 1498 filter: alpha(opacity=70); 1500 1499 width: 20px; -
src/wp-includes/js/media/views/attachments/browser.js
306 306 } 307 307 308 308 if ( ! this.collection.length ) { 309 this.toolbar.get( 'spinner' ). show();309 this.toolbar.get( 'spinner' ).$el.addClass( 'is-active' ); 310 310 this.dfd = this.collection.more().done( function() { 311 311 if ( ! view.collection.length ) { 312 312 noItemsView.$el.removeClass( 'hidden' ); 313 313 } else { 314 314 noItemsView.$el.addClass( 'hidden' ); 315 315 } 316 view.toolbar.get( 'spinner' ). hide();316 view.toolbar.get( 'spinner' ).$el.removeClass( 'is-active' ); 317 317 } ); 318 318 } else { 319 319 noItemsView.$el.addClass( 'hidden' ); 320 view.toolbar.get( 'spinner' ). hide();320 view.toolbar.get( 'spinner' ).$el.removeClass( 'is-active' ); 321 321 } 322 322 }, 323 323 -
src/wp-includes/js/media/views/attachments.js
284 284 285 285 // Show the spinner only if we are close to the bottom. 286 286 if ( el.scrollHeight - ( scrollTop + el.clientHeight ) < el.clientHeight / 3 ) { 287 toolbar.get('spinner'). show();287 toolbar.get('spinner').$el.addClass( 'is-active' ); 288 288 } 289 289 290 290 if ( el.scrollHeight < scrollTop + ( el.clientHeight * this.options.refreshThreshold ) ) { 291 291 this.collection.more().done(function() { 292 292 view.scroll(); 293 toolbar.get('spinner'). hide();293 toolbar.get('spinner').$el.removeClass( 'is-active' ); 294 294 }); 295 295 } 296 296 } -
src/wp-includes/js/media/views/embed/link.js
34 34 return; 35 35 } 36 36 37 this.spinner. show();37 this.spinner.addClass( 'is-active' ); 38 38 39 39 this.fetch(); 40 40 }, 600 ), … … 95 95 this.model.unset( 'width', opts ); 96 96 } 97 97 98 this.spinner. hide();98 this.spinner.removeClass( 'is-active' ); 99 99 100 100 this.$('.embed-container').show().find('.embed-preview').html( html ); 101 101 } -
src/wp-includes/js/media/views/spinner.js
17 17 show: function() { 18 18 if ( ! this.spinnerTimeout ) { 19 19 this.spinnerTimeout = _.delay(function( $el ) { 20 $el. show();20 $el.addClass( 'is-active' ); 21 21 }, this.delay, this.$el ); 22 22 } 23 23 … … 25 25 }, 26 26 27 27 hide: function() { 28 this.$el. hide();28 this.$el.removeClass( 'is-active' ); 29 29 this.spinnerTimeout = clearTimeout( this.spinnerTimeout ); 30 30 31 31 return this; -
src/wp-includes/js/media/views.js
3655 3655 3656 3656 // Show the spinner only if we are close to the bottom. 3657 3657 if ( el.scrollHeight - ( scrollTop + el.clientHeight ) < el.clientHeight / 3 ) { 3658 toolbar.get('spinner'). show();3658 toolbar.get('spinner').$el.addClass( 'is-active' ); 3659 3659 } 3660 3660 3661 3661 if ( el.scrollHeight < scrollTop + ( el.clientHeight * this.options.refreshThreshold ) ) { 3662 3662 this.collection.more().done(function() { 3663 3663 view.scroll(); 3664 toolbar.get('spinner'). hide();3664 toolbar.get('spinner').$el.removeClass( 'is-active' ); 3665 3665 }); 3666 3666 } 3667 3667 } … … 3978 3978 } 3979 3979 3980 3980 if ( ! this.collection.length ) { 3981 this.toolbar.get( 'spinner' ). show();3981 this.toolbar.get( 'spinner' ).$el.addClass( 'is-active' ); 3982 3982 this.dfd = this.collection.more().done( function() { 3983 3983 if ( ! view.collection.length ) { 3984 3984 noItemsView.$el.removeClass( 'hidden' ); 3985 3985 } else { 3986 3986 noItemsView.$el.addClass( 'hidden' ); 3987 3987 } 3988 view.toolbar.get( 'spinner' ).hide();3988 view.toolbar.get( 'spinner').$el.removeClass( 'is-active' ); 3989 3989 } ); 3990 3990 } else { 3991 3991 noItemsView.$el.addClass( 'hidden' ); 3992 view.toolbar.get( 'spinner' ).hide();3992 view.toolbar.get( 'spinner').$el.removeClass( 'is-active' ); 3993 3993 } 3994 3994 }, 3995 3995 … … 4546 4546 return; 4547 4547 } 4548 4548 4549 this.spinner. show();4549 this.spinner.addClass( 'is-active' ); 4550 4550 4551 4551 this.fetch(); 4552 4552 }, 600 ), … … 4607 4607 this.model.unset( 'width', opts ); 4608 4608 } 4609 4609 4610 this.spinner. hide();4610 this.spinner.removeClass( 'is-active' ); 4611 4611 4612 4612 this.$('.embed-container').show().find('.embed-preview').html( html ); 4613 4613 } … … 7463 7463 show: function() { 7464 7464 if ( ! this.spinnerTimeout ) { 7465 7465 this.spinnerTimeout = _.delay(function( $el ) { 7466 $el. show();7466 $el.addClass( 'is-active' ); 7467 7467 }, this.delay, this.$el ); 7468 7468 } 7469 7469 … … 7471 7471 }, 7472 7472 7473 7473 hide: function() { 7474 this.$el. hide();7474 this.$el.removeClass( 'is-active' ); 7475 7475 this.spinnerTimeout = clearTimeout( this.spinnerTimeout ); 7476 7476 7477 7477 return this;