Index: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.php |
— | — | @@ -14,11 +14,11 @@ |
15 | 15 | // Set to 'combined' or 'raw' if you need to debug this extension's JS |
16 | 16 | $wgArticleAssessmentResourceMode = 'minified'; |
17 | 17 | |
18 | | -// Path to jQuery UI |
19 | | -$wgArticleAssessmentJUIPath = null; // Defaults to "$wgExtensionAssetsPath/ArticleAssessmentPilot/js/jui.combined.min.js" |
| 18 | +// Path to jQuery UI's JS |
| 19 | +$wgArticleAssessmentJUIJSPath = null; // Defaults to "$wgExtensionAssetsPath/ArticleAssessmentPilot/js/jui.combined.min.js" |
20 | 20 | |
21 | | -// Set to false if jQuery UI's CSS is already included through other means |
22 | | -$wgArticleAssessmentNeedJUICSS = true; |
| 21 | +// Path to jQuery UI's CSS |
| 22 | +$wgArticleAssessmentJUICSSPath = null; // Defaults to "$wgExtensionAssetsPath/ArticleAssessmentPilot/css/jquery-ui-1.7.2.css" |
23 | 23 | |
24 | 24 | // Auto-load files |
25 | 25 | $dir = dirname( __FILE__ ) . '/'; |
Index: trunk/extensions/ArticleAssessmentPilot/ArticleAssessmentPilot.hooks.php |
— | — | @@ -50,8 +50,8 @@ |
51 | 51 | } |
52 | 52 | |
53 | 53 | public static function addVariables( &$vars ) { |
54 | | - global $wgArticleAssessmentJUIPath, $wgExtensionAssetsPath; |
55 | | - $vars['wgArticleAssessmentJUIPath'] = $wgArticleAssessmentJUIPath ? $wgArticleAssessmentJUIPath : |
| 54 | + global $wgArticleAssessmentJUIJSPath, $wgExtensionAssetsPath; |
| 55 | + $vars['wgArticleAssessmentJUIPath'] = $wgArticleAssessmentJUIJSPath ? $wgArticleAssessmentJUIJSPath : |
56 | 56 | "$wgExtensionAssetsPath/ArticleAssessmentPilot/js/jui.combined.min.js"; |
57 | 57 | return true; |
58 | 58 | } |
— | — | @@ -101,10 +101,10 @@ |
102 | 102 | ); |
103 | 103 | } |
104 | 104 | |
105 | | - global $wgArticleAssessmentNeedJUICSS; |
106 | | - if ( $wgArticleAssessmentNeedJUICSS ) { |
107 | | - self::$styleFiles[$mode][] = array( 'src' => 'css/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ); |
108 | | - } |
| 105 | + global $wgArticleAssessmentJUICSSPath; |
| 106 | + $out->addExtensionStyle( ( $wgArticleAssessmentJUICSSPath ? $wgArticleAssessmentJUICSSPath : |
| 107 | + "$wgExtensionAssetsPath/ArticleAssessmentPilot/css/jquery-ui-1.7.2.css" ) . '?1.7.2y' |
| 108 | + ); |
109 | 109 | foreach ( self::$styleFiles[$mode] as $style ) { |
110 | 110 | $out->addExtensionStyle( $wgExtensionAssetsPath . |
111 | 111 | "/ArticleAssessmentPilot/{$style['src']}?{$style['version']}" |