summaryrefslogtreecommitdiff
path: root/library/WT/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'library/WT/Controller')
-rw-r--r--library/WT/Controller/Base.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/WT/Controller/Base.php b/library/WT/Controller/Base.php
index 97d3907c4c..69b7ce2aaa 100644
--- a/library/WT/Controller/Base.php
+++ b/library/WT/Controller/Base.php
@@ -162,6 +162,10 @@ class WT_Controller_Base {
// We've collected up Javascript fragments while rendering the page.
// Now display them.
public function getJavascript() {
+ // Modernizr.load() doesn't seem to work well with AJAX responses.
+ // Temporarily disable this while we investigate
+ $TMP_HTML='';
+
$html='';
// Insert the high priority scripts before external resources
if ($this->inline_javascript[self::JS_PRIORITY_HIGH]) {
@@ -177,6 +181,7 @@ class WT_Controller_Base {
$load_js=array();
foreach (array_keys($this->external_javascript) as $script_name) {
$load_js[]='"'.$script_name.'"';
+ $TMP_HTML.='<script src="'.htmlspecialchars($script_name).'"></script>';
}
$load_js='[' . implode(',', $load_js) . ']';
@@ -198,6 +203,7 @@ class WT_Controller_Base {
);
$this->external_javascript=array();
+ return $TMP_HTML.'<script>'.$complete_js.'</script>';
return $html.'<script>Modernizr.load({load:'.$load_js.',complete:function(){'.$complete_js.'}});</script>';
}