Changeset 23500

Show
Ignore:
Timestamp:
16.12.2010 14:54:24 (9 years ago)
Author:
davidb
Message:

needed to change window.addEventListener to document.addEventListener

Files:
1 modified

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         \}