summaryrefslogtreecommitdiff
path: root/library/WT/Controller
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2012-08-13 17:11:49 +0000
committerfisharebest <fisharebest@gmail.com>2012-08-13 17:11:49 +0000
commit519bceb8aa50510d528a4d97c1861a7191d260c8 (patch)
tree3e4aa89151553172d4c513c20894cddb19158863 /library/WT/Controller
parent94950e50eac669a04a1be6cf88393a0f8886eff0 (diff)
downloadwebtrees-519bceb8aa50510d528a4d97c1861a7191d260c8.tar.gz
webtrees-519bceb8aa50510d528a4d97c1861a7191d260c8.tar.bz2
webtrees-519bceb8aa50510d528a4d97c1861a7191d260c8.zip
Temporarily disable Modernizr.load() - it breaks some modal dialog boxes, such as block_edit.php
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>';
}