summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/source
diff options
context:
space:
mode:
authorctrlaltca <>2012-05-18 18:00:24 +0000
committerctrlaltca <>2012-05-18 18:00:24 +0000
commit098556f20a2014f8ca211b0820cfa4776052641b (patch)
treec111b60f6a28f9dd966bb26dfa41739bcb564a49 /framework/Web/Javascripts/source
parent4560efdc051a3b3f76e74375fadf40f118b6dbb3 (diff)
fix #401
Diffstat (limited to 'framework/Web/Javascripts/source')
-rw-r--r--framework/Web/Javascripts/source/prado/scriptaculous-adapter.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js
index 23b49f56..740f9607 100644
--- a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js
+++ b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js
@@ -414,6 +414,28 @@ Prado.Element =
},
/**
+ * Appends a javascript block to the document.
+ * @function ?
+ * @param {string} boundary - Boundary containing the javascript code
+ */
+ appendScriptBlock : function(boundary)
+ {
+ var content = Prado.Element.extractContent(this.transport.responseText, boundary);
+ if(content == null)
+ return;
+ var id = 'inline_' + boundary;
+
+ if($(id))
+ document.body.removeChild($(id));
+
+ var el = document.createElement("script");
+ el.type = "text/javascript";
+ el.id = id;
+ el.text = content;
+ document.body.appendChild(el);
+ },
+
+ /**
* Extract content from a text by its boundary id.
* Boundaries have this form:
* <pre>