From: Roan Kattouw Date: Thu, 4 Jul 2013 00:54:33 +0000 (-0700) Subject: Fix occasional collapsibleTabs JS error X-Git-Tag: 1.31.0-rc.0~19283 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=e25445634ea4045f9945e892e6e2df389cb6f1c9;p=lhc%2Fweb%2Fwiklou.git Fix occasional collapsibleTabs JS error vector/vector.js depends on $.fn.collapsibleTabs, but that's defined in vector/collapsibleTabs.js which is loaded *after*. The only reason it worked most of the time is because the invocation is wrapped in a document ready callback. Most of the time, the document isn't ready yet when vector.js runs, so the callback is deferred and $.fn.collapsibleTabs is created before the callback runs. But if the document is already ready, the callback runs immediately without $.fn.collapsibleTabs having been created yet, and so it throws an error. Fixed by including the .js files in the proper order. Change-Id: If101efe82970bda7a39d827ce3c668abad6a5f5e --- diff --git a/resources/Resources.php b/resources/Resources.php index d6852c3e30..43116e459c 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -100,8 +100,8 @@ return array( ), 'skins.vector.js' => array( 'scripts' => array( - 'vector/vector.js', 'vector/collapsibleTabs.js', + 'vector/vector.js', ), 'position' => 'top', 'dependencies' => 'jquery.delayedBind',