Changeset 246
- Timestamp:
- 01/09/2014 08:32:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r245 r246 371 371 372 372 hide_cc_field: function() { 373 if ( $('#content').hasClass('query') ) { 374 $('table.trac-clause tr.actions option[value="cc"]').remove(); 375 $('#columns').find('input[type="checkbox"][name="col"][value="cc"]').parent().remove(); 373 var content = $( '#content' ); 374 if ( content.hasClass( 'query' ) ) { 375 $( 'table.trac-clause tr.actions option[value="cc"]' ).remove(); 376 $( '#columns' ).find( 'input[type="checkbox"][name="col"][value="cc"]' ).parent().remove(); 377 } 378 if ( content.hasClass( 'ticket' ) ) { 379 $( '#changelog div.change' ).has( 'li.trac-field-cc' ).each( function() { 380 var change = $(this), changes = change.children( 'ul.changes' ); 381 /* Three possibilities: 382 The comment is just a single CC (hide the whole comment) 383 The comment is a CC plus a comment (hide the CC line) 384 The comment contains multiple property changes (hide only the CC line) 385 */ 386 if ( changes.children( 'li' ).length === 1 ) { 387 if ( change.children( 'div.comment' ).length === 0 ) { 388 change.hide(); 389 } else { 390 changes.hide(); 391 } 392 } else { 393 changes.children( 'li.trac-field-cc' ).hide(); 394 } 395 }); 376 396 } 377 397 },
Note: See TracChangeset
for help on using the changeset viewer.