- Timestamp:
- 08/18/08 18:57:52 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/gmapsimageviewer/web/module/portlets/imageViewerWindow.jsp
r5307 r5311 32 32 map.addControl(new TextualButtonControl()); //Custom controls, defined further down in the script 33 33 map.enableScrollWheelZoom(); 34 map.disableDoubleClickZoom(); 34 35 35 36 //This function returns the URL for the requested image tile … … 41 42 42 43 GEvent.addListener(map, "dblclick", function(overlay, point) { 44 //if(overlay==null) 43 45 createMarker(point); 44 46 }); … … 70 72 } 71 73 74 //Loads all the annotation markers for the image and places them on the map. 72 75 function loadMarkers() { 73 76 jQuery.get( … … 112 115 } 113 116 117 //Creates a new marker and opens an infowindow with a form to fill in the annoation text. 114 118 function createMarker(point) { 115 119 var marker = new GMarker(point); … … 134 138 } 135 139 140 //Saves a new annotation using an AJAX call. 136 141 function saveMarker() { 137 142 jQuery.post( … … 150 155 } 151 156 157 //Opens an infowindow on an existing marker to edit its annotation text 152 158 function editMarker(listindex) { 153 159 var marker = markerlist[listindex]; … … 172 178 } 173 179 180 //Saves the new position of a marker that has been moved. 174 181 function saveNewMarkerPosition(listindex, lat, lng) { 175 182 var annotationitem = annoationlist[listindex]; … … 196 203 } 197 204 205 //Allows a marker to be moved using drag&drop 198 206 function dragMarker(listindex) { 199 207 var oldmarker = markerlist[listindex]; … … 221 229 } 222 230 231 //Deletes an annotation 223 232 function deleteMarker(listindex) { 224 233 var annotationitem = annoationlist[listindex]; … … 256 265 this.setButtonStyle_(showDiv); 257 266 container.appendChild(showDiv); 258 showDiv.appendChild(document.createTextNode( "Show annotations"));267 showDiv.appendChild(document.createTextNode('<spring:message code="gmapsimageviewer.showannotations" />')); 259 268 260 269 GEvent.addDomListener(showDiv, "click", function() { … … 266 275 this.setButtonStyle_(hideDiv); 267 276 container.appendChild(hideDiv); 268 hideDiv.appendChild(document.createTextNode( "Hide annotations"));277 hideDiv.appendChild(document.createTextNode('<spring:message code="gmapsimageviewer.hideannotations" />')); 269 278 270 279 GEvent.addDomListener(hideDiv, "click", function() { … … 283 292 GEvent.addListener(map, "zoomend", function(oldLevel, newLevel) { 284 293 var percent = Math.round(100 * Math.pow(2, newLevel-${model.nullScaleZoomLevel})); 285 zoomDiv.innerHTML = "Zoom level: " + percent + "%";294 zoomDiv.innerHTML = '<spring:message code="gmapsimageviewer.zoomlevel" />' + percent + '%'; 286 295 }); 287 296