From 4e2a0e2fd0e3717541ed76e59631a0f4814eb311 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 11 Mar 2011 14:48:47 -0800 Subject: [PATCH] Use non-minified jQuery when $config['site']['minify'] is off; aids in debugging when something fails deep in jQuery-land. --- lib/action.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/action.php b/lib/action.php index b1f16f5f16..233ac78567 100644 --- a/lib/action.php +++ b/lib/action.php @@ -293,11 +293,19 @@ class Action extends HTMLOutputter // lawsuit { if (Event::handle('StartShowScripts', array($this))) { if (Event::handle('StartShowJQueryScripts', array($this))) { - $this->script('jquery.min.js'); - $this->script('jquery.form.min.js'); - $this->script('jquery.cookie.min.js'); - $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.min.js').'"); }'); - $this->script('jquery.joverlay.min.js'); + if (common_config('site', 'minify')) { + $this->script('jquery.min.js'); + $this->script('jquery.form.min.js'); + $this->script('jquery.cookie.min.js'); + $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.min.js').'"); }'); + $this->script('jquery.joverlay.min.js'); + } else { + $this->script('jquery.js'); + $this->script('jquery.form.js'); + $this->script('jquery.cookie.js'); + $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js').'"); }'); + $this->script('jquery.joverlay.js'); + } Event::handle('EndShowJQueryScripts', array($this)); } if (Event::handle('StartShowStatusNetScripts', array($this)) &&