Changeset 306
- Timestamp:
- 01/22/2014 06:34:41 PM (11 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/style/trac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.css
r301 r306 1123 1123 /* =Focuses */ 1124 1124 #properties table td#focuses { 1125 padding: .6em 0 .3em ;1125 padding: .6em 0 .3em 100px; 1126 1126 height: 66px; 1127 1127 } … … 1131 1131 #focuses ul { 1132 1132 float: left; 1133 width: 356px;1133 width: 256px; 1134 1134 margin: 0; 1135 1135 padding: 0; -
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r305 r306 29 29 coreFocusesList = { 30 30 'ui' : 'UI or design related.', 31 'accessibility' : 'Accessibility focus.', 31 32 'javascript' : 'Heavy JavaScript focus.', 32 // 'accessibility' : 'Accessibility focus.', 33 'unit tests' : 'PHP or JS unit tests.', 34 'docs' : 'Documentation focus.', 35 'rtl' : 'Right-to-left languages.', 36 'administration' : 'Dashboard related, but assigned a more specifc component.', 37 'template' : 'Relating to theme template functions, but assigned a more specific component.', 33 // 'unit tests' : 'PHP or JS unit tests.', 34 // 'administration' : 'Dashboard related, but assigned a more specifc component.', 35 // 'template' : 'Relating to theme template functions, but assigned a more specific component.', 36 'docs' : 'Inline documentation focus.', 37 'multisite' : 'Relating to multisite, but assigned a more specific component.', 38 38 'performance' : 'Performance or caching (but not the Cache API component).', 39 // 'multisite' : 'Relating to multisite, but assigned a more specific component.'39 'rtl' : 'Right-to-left languages.' 40 40 }; 41 41 … … 48 48 init: function() { 49 49 wpTrac.hacks(); 50 wpTrac.nonGardeners(); 50 51 if ( ! $(document.body).hasClass( 'plugins' ) ) { 51 52 wpTrac.workflow.init(); 52 } 53 wpTrac.nonGardeners(); 53 if ( $(document.body).hasClass( 'core' ) ) { 54 // wpTrac.focuses.init(); 55 } 56 } 54 57 }, 55 58 … … 147 150 window.onbeforeunload = function() { 148 151 if ( window.location.pathname === '/newticket' ) { 149 if ( 0 === $( '#field-description' ).val().length && 0 === $( '#field-summary' ).val().length) {152 if ( ! $( '#field-description' ).val() && ! $( '#field-summary' ).val() ) { 150 153 return; 151 154 } 152 } else if ( 0 === $( '#comment' ).val().length) {155 } else if ( ! $( '#comment' ).val() ) { 153 156 return; 157 154 158 } 155 159 return 'The changes you made will be lost if you navigate away from this page.'; … … 256 260 if ( $('#field-owner').length ) { 257 261 $('#field-priority, #field-severity, #field-milestone, #field-cc, #field-keywords').parents('td').hide().prev().hide(); 262 if ( $('#field-focuses').length ) { 263 $('#field-focuses').closest('td').attr( 'colspan', 3 ); 264 $('#field-component').parent().add( $('#field-component').parent().prev() ).wrapAll( '<tr />' ).insertBefore( $( '#field-focuses' ).parents( 'tr' ) ); 265 } 258 266 } 259 267 … … 527 535 } 528 536 $('label[for="field-focuses"]').parent().remove(); 529 field.parent().attr({ colspan: 2, id: 'focuses' }); 537 if ( field.parent().attr( 'colspan' ) == 3 ) { 538 field.parent().attr( 'id', 'focuses' ); 539 } else { 540 field.parent().attr({ colspan: 2, id: 'focuses' }); 541 } 530 542 field.hide(); 531 543 … … 556 568 container.on( 'click', 'a', addRemove ); 557 569 container.closest( 'form' ).on( 'submit', submit ); 570 $( '#field-component' ).on( 'change', componentSync ); 558 571 } 559 572 … … 569 582 570 583 function add( focus ) { 584 if ( typeof focus === 'string' ) { 585 focus = container.find( 'li.' + focus ); 586 } 571 587 focus.addClass( 'active' ); 572 588 focuses.push( focus.data( 'focus' ) ); … … 575 591 576 592 function remove( focus ) { 593 if ( typeof focus === 'string' ) { 594 focus = container.find( 'li.' + focus ); 595 } 577 596 focus.removeClass( 'active' ); 578 597 var remove = focus.data( 'focus' ); … … 591 610 }); 592 611 field.val( orderedFocuses.join( ', ' ) ); 612 } 613 614 function componentSync() { 615 var component = $(this).val(); 616 if ( component === 'Network Admin' || component === 'Networks/Sites' ) { 617 add( 'multisite' ); 618 } 593 619 } 594 620
Note: See TracChangeset
for help on using the changeset viewer.