Ignore:
Timestamp:
2019-03-11T20:13:33+13:00 (5 years ago)
Author:
ak19
Message:

Part 2 of 2 commits to do with getting errorCallBack working on documentEditing for determining when changes have been saved or not to decided whether editableInitStates can finally be overwritten with current (saved) values. Tested with editing doc meta and doc map meta. Also tested special cases for both: with an meta edit followed by a tomcat restart, which then already warned you it requires a relogin for building to work, until which time editableInitStates is still not overwritten, so that it can warn you of unsaved changes if you attempt to leave the page at any point. The only time these changes don't work as expected (but still works better than original code which just loses your local changes) is when editing doc meta instead of map meta and there's the server restart in the middle and the new value ends up accumulating instead of replacing/overriding the previous value. In the old version of the code, new values were lost and the collection rebuilt, all silently without telling you of data loss.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/javascript-global-functions.js

    r32873 r32893  
    533533       
    534534        if(successResponseFunction != null) {
    535            
     535            //console.log("XXXX callMetaServer - Got response: " + response);
    536536            successResponseFunction(response);
    537537        }
    538538        })
    539         .error(function() {
     539        .error(function(response) {
    540540            if(errorResponseFunction != null) {
    541541                errorResponseFunction(response);
Note: See TracChangeset for help on using the changeset viewer.