Make WordPress Core

Changeset 24743


Ignore:
Timestamp:
07/18/2013 09:33:59 PM (13 years ago)
Author:
nacin
Message:

Better 'Connection lost' notice that includes an indication of activity. fixes #24695.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.css

    r24734 r24743  
    29942994}
    29952995
     2996#lost-connection-notice .spinner {
     2997    display: block;
     2998    float: left;
     2999    margin: 0 5px 0 0;
     3000}
     3001
     3002.rtl #lost-connection-notice .spinner {
     3003    float: right;
     3004    margin: 0 0 0 5px;
     3005}
     3006
    29963007#titlediv {
    29973008    position: relative;
  • trunk/wp-admin/edit-form-advanced.php

    r24586 r24743  
    314314<?php endif; ?>
    315315<div id="lost-connection-notice" class="error hidden">
    316     <p><?php _e("You have lost your connection with the server, and saving has been disabled. This message will vanish once you've reconnected."); ?></p>
     316    <p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you&#8217;re reconnected.' ); ?>
     317    <span class="hide-if-no-sessionstorage"><?php _e( 'We&#8217;re backing up this post in your browser, just in case.' ); ?></span>
     318    </p>
    317319</div>
    318320
  • trunk/wp-includes/js/autosave.js

    r24710 r24743  
    145145    $(document).on('heartbeat-connection-lost.autosave', function( e, error ) {
    146146        if ( 'timeout' === error ) {
    147             $('#lost-connection-notice').show();
     147            var notice = $('#lost-connection-notice');
     148            if ( ! wp.autosave.local.hasStorage ) {
     149                notice.find('.hide-if-no-sessionstorage').hide();
     150            }
     151            notice.show();
    148152            autosave_disable_buttons();
    149153        }
Note: See TracChangeset for help on using the changeset viewer.