Changeset 23500


Ignore:
Timestamp:
2010-12-16T14:54:24+13:00 (11 years ago)
Author:
davidb
Message:

needed to change window.addEventListener to document.addEventListener

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/macros/seaweed.dm

    r23396 r23500  
    11package Global
    2 
    3 _unloadhandler_ {saveMetadata}
    42
    53_seaweed_ {
     
    130128      try \{
    131129      de.init();
    132       window.addEventListener('beforeunload',saveMetadata,true);
    133      
     130      document.addEventListener('beforeunload',saveMetadata,true);
    134131       
    135132       de.doc.declarePropertySets(\{
     
    158155       
    159156           var metavalue = metavalue.replace(/ /g, " ");
    160        
     157           metavalue = escape(metavalue);
     158
    161159           // alert("docoid = " + docoid + " metaname = " + metaname + " metapos = " + metapos + " metavalue = " + metavalue);
    162160
     
    164162
    165163           gsapi.setDocumentMetadata(docoid,metaname,metapos,metavalue);
     164           gsapi.explodeDocument(docoid);
    166165       
    167166         \}
Note: See TracChangeset for help on using the changeset viewer.