[richfaces-svn-commits] JBoss Rich Faces SVN: r2005 - in trunk/ui/gmap/src/main: templates and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Aug 2 09:16:22 EDT 2007


Author: A.Skokov
Date: 2007-08-02 09:16:21 -0400 (Thu, 02 Aug 2007)
New Revision: 2005

Modified:
   trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js
   trunk/ui/gmap/src/main/templates/gmap.jspx
Log:
http://jira.jboss.com/jira/browse/RF-530

Modified: trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js
===================================================================
--- trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js	2007-08-02 11:52:49 UTC (rev 2004)
+++ trunk/ui/gmap/src/main/resources/org/richfaces/renderkit/html/script/gmap.js	2007-08-02 13:16:21 UTC (rev 2005)
@@ -1,11 +1,11 @@
 
 function __addLoadEvent(func) {
-Event.observe(window, "load", func ); 
+Event.observe(window, "load", func );
 }
+function __addUnLoadEvent(func) {
+Event.observe(window, "unload", func );
+}
 
-
-
-
 function __initGmapdiv(mapVar, clid,warningMessage ) {
 var mapdiv = document.getElementById(clid);
 if (GBrowserIsCompatible()) {
@@ -23,7 +23,7 @@
 
 window[gmapVar].setCenter(new GLatLng(lat, lng), zoom, mapType);
 
-if (enableDragging) 	
+if (enableDragging)
  window[gmapVar].enableDragging();
 else
  window[gmapVar].disableDragging();

Modified: trunk/ui/gmap/src/main/templates/gmap.jspx
===================================================================
--- trunk/ui/gmap/src/main/templates/gmap.jspx	2007-08-02 11:52:49 UTC (rev 2004)
+++ trunk/ui/gmap/src/main/templates/gmap.jspx	2007-08-02 13:16:21 UTC (rev 2005)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<f:root 
-	xmlns:f="http://ajax4jsf.org/cdk/template" 
-	xmlns:c=" http://java.sun.com/jsf/core" 
+<f:root
+	xmlns:f="http://ajax4jsf.org/cdk/template"
+	xmlns:c=" http://java.sun.com/jsf/core"
 	xmlns:ui=" http://ajax4jsf.org/cdk/ui"
 	xmlns:u=" http://ajax4jsf.org/cdk/u"
 	xmlns:x=" http://ajax4jsf.org/cdk/x"
@@ -9,8 +9,8 @@
 	baseclass="org.ajax4jsf.renderkit.HeaderResourcesRendererBase"
 	component="org.richfaces.component.UIGmap">
 	<f:clientid var="clientId"/>
-	
 
+
 	<c:set var="key" value="#{component.attributes['gmapKey']}"/>
 	<c:set var="zoom" value="#{component.attributes['zoom']}"/>
 	<c:set var="map" value="#{component.attributes['gmapVar']}"/>
@@ -33,12 +33,12 @@
 			x:passThruWithExclusions="id, styleClass"
 >
 <script type="text/javascript"  src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=#{key}" />
-<script type="text/javascript"> 
+<script type="text/javascript">
  //<![CDATA[
 
 function __initGMap() { __initGmapdiv("#{map}","#{clientId}", "#{warningMessage}");
  __applyGmapparam("#{map}",#{lat}, #{lng},#{zoom},#{mapType},#{enableDragging},#{enableInfoWindow},#{enableDoubleClickZoom},#{enableContinuousZoom},#{isGMapType},#{isGScale},#{isGLarge});
- var userfunc = new Function('event', '#{oninit}'); userfunc();};__addLoadEvent(__initGMap);
+ var userfunc = new Function('event', '#{oninit}'); userfunc();};__addLoadEvent(__initGMap);__addUnLoadEvent(GUnload); 
 //]]>
 </script>
 </div>




More information about the richfaces-svn-commits mailing list