mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 00:27:38 +02:00
For an intermittent connection, only disable save and publish buttons when the request times out. An error still means a we have a connection.
props azaozz. see #24695. git-svn-id: http://core.svn.wordpress.org/trunk@24691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
36aec42cad
commit
a9a0d3b27d
@ -142,12 +142,14 @@ jQuery(document).ready( function($) {
|
||||
}
|
||||
|
||||
// When connection is lost, keep user from submitting changes.
|
||||
$(document).on('heartbeat-connection-lost.autosave', function() {
|
||||
autosave_disable_buttons();
|
||||
$('#lost-connection-notice').show();
|
||||
$(document).on('heartbeat-connection-lost.autosave', function( e, error ) {
|
||||
if ( 'timeout' === error ) {
|
||||
$('#lost-connection-notice').show();
|
||||
autosave_disable_buttons();
|
||||
}
|
||||
}).on('heartbeat-connection-restored.autosave', function() {
|
||||
autosave_enable_buttons();
|
||||
$('#lost-connection-notice').hide();
|
||||
autosave_enable_buttons();
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user