From 8a7fdfad6e4a841888054d9e8ac9ae23dae04cec Mon Sep 17 00:00:00 2001 From: Musachy Barroso Date: Sat, 17 Mar 2007 01:35:42 +0000 Subject: [PATCH] WW-1607 * Restore javascript files to core that were moved to the dojo plugin but were not related to dojo * Render a tr with cells for the ajaxtags if a "label" is specified * Fix wrong reference to dojo tooltip git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@519204 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/struts2/static/inputtransferselect.js | 0 .../org/apache/struts2/static/optiontransferselect.js | 0 .../resources/org/apache/struts2/static/validationClient.js | 0 .../dojo/src/main/resources/template/ajax/autocompleter.ftl | 5 ++++- .../dojo/src/main/resources/template/ajax/controlheader.ftl | 4 +++- .../src/main/resources/template/ajax/datetimepicker.ftl | 6 +++++- .../dojo/src/main/resources/template/ajax/form-close.ftl | 2 +- plugins/dojo/src/main/resources/template/ajax/head.ftl | 2 +- 8 files changed, 14 insertions(+), 5 deletions(-) rename {plugins/dojo => core}/src/main/resources/org/apache/struts2/static/inputtransferselect.js (100%) rename {plugins/dojo => core}/src/main/resources/org/apache/struts2/static/optiontransferselect.js (100%) rename {plugins/dojo => core}/src/main/resources/org/apache/struts2/static/validationClient.js (100%) diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/inputtransferselect.js b/core/src/main/resources/org/apache/struts2/static/inputtransferselect.js similarity index 100% rename from plugins/dojo/src/main/resources/org/apache/struts2/static/inputtransferselect.js rename to core/src/main/resources/org/apache/struts2/static/inputtransferselect.js diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/optiontransferselect.js b/core/src/main/resources/org/apache/struts2/static/optiontransferselect.js similarity index 100% rename from plugins/dojo/src/main/resources/org/apache/struts2/static/optiontransferselect.js rename to core/src/main/resources/org/apache/struts2/static/optiontransferselect.js diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/validationClient.js b/core/src/main/resources/org/apache/struts2/static/validationClient.js similarity index 100% rename from plugins/dojo/src/main/resources/org/apache/struts2/static/validationClient.js rename to core/src/main/resources/org/apache/struts2/static/validationClient.js diff --git a/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl b/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl index 0622914a4..62a6d16ed 100644 --- a/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl +++ b/plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl @@ -1,3 +1,4 @@ +<#include "/${parameters.templateDir}/ajax/controlheader.ftl" /> <#if parameters.href?exists> dataUrl="${parameters.href}"<#rt/> @@ -122,6 +123,8 @@ - +<#if parameters.label?if_exists != ""> + <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /> + diff --git a/plugins/dojo/src/main/resources/template/ajax/controlheader.ftl b/plugins/dojo/src/main/resources/template/ajax/controlheader.ftl index ee1fcc541..1ac8ce333 100644 --- a/plugins/dojo/src/main/resources/template/ajax/controlheader.ftl +++ b/plugins/dojo/src/main/resources/template/ajax/controlheader.ftl @@ -1,4 +1,6 @@ -<#--include "/${parameters.templateDir}/xhtml/controlheader-core.ftl" /--> +<#if parameters.label?if_exists != ""> + <#include "/${parameters.templateDir}/xhtml/controlheader.ftl" /> + <#if parameters.form?exists && parameters.form.validate?default(false) == true> <#-- can't mutate the data model in freemarker --> <#if parameters.onblur?exists> diff --git a/plugins/dojo/src/main/resources/template/ajax/datetimepicker.ftl b/plugins/dojo/src/main/resources/template/ajax/datetimepicker.ftl index b7b3ed627..cf151588a 100644 --- a/plugins/dojo/src/main/resources/template/ajax/datetimepicker.ftl +++ b/plugins/dojo/src/main/resources/template/ajax/datetimepicker.ftl @@ -1,6 +1,7 @@ + +<#include "/${parameters.templateDir}/ajax/controlheader.ftl" />
dojoType="dropdowndatepicker"<#rt/> @@ -71,3 +72,6 @@ saveFormat="rfc"<#rt/> <#include "/${parameters.templateDir}/simple/scripting-events.ftl" /> >
+<#if parameters.label?if_exists != ""> + <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" /> + diff --git a/plugins/dojo/src/main/resources/template/ajax/form-close.ftl b/plugins/dojo/src/main/resources/template/ajax/form-close.ftl index 5f9bdcf6c..c0fa8756f 100644 --- a/plugins/dojo/src/main/resources/template/ajax/form-close.ftl +++ b/plugins/dojo/src/main/resources/template/ajax/form-close.ftl @@ -83,7 +83,7 @@ dojo.require("dojo.event.connect"); Code that will add javascript needed for tooltips --><#t/> <#lt/> - <#lt/> + <#lt/> diff --git a/plugins/dojo/src/main/resources/template/ajax/head.ftl b/plugins/dojo/src/main/resources/template/ajax/head.ftl index ac7a22955..aa17e231f 100644 --- a/plugins/dojo/src/main/resources/template/ajax/head.ftl +++ b/plugins/dojo/src/main/resources/template/ajax/head.ftl @@ -2,7 +2,7 @@ // Dojo configuration djConfig = { baseRelativePath: "<@s.url includeParams='none' value='/struts/dojo' includeParams="none" encode='false'/>", - isDebug: ${parameters.debug?default(false)}, + isDebug: ${parameters.debug?default(false)?string}, bindEncoding: "${parameters.encoding}", debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes };