Changeset 6668
- Timestamp:
- 02/17/2018 07:09:06 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r6527 r6668 1 1 /* globals wpTracAutoCompleteUsers, wpTracContributorLabels, wpTracCurrentUser */ 2 var wpTrac, coreKeywordList, gardenerKeywordList, reservedTerms, coreFocusesList ;2 var wpTrac, coreKeywordList, gardenerKeywordList, reservedTerms, coreFocusesList, $body; 3 3 4 4 (function($){ … … 57 57 ]; 58 58 59 $body = $( document.body ); 60 59 61 wpTrac = { 60 62 … … 75 77 wpTrac.linkMentions(); 76 78 77 if ( ! $ (document.body).hasClass( 'plugins' ) ) {79 if ( ! $body.hasClass( 'plugins' ) ) { 78 80 wpTrac.workflow.init(); 79 if ( $ (document.body).hasClass( 'core' ) ) {81 if ( $body.hasClass( 'core' ) ) { 80 82 wpTrac.reports(); 81 83 wpTrac.focuses.init(); … … 180 182 181 183 hacks: function() { 182 var content = $( '#content' ), 183 $body = $( document.body ); 184 var content = $( '#content' ); 184 185 185 186 // Add deprecated notice for core's test repository. … … 195 196 } ) ); 196 197 } 198 } 199 200 if ( $body.hasClass( 'themes' ) ) { 201 $( '#h_reporter' ).text( 'Developer:' ); 202 $( '#h_owner' ).text( 'Reviewer:' ); 197 203 } 198 204 … … 527 533 } 528 534 529 if ( $ (document.body).hasClass( 'core' ) && content.hasClass( 'search' ) ) {535 if ( $body.hasClass( 'core' ) && content.hasClass( 'search' ) ) { 530 536 // Remove 'Wiki' and 'Milestone' from search. 531 537 $( '#fullsearch #milestone' ).next().remove().end().remove(); … … 541 547 542 548 // If we're on /newticket (based on the field-owner check), declutter. 543 if ( $('#field-owner').length && $ (document.body).hasClass( 'core' ) ) {549 if ( $('#field-owner').length && $body.hasClass( 'core' ) ) { 544 550 $('#field-priority, #field-severity, #field-milestone, #field-cc, #field-keywords').parents('td').hide().prev().hide(); 545 551 if ( $('#field-focuses').length ) { … … 600 606 }).done( function( data ) { 601 607 $( data ).find( '.ticket-reports' ).appendTo( popup ); 602 $ (document.body).addClass( 'ticket-reports-open' );608 $body.addClass( 'ticket-reports-open' ); 603 609 }).fail( function() { 604 610 failed = true; 605 611 }); 606 612 } else { 607 $ (document.body).toggleClass( 'ticket-reports-open' );613 $body.toggleClass( 'ticket-reports-open' ); 608 614 event.preventDefault(); 609 615 } … … 613 619 }); 614 620 $( '#report-popup' ).on( 'click', '.close', function() { 615 $ (document.body).removeClass( 'ticket-reports-open' );621 $body.removeClass( 'ticket-reports-open' ); 616 622 return false; 617 623 });
Note: See TracChangeset
for help on using the changeset viewer.