Repository: struts Updated Branches: refs/heads/develop 96156dfa1 -> 90eb79ad8
Converts debug=browser to jQuery based Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/33985e26 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/33985e26 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/33985e26 Branch: refs/heads/develop Commit: 33985e26ea8c9c3f4d5ece7adc3c9e8223932fe5 Parents: 96156df Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Sun Apr 13 18:38:23 2014 +0200 Committer: Lukasz Lenart <lukaszlen...@apache.org> Committed: Sun Apr 13 18:38:23 2014 +0200 ---------------------------------------------------------------------- .../struts2/interceptor/debugging/browser.ftl | 21 +++----------------- 1 file changed, 3 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/33985e26/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl ---------------------------------------------------------------------- diff --git a/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl b/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl index dae6440..87175ce 100644 --- a/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl +++ b/core/src/main/resources/org/apache/struts2/interceptor/debugging/browser.ftl @@ -20,6 +20,7 @@ * under the License. */ --> +<!DOCTYPE html> <html> <style> .debugTable { @@ -52,22 +53,9 @@ background-color: #EEEEEE; } </style> - <script language="JavaScript" type="text/javascript"> - // Dojo configuration - djConfig = { - isDebug: false, - bindEncoding: "UTF-8" - ,baseRelativePath: "${base}/struts/dojo/" - ,baseScriptUri: "${base}/struts/dojo/" - }; - </script> - - - <script language="JavaScript" type="text/javascript" src="${base}/struts/dojo/dojo.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script> - dojo.require("dojo.io.*"); - function expand(src, path) { var baseUrl = location.href; var i = baseUrl.indexOf("&object="); @@ -75,9 +63,7 @@ if (baseUrl.indexOf("decorate") < 0) { baseUrl += "&decorate=false"; } - dojo.io.bind({ - url: baseUrl, - load : function(type, data, evt) { + jQuery.get(baseUrl, function(data) { var div = document.createElement("div"); div.innerHTML = data; src.parentNode.appendChild(div); @@ -89,7 +75,6 @@ src.parentNode.removeChild(div); src.onclick = oldonclick; }; - } }); } </script>