mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
WW-1980 Ajax tags (most of them) are not working on IE 6
* IE doesn't like trailing commas in JSON git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@545909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+1
-2
@@ -412,5 +412,4 @@ dojo.widget.defineWidget(
|
||||
}
|
||||
return {"xml":s, "styles":styles, "titles":titles, "requires":requires, "scripts":scripts, "url":url};
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ dojo.widget.defineWidget(
|
||||
}
|
||||
},
|
||||
mimetype: "text/json"
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
+1
-2
@@ -94,6 +94,5 @@ dojo.widget.defineWidget(
|
||||
collapse: function(message) {
|
||||
var node = message.source;
|
||||
this.publishTopics(this.collapsedNotifyTopicsArray, {node: node});
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
@@ -1,84 +1,138 @@
|
||||
<#assign firstField=true >
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
dojo.addOnLoad(function() {
|
||||
dojo.widget.createWidget("struts:BindEvent", {
|
||||
<#if parameters.sources?if_exists != "">
|
||||
"sources": "${parameters.sources?html}",<#rt/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"sources": "${parameters.sources?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.events?if_exists != "">
|
||||
"events": "${parameters.events?html}",<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"events": "${parameters.events?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.id?if_exists != "">
|
||||
"id": "${parameters.id?html}",<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"id": "${parameters.id?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.formId?if_exists != "">
|
||||
"formId": "${parameters.formId?html}",<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"formId": "${parameters.formId?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.formFilter?if_exists != "">
|
||||
"formFilter": "${parameters.formFilter?html}",<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"formFilter": "${parameters.formFilter?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.href?if_exists != "">
|
||||
"href": "${parameters.href}",<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"href": "${parameters.href}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.loadingText?if_exists != "">
|
||||
"loadingText" : "${parameters.loadingText?html}",<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"loadingText" : "${parameters.loadingText?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.errorText?if_exists != "">
|
||||
"errorText" : "${parameters.errorText?html}",<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"errorText" : "${parameters.errorText?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.executeScripts?exists>
|
||||
"executeScripts": ${parameters.executeScripts?string?html},<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"executeScripts": ${parameters.executeScripts?string?html}<#t/>
|
||||
</#if>
|
||||
<#if parameters.listenTopics?if_exists != "">
|
||||
"listenTopics": "${parameters.listenTopics?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"listenTopics": "${parameters.listenTopics?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.notifyTopics?if_exists != "">
|
||||
"notifyTopics": "${parameters.notifyTopics?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"notifyTopics": "${parameters.notifyTopics?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.beforeNotifyTopics?if_exists != "">
|
||||
"beforeNotifyTopics": "${parameters.beforeNotifyTopics?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"beforeNotifyTopics": "${parameters.beforeNotifyTopics?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.afterNotifyTopics?if_exists != "">
|
||||
"afterNotifyTopics": "${parameters.afterNotifyTopics?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"afterNotifyTopics": "${parameters.afterNotifyTopics?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.errorNotifyTopics?if_exists != "">
|
||||
"errorNotifyTopics": "${parameters.errorNotifyTopics?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"errorNotifyTopics": "${parameters.errorNotifyTopics?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.targets?if_exists != "">
|
||||
"targets": "${parameters.targets?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"targets": "${parameters.targets?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.indicator?if_exists != "">
|
||||
"indicator": "${parameters.indicator?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"indicator": "${parameters.indicator?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.showErrorTransportText?exists>
|
||||
"showError": ${parameters.showErrorTransportText?string?html},<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"showError": ${parameters.showErrorTransportText?string?html}<#t/>
|
||||
</#if>
|
||||
<#if parameters.showLoadingText?exists>
|
||||
"showLoading": ${parameters.showLoadingText?string?html},<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"showLoading": ${parameters.showLoadingText?string?html}<#t/>
|
||||
</#if>
|
||||
<#if parameters.handler?if_exists != "">
|
||||
"handler": "${parameters.handler?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"handler": "${parameters.handler?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.highlightColor?if_exists != "">
|
||||
"highlightColor" : "${parameters.highlightColor?html}",<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"highlightColor" : "${parameters.highlightColor?html}"<#t/>
|
||||
</#if>
|
||||
<#if parameters.highlightDuration?if_exists != "">
|
||||
"highlightDuration" : ${parameters.highlightDuration?html},<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"highlightDuration" : ${parameters.highlightDuration?html}<#t/>
|
||||
</#if>
|
||||
<#if parameters.validate?exists>
|
||||
"validate": ${parameters.validate?string?html},<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"validate": ${parameters.validate?string?html}<#t/>
|
||||
<#else>
|
||||
"validate": false,
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"validate": false
|
||||
</#if>
|
||||
<#if parameters.ajaxAfterValidation?exists>
|
||||
"ajaxAfterValidation": ${parameters.ajaxAfterValidation?string?html},<#t/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"ajaxAfterValidation": ${parameters.ajaxAfterValidation?string?html}<#t/>
|
||||
<#else>
|
||||
"ajaxAfterValidation": false,
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"ajaxAfterValidation": false
|
||||
</#if>
|
||||
<#if parameters.separateScripts?exists>
|
||||
"scriptSeparation": ${parameters.separateScripts?string?html},<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"scriptSeparation": ${parameters.separateScripts?string?html}<#t/>
|
||||
</#if>
|
||||
<#if parameters.transport?if_exists != "">
|
||||
"transport": "${parameters.transport?html}"<#rt/>
|
||||
<#if !firstField>,</#if><#t/>
|
||||
<#assign firstField=false ><#t/>
|
||||
"transport": "${parameters.transport?html}"<#t/>
|
||||
</#if>
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
// Dojo configuration
|
||||
djConfig = {
|
||||
isDebug: ${parameters.debug?default(false)?string},
|
||||
bindEncoding: "${parameters.encoding}",
|
||||
bindEncoding: "${parameters.encoding}"
|
||||
<#if parameters.baseRelativePath?if_exists != "">
|
||||
baseRelativePath: "<@s.url value='${parameters.baseRelativePath}' includeParams='none' encode='false' />",
|
||||
baseScriptUri: "<@s.url value='${parameters.baseRelativePath}' includeParams='none' encode='false' />",
|
||||
,baseRelativePath: "<@s.url value='${parameters.baseRelativePath}' includeParams='none' encode='false' />"
|
||||
,baseScriptUri: "<@s.url value='${parameters.baseRelativePath}' includeParams='none' encode='false' />"
|
||||
<#else>
|
||||
baseRelativePath: "${base}/struts/dojo/",
|
||||
baseScriptUri: "${base}/struts/dojo/",
|
||||
,baseRelativePath: "${base}/struts/dojo/"
|
||||
,baseScriptUri: "${base}/struts/dojo/"
|
||||
</#if>
|
||||
<#if parameters.locale?if_exists != "">
|
||||
locale: "${parameters.locale}",
|
||||
,locale: "${parameters.locale}"
|
||||
</#if>
|
||||
<#if parameters.extraLocales?exists>
|
||||
extraLocale: [
|
||||
,extraLocale: [
|
||||
<#list parameters.extraLocales as locale>
|
||||
"${locale}",
|
||||
"${locale}"<#if locale_has_next>,</#if>
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
extraLocale: [
|
||||
"a",
|
||||
"b",
|
||||
"c",
|
||||
"c"
|
||||
]
|
||||
};
|
||||
</script>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
extraLocale: [
|
||||
"a",
|
||||
"b",
|
||||
"c",
|
||||
"c"
|
||||
]
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user