struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r397545 - /incubator/webwork2/action/src/main/resources/template/ajax/form-close.ftl
Date Thu, 27 Apr 2006 13:56:23 GMT
Author: tmjee
Date: Thu Apr 27 06:56:05 2006
New Revision: 397545

URL: http://svn.apache.org/viewcvs?rev=397545&view=rev
Log:
make auto-select upon form submit for optiontransferselect and
updownselect work in ajax theme


Modified:
    incubator/webwork2/action/src/main/resources/template/ajax/form-close.ftl

Modified: incubator/webwork2/action/src/main/resources/template/ajax/form-close.ftl
URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/main/resources/template/ajax/form-close.ftl?rev=397545&r1=397544&r2=397545&view=diff
==============================================================================
--- incubator/webwork2/action/src/main/resources/template/ajax/form-close.ftl (original)
+++ incubator/webwork2/action/src/main/resources/template/ajax/form-close.ftl Thu Apr 27 06:56:05
2006
@@ -13,11 +13,11 @@
 		dojo.event.connect(containingForm, "onsubmit", 
 			function(evt) {
 				var selectObj = document.getElementById("${selectObjectId}");
-				selectAllOptions(selectObj);
-				selectUnselectMatchingOptions(selectObj, null, "unselect", false, "key");
 				<#if parameters.optiontransferselectIds.get(selectObjectId)?exists>
 					<#assign selectTagHeaderKey = parameters.optiontransferselectIds.get(selectObjectId)/>
-					selectUnselectMatchingOptions(selectObj, "${selectTagHeaderKey}", "unselect", false,
"key");
+					selectAllOptionsExceptSome(selectObj, "key", "${selectTagHeaderKey}");
+				<#else>
+					selectAllOptionsExceptSome(selectObj, "key", "");
 				</#if>
 			});
 	</#list>
@@ -29,11 +29,11 @@
 		dojo.event.connect(containingForm, "onsubmit", 
 			function(evt) {
 				var selectObj = document.getElementById("${selectObjId}");
-				selectAllOptions(selectObj);
-				selectUnselectMatchingOptions(selectObj, null, "unselect", false, "key");
 				<#if parameters.optiontransferselectDoubleIds.get(selectObjId)?exists>
 					<#assign selectTagHeaderKey = parameters.optiontransferselectDoubleIds.get(selectObjId)/>
-					selectUnselectMatchingOptions(selectObj, "${selectTagHeaderKey}", "unselect", false,
"key");
+					selectAllOptionsExceptSome(selectObj, "key", "${selectTagHeaderKey}");
+				<#else>
+					selectAllOptionsExceptSome(selectObj, "key", "");
 				</#if>
 			});
 	</#list>
@@ -45,17 +45,17 @@
 	submission
 -->
 <#if (parameters.updownselectIds?if_exists?size > 0)>
-    var containingForm = document.getElementById("${parameters.id}");
+	var containingForm = document.getElementById("${parameters.id}");
 	<#assign tmpIds = parameters.updownselectIds.keySet() />
 	<#list tmpIds as tmpId>
 		dojo.event.connect(containingForm, "onsubmit", 
 			function(evt) {
-				var selectObj = document.getElementById("${tmpId}");
-				selectAllOptions(selectObj);
-				selectUnselectMatchingOptions(selectObj, null, "unselect", false, "key");
+				var updownselectObj = document.getElementById("${tmpId}");
 				<#if parameters.updownselectIds.get(tmpId)?exists>
 					<#assign tmpHeaderKey = parameters.updownselectIds.get(tmpId) />
-					selectUnselectMatchingOptions(selectObj, "${tmpHeaderKey}", "unselect", false, "key");
+					selectAllOptionsExceptSome(updownselectObj, "key", "${tmpHeaderKey}");
+				<#else>
+					selectAllOptionsExceptSome(updownselectObj, "key", "");
 				</#if>
 			});
 	</#list>
@@ -63,6 +63,11 @@
 </script>
 </#if>
 
+<#-- 
+ Code that will add javascript needed for tooltips
+--><#t/>
+	<#lt/><!-- javascript that is needed for tooltips -->
+	<#lt/><script language="JavaScript" type="text/javascript">dojo.require("dojo.widget.html.Tooltip");dojo.require("dojo.fx.html");</script>
 
 </table>
 </form>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message