Make WordPress Core

Ticket #22491: 22491.5.diff

File 22491.5.diff, 781 bytes (added by johnbillion, 11 years ago)
  • wp-admin/edit-form-advanced.php

     
    457457                if ( changed )
    458458                        return '<?php _e('The changes you made will be lost if you navigate away from this page.'); ?>';
    459459        };
     460
     461        $('input[type="submit"], a.submitdelete', '#submitpost').click(function(){
     462                window.onbeforeunload = null;
     463                $(':button, :submit', '#submitpost').each(function(){
     464                        var t = $(this);
     465                        if ( t.hasClass('button-primary') )
     466                                t.addClass('button-primary-disabled');
     467                        else
     468                                t.addClass('button-disabled');
     469                });
     470                $('#major-publishing-actions .spinner').show();
     471        });
    460472})(jQuery);
    461473</script>
    462474<?php } ?>