Changeset 11674
- Timestamp:
- 03/15/2022 08:03:17 AM (3 years ago)
- Location:
- sites/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/trac.wordpress.org/templates/site.html
r11638 r11674 5 5 6 6 <?python 7 scripts_version = '17 1'7 scripts_version = '172' 8 8 project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0] 9 9 wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/' -
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r11635 r11674 86 86 enable_copy: true 87 87 }, 88 ' learn.wordpress.org': {88 'Learn (learn.wordpress.org)': { 89 89 tracker: 'https://github.com/WordPress/learn/issues/new', 90 90 tracker_text: 'WordPress.org Learn GitHub Repository', … … 774 774 } 775 775 } 776 return;777 776 } 778 777 … … 794 793 795 794 // If the component (ie. Editor) allows bypassing the warning show the create buttons. 796 if ( tracker.allow_bypass ) {795 if ( ! wpTrac.isNewTicket() || tracker.allow_bypass ) { 797 796 toggle.show(); 798 797 } … … 803 802 '<a href="' + tracker.tracker + '">' + ( tracker.tracker_text || tracker.tracker ) + '</a>' + 804 803 '</p><p>' + 805 'Would you mind opening this ticket over there instead? ' +804 'Would you mind creating this ticket over there instead if appropriate? ' + 806 805 ( tracker.enable_copy ? '<a href="' + tracker.tracker + '" id="new-tracker-ticket">Click here to copy your summary and description over</a>.' : '' ) + 807 806 '</p>' + 808 ( tracker.allow_bypass ? '<p>If this isn\'t related to '+ ( tracker.bug_text || selectedComponent ) + ', please continue to open this ticket here.</p>' : '' ) +807 ( wpTrac.isNewTicket() && tracker.allow_bypass ? "<p>If this isn't related to " + ( tracker.bug_text || selectedComponent ) + ', please continue to open this ticket here.</p>' : '' ) + 809 808 '</div>' 810 809 ); 811 810 }); 811 812 if ( ! wpTrac.isNewTicket() && ! $('#action_reopen').length ) { 813 component.trigger('change'); 814 } 812 815 813 816 $('#propertyform').on( 'click', '#new-tracker-ticket', function() { … … 824 827 url_params[description_field] = $('#field-description').val() 825 828 826 url = href + ( href.indexOf( '?' ) ? '&' : '?' ) + $.param( url_params );829 url = href + ( href.indexOf( '?' ) !== -1 ? '&' : '?' ) + $.param( url_params ); 827 830 if ( url.length > 1500 ) { 828 831 url_params[description_field] = '(Couldn\'t copy over your description as it was too long. Please paste it here. Your old window was not closed.)'; 829 url = href + '?'+ $.param( url_params );832 url = href + ( href.indexOf( '?' ) !== -1 ? '&' : '?' ) + $.param( url_params ); 830 833 window.open( url ); 831 834 } else {
Note: See TracChangeset
for help on using the changeset viewer.