Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
08/18/08 18:57:52 (5 months ago)
Author:
TorLye
Message:

gmapsimageviewer: Some cleaning up and removal of commented out code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/gmapsimageviewer/web/module/portlets/imageViewerWindow.jsp

    r5307 r5311  
    3232                        map.addControl(new TextualButtonControl()); //Custom controls, defined further down in the script 
    3333                        map.enableScrollWheelZoom(); 
     34                        map.disableDoubleClickZoom(); 
    3435 
    3536                        //This function returns the URL for the requested image tile 
     
    4142 
    4243                        GEvent.addListener(map, "dblclick", function(overlay, point) { 
     44                                //if(overlay==null) 
    4345                                        createMarker(point); 
    4446                        }); 
     
    7072        } 
    7173 
     74        //Loads all the annotation markers for the image and places them on the map. 
    7275        function loadMarkers() { 
    7376                jQuery.get( 
     
    112115        } 
    113116 
     117        //Creates a new marker and opens an infowindow with a form to fill in the annoation text. 
    114118        function createMarker(point) { 
    115119                var marker = new GMarker(point); 
     
    134138        } 
    135139 
     140        //Saves a new annotation using an AJAX call. 
    136141        function saveMarker() { 
    137142                jQuery.post( 
     
    150155        } 
    151156 
     157        //Opens an infowindow on an existing marker to edit its annotation text 
    152158        function editMarker(listindex) { 
    153159                var marker = markerlist[listindex]; 
     
    172178        } 
    173179 
     180        //Saves the new position of a marker that has been moved. 
    174181        function saveNewMarkerPosition(listindex, lat, lng) { 
    175182                var annotationitem = annoationlist[listindex]; 
     
    196203        } 
    197204 
     205        //Allows a marker to be moved using drag&drop 
    198206        function dragMarker(listindex) { 
    199207                var oldmarker = markerlist[listindex]; 
     
    221229        } 
    222230 
     231        //Deletes an annotation 
    223232        function deleteMarker(listindex) { 
    224233                var annotationitem = annoationlist[listindex]; 
     
    256265        this.setButtonStyle_(showDiv); 
    257266        container.appendChild(showDiv); 
    258         showDiv.appendChild(document.createTextNode("Show annotations")); 
     267        showDiv.appendChild(document.createTextNode('<spring:message code="gmapsimageviewer.showannotations" />')); 
    259268 
    260269        GEvent.addDomListener(showDiv, "click", function() { 
     
    266275        this.setButtonStyle_(hideDiv); 
    267276        container.appendChild(hideDiv); 
    268         hideDiv.appendChild(document.createTextNode("Hide annotations")); 
     277        hideDiv.appendChild(document.createTextNode('<spring:message code="gmapsimageviewer.hideannotations" />')); 
    269278         
    270279        GEvent.addDomListener(hideDiv, "click", function() { 
     
    283292        GEvent.addListener(map, "zoomend", function(oldLevel, newLevel) { 
    284293                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 + '%'
    286295        }); 
    287296