Changeset 32837 for main/trunk/greenstone3/web/interfaces
- Timestamp:
- 2019-03-01T22:34:19+13:00 (5 years ago)
- Location:
- main/trunk/greenstone3/web/interfaces/default/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/documentedit_scripts.js
r32832 r32837 117 117 118 118 var gsmap_store = {}; 119 120 // Called by documentedit_scripts_util.js when saving and rebuilding. 121 // This function should return all the doc sections' map overlay data so that 122 // setArchivesMetadata can be called for each and the entire collection rebuilt with the changes 123 function getDocMapsEditDataForSaving() { 124 var map_editors_array = Object.values(gsmap_store); 125 var modifiedMaps = []; // the array that is the return value: an array of only all the modified maps 126 127 // get collection name 128 var coll = gs.cgiParams.c; 129 130 131 for(var i = 0; i < map_editors_array.length; i++) { 132 var map_editor = map_editors_array[i]; 133 var oldMapData = map_editor.savedOverlays; 134 var newMapData = JSON.stringify(ShapesUtil.overlayToJSON(map_editor.overlays)); 135 136 if(oldMapData !== newMapData) { 137 138 var nodeID = map_editors_array[i].id; 139 var val = map_editors_array[i].overlays; 140 modifiedMaps.push({ 141 collection: coll, 142 docID: nodeID, 143 name:"GSP.mapOverlay", 144 pos: 0, 145 value:newMapData 146 }); 147 } 148 149 } 150 151 return modifiedMaps; 152 } 153 119 154 120 155 function addEditMapGPSLink(cell) { … … 348 383 349 384 // get collection name 350 var collection = gs.cgiParams.c; ;385 var collection = gs.cgiParams.c; 351 386 352 387 // get document id -
main/trunk/greenstone3/web/interfaces/default/js/map-scripts-editor.js
r32834 r32837 654 654 } 655 655 656 656 // event handler for s being pressed *when map editor has the focus* 657 // For saving and rebuilding, see map_scripts 657 658 MapEditor.prototype.saveToArchives = function () { 658 659 var that = this;
Note:
See TracChangeset
for help on using the changeset viewer.