Changeset 32440 for main/trunk


Ignore:
Timestamp:
2018-09-11T13:07:11+12:00 (3 years ago)
Author:
kjdon
Message:

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

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.