Changeset 32440 for main/trunk

Show
Ignore:
Timestamp:
11.09.2018 13:07:11 (12 months ago)
Author:
kjdon
Message:

log the not saved message as some browsers don't show it in their popup

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/documentedit_scripts_util.js

    r32134 r32440  
    2929// jquery bind() is deprecated: https://stackoverflow.com/questions/33654716/is-jquery-bind-deprecated 
    3030$(window).on("beforeunload", function(event) { 
     31     
    3132    if(gs.cgiParams.docEdit == "1") { // like document.xsl, which checks the same var upon onload 
    3233    // shouldn't check for whether changes are saved unless on Doc Editing page (DocEdit=1) 
     
    3637     
    3738    if(changes.length > 0) { 
     39        console.log("The collection hasn't yet been saved after editing. Are you sure you want to leave?"); 
    3840        return "The collection hasn't yet been saved after editing. Are you sure you want to leave?";    
    3941    } 
    40  
    4142    } 
    4243