Commit 4e2a0e2f authored by Brion Vibber's avatar Brion Vibber

Use non-minified jQuery when $config['site']['minify'] is off; aids in...

Use non-minified jQuery when $config['site']['minify'] is off; aids in debugging when something fails deep in jQuery-land.
parent 717fed78
......@@ -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)) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment