Changeset 22725 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 11/20/2012 07:46:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r22719 r22725 419 419 </script> 420 420 <?php endif; ?> 421 422 <?php if ( 'attachment' == $post_type ) { ?> 423 <script type="text/javascript"> 424 (function($){ 425 function getFieldsContent() { 426 return ($('#title').val() || '') + ($('#attachment_caption').val() || '') + 427 ($('#attachment_alt').val() || '') + ($('#attachment_content').val() || '') + ($('#post_name').val() || ''); 428 } 429 430 var initial = getFieldsContent(); 431 432 window.onbeforeunload = function() { 433 if ( initial != getFieldsContent() ) 434 return '<?php _e('The changes you made will be lost if you navigate away from this page.'); ?>'; 435 }; 436 })(jQuery); 437 </script> 438 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.