Skip to content

Commit

Permalink
Converts debug=browser to jQuery based
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Apr 13, 2014
1 parent 96156df commit 33985e2
Showing 1 changed file with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* under the License.
*/
-->
<!DOCTYPE html>
<html>
<style>
.debugTable {
Expand Down Expand Up @@ -52,32 +53,17 @@
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=");
baseUrl = (i > 0 ? baseUrl.substring(0, i) : baseUrl) + "&object=" + path;
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);
Expand All @@ -89,7 +75,6 @@
src.parentNode.removeChild(div);
src.onclick = oldonclick;
};
}
});
}
</script>
Expand Down

0 comments on commit 33985e2

Please sign in to comment.