Potential resource loader fixes for cache issues.

This commit is contained in:
Alexia E. Smith 2014-07-23 16:42:05 -05:00
parent 317539693e
commit 3fb66106dd
3 changed files with 5 additions and 17 deletions

View file

@ -35,7 +35,7 @@ class TabberHooks {
* @return string HTML
*/
static public function renderTabber($input, array $args, Parser $parser, PPFrame $frame) {
RequestContext::getMain()->getOutput()->addModules('ext.Tabber');
$parser->getOutput()->addModules('ext.Tabber');
$arr = explode("|-|", $input);
foreach ($arr as $tab) {

View file

@ -36,7 +36,7 @@ $wgAutoloadClasses['TabberHooks'] = "{$extDir}/Tabber.hooks.php";
$wgHooks['ParserFirstCallInit'][] = 'TabberHooks::onParserFirstCallInit';
$wgResourceModules['ext.Social'] = [
$wgResourceModules['ext.Tabber'] = [
'localBasePath' => __DIR__,
'remoteExtPath' => 'Tabber',
'styles' => ['css/tabber.css'],

View file

@ -346,24 +346,12 @@ function tabberAutomatic(tabberArgs) {
} /*==================================================*/
function tabberAutomaticOnLoad(tabberArgs) {
/* This function adds tabberAutomatic to the window.onload event,
so it will run after the document has finished loading.
*/
var oldOnLoad;
if (!tabberArgs) {
tabberArgs = {};
} /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */
oldOnLoad = window.onload;
if (typeof window.onload != 'function') {
window.onload = function() {
tabberAutomatic(tabberArgs);
};
} else {
window.onload = function() {
oldOnLoad();
tabberAutomatic(tabberArgs);
};
}
jQuery(function() {
tabberAutomatic(tabberArgs);
});
} /*==================================================*/
/* Run tabberAutomaticOnload() unless the "manualStartup" option was specified */
if (typeof tabberOptions == 'undefined') {