Changeset 304
- Timestamp:
- 01/22/2014 05:05:33 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r303 r304 143 143 window.open( $( this ).attr( 'href' ) ); 144 144 }); 145 146 // Rudimentary save alerts for new tickets (summary/description) and comments. 147 window.onbeforeunload = function() { 148 if ( window.location.pathname === '/newticket' ) { 149 if ( 0 === $( '#field-description' ).val().length && 0 === $( '#field-summary' ).val().length ) { 150 return; 151 } 152 } else if ( 0 === $( '#comment' ).val().length ) { 153 return; 154 } 155 return 'The changes you made will be lost if you navigate away from this page.'; 156 }; 145 157 } 146 158
Note: See TracChangeset
for help on using the changeset viewer.