Changeset 29356


Ignore:
Timestamp:
09/01/14 14:13:55 (5 years ago)
Author:
plg
Message:

bug 3127: during upload, warn user if she wants to leave the page (works fine on Firefox/Chrome)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r29124 r29356  
    104104        console.log('[BeforeUpload]', file); 
    105105 
     106        // warn user if she wants to leave page while upload is running 
     107        jQuery(window).bind('beforeunload', function() { 
     108          return "{/literal}{'Upload in progress'|translate|escape}{literal}"; 
     109        }); 
     110 
    106111        // no more change on category/level 
    107112        jQuery("select[name=level]").attr("disabled", "disabled"); 
     
    166171 
    167172        jQuery(".afterUploadActions").show(); 
     173 
     174        // user can safely leave page without warning 
     175        jQuery(window).unbind('beforeunload'); 
    168176      } 
    169177    } 
    170178        }); 
    171  
    172179{/literal} 
    173180}); 
  • trunk/language/en_UK/admin.lang.php

    r29262 r29356  
    982982$lang['date & time'] = 'date & time'; 
    983983$lang['width & height'] = 'width & height'; 
     984$lang['Upload in progress'] = 'Upload in progress'; 
    984985?> 
  • trunk/language/fr_FR/admin.lang.php

    r29283 r29356  
    983983$lang['date & time'] = 'date et heure'; 
    984984$lang['width & height'] = 'largeur et hauteur'; 
    985 $lang['No and unlock sub-albums'] = 'Déverrouiller ou non les sous-albums'; 
     985$lang['No and unlock sub-albums'] = 'Non, et déverrouiller les sous-albums'; 
     986$lang['Upload in progress'] = 'Transfert en cours...'; 
Note: See TracChangeset for help on using the changeset viewer.