Changeset 10669
- Timestamp:
- 02/12/2021 05:05:46 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/js/forums.js
r10665 r10669 23 23 } 24 24 25 if ( $( 'body' ).is( '.bbp- is-view' ) ) {25 if ( $( 'body' ).is( '.bbp-view' ) ) { 26 26 $( '.bbp-body .bbp-admin-links a' ).click( function( e ) { 27 27 var $this = $( this ), 28 28 $element = $this.closest( '.bbp-body' ), 29 $content = $element.find( '.bbp-topic-content' ), 29 30 type; 31 32 // Don't affect open-in-new-tab. 33 if ( e.metaKey || e.ctrlKey || e.which === 2 ) { 34 return; 35 } 30 36 31 37 if ( $this.is( '[class*=approve]' ) ) { … … 41 47 e.preventDefault(); 42 48 49 $element.fadeTo( 500, .5 ); 50 43 51 $.get( $this.prop( 'href' ) ).done( function() { 44 $element.fadeOut( 250, function() { 45 $element.html( 46 '<div class="bbp-template-notice">' + wporgSupport.strings[ type ] + '</div>' 47 ); 48 } ).fadeIn( 250 ); 52 $content.append( 53 '<div class="bbp-template-notice">' + wporgSupport.strings[ type ] + '</div>' 54 ); 55 56 // Remove actions. 57 $this.parent().find('a:not(.bbp-topic-edit-link)').remove(); 58 59 $element.fadeTo( 250, 1 ); 49 60 } ).error( function() { 50 $ element.fadeOut( 250, function() {51 $element.find( '.bbp-topic-content' ).prepend(52 '<div class="bbp-template-notice">' + wporgSupport.strings.action_failed + '</div>'53 ); 54 } ).fadeIn( 250);61 $content.append( 62 '<div class="bbp-template-notice">' + wporgSupport.strings.action_failed + '</div>' 63 ); 64 65 $element.fadeTo( 250, 1 ); 55 66 } ); 56 67 } );
Note: See TracChangeset
for help on using the changeset viewer.