Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.i18n.php |
— | — | @@ -14,4 +14,4 @@ |
15 | 15 | $messages['en'] = array( |
16 | 16 | 'usabilityinitiative' => 'Usability Initiative', |
17 | 17 | 'usabilityinitiative-desc' => 'Features developed by the Wikipedia Usability Initiative to enhance the usability of MediaWiki', |
18 | | -); |
\ No newline at end of file |
| 18 | +); |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.php |
— | — | @@ -12,8 +12,9 @@ |
13 | 13 | * require_once( "$IP/extensions/UsabilityInitiative/UsabilityInitiative.php" ); |
14 | 14 | * |
15 | 15 | * @author Trevor Parscal <tparscal@wikimedia.org> |
| 16 | + * Allow "or a later version" here? |
16 | 17 | * @license GPL v2 |
17 | | - * @version 0.1.0 |
| 18 | + * @version 0.1.1 |
18 | 19 | */ |
19 | 20 | /* Configuration */ |
20 | 21 | |
— | — | @@ -22,6 +23,7 @@ |
23 | 24 | 'path' => __FILE__, |
24 | 25 | 'name' => 'UsabilityInitiative', |
25 | 26 | 'author' => 'Trevor Parscal', |
| 27 | + 'version' => '0.1.1', |
26 | 28 | 'url' => 'http://www.mediawiki.org/wiki/Extension:UsabilityInitiative', |
27 | 29 | 'descriptionmsg' => 'usabilityinitiative-desc', |
28 | 30 | ); |
— | — | @@ -30,15 +32,12 @@ |
31 | 33 | $dir = dirname( __FILE__ ); |
32 | 34 | |
33 | 35 | // Autoload Classes |
34 | | -$wgAutoloadClasses['UsabilityInitiativeHooks'] = |
35 | | - "$dir/UsabilityInitiative.hooks.php"; |
| 36 | +$wgAutoloadClasses['UsabilityInitiativeHooks'] = "$dir/UsabilityInitiative.hooks.php"; |
| 37 | +$wgExtensionMessagesFiles['UsabilityInitiative'] = "$dir/UsabilityInitiative.i18n.php"; |
36 | 38 | |
37 | | -$wgExtensionMessagesFiles['UsabilityInitiative'] = |
38 | | - "$dir/UsabilityInitiative.i18n.php"; |
39 | | - |
40 | 39 | // Register ajax add script hook |
41 | 40 | $wgHooks['AjaxAddScript'][] = 'UsabilityInitiativeHooks::addJS'; |
42 | 41 | |
43 | 42 | /* Components */ |
44 | 43 | |
45 | | -require_once( "$dir/Toolbar/Toolbar.php" ); |
\ No newline at end of file |
| 44 | +require_once( "$dir/Toolbar/Toolbar.php" ); |
Index: trunk/extensions/UsabilityInitiative/Toolbar/Toolbar.i18n.php |
— | — | @@ -14,5 +14,5 @@ |
15 | 15 | $messages['en'] = array( |
16 | 16 | 'toolbar' => 'Toolbar', |
17 | 17 | 'toolbar-desc' => 'Edit page toolbar with enhanced usability', |
18 | | - 'toolbar-preference' => 'Enable beta version of new editing toolbar', |
19 | | -); |
\ No newline at end of file |
| 18 | + 'toolbar-preference' => 'Enable enhanced editing toolbar', |
| 19 | +); |
Index: trunk/extensions/UsabilityInitiative/Toolbar/Toolbar.php |
— | — | @@ -11,8 +11,9 @@ |
12 | 12 | * Usage: This file is included automatically by ../UsabilityInitiative.php |
13 | 13 | * |
14 | 14 | * @author Trevor Parscal <tparscal@wikimedia.org> |
| 15 | + * Allow "or a later version" here? |
15 | 16 | * @license GPL v2 |
16 | | - * @version 0.1.0 |
| 17 | + * @version 0.1.1 |
17 | 18 | */ |
18 | 19 | |
19 | 20 | // Shortcut to this extension directory |
— | — | @@ -25,6 +26,7 @@ |
26 | 27 | 'path' => __FILE__, |
27 | 28 | 'name' => 'Toolbar', |
28 | 29 | 'author' => 'Trevor Parscal', |
| 30 | + 'version' => '0.1.1', |
29 | 31 | 'url' => 'http://www.mediawiki.org/wiki/Extension:UsabilityInitiative', |
30 | 32 | 'descriptionmsg' => 'toolbar-desc', |
31 | 33 | ); |
Index: trunk/extensions/UsabilityInitiative/Toolbar/Toolbar.hooks.php |
— | — | @@ -14,26 +14,21 @@ |
15 | 15 | * EditPageBeforeEditToolbar hook |
16 | 16 | * Intercept the display of the toolbar, replacing the content of $toolbar |
17 | 17 | */ |
18 | | - public static function interceptToolbar( |
19 | | - &$toolbar |
20 | | - ) { |
| 18 | + public static function interceptToolbar( &$toolbar ) { |
21 | 19 | global $wgUser; |
22 | | - |
23 | | - if ( $wgUser->getOption('usebetatoolbar') ) { |
| 20 | + |
| 21 | + if ( $wgUser->getOption( 'usebetatoolbar' ) ) { |
24 | 22 | $toolbar = '<div id="editing-toolbar"></div>'; |
25 | 23 | } |
26 | 24 | // Continue |
27 | 25 | return true; |
28 | 26 | } |
29 | | - |
| 27 | + |
30 | 28 | /** |
31 | 29 | * GetPreferences hook |
32 | 30 | * Add toolbar related items to the preferences |
33 | 31 | */ |
34 | | - public static function addPreferences( |
35 | | - $user, |
36 | | - $defaultPreferences |
37 | | - ) { |
| 32 | + public static function addPreferences( $user, $defaultPreferences ) { |
38 | 33 | wfLoadExtensionMessages( 'Toolbar' ); |
39 | 34 | $defaultPreferences['usebetatoolbar'] = |
40 | 35 | array( |
— | — | @@ -43,15 +38,12 @@ |
44 | 39 | ); |
45 | 40 | return true; |
46 | 41 | } |
47 | | - |
48 | | - |
| 42 | + |
49 | 43 | /** |
50 | 44 | * AjaxAddScript hook |
51 | 45 | * Add ajax support script |
52 | 46 | */ |
53 | | - public static function addJS( |
54 | | - $out |
55 | | - ) { |
| 47 | + public static function addJS( $out ) { |
56 | 48 | global $wgScriptPath, $wgJsMimeType, $wgToolbarStyleVersion; |
57 | 49 | // Add javascript version variable |
58 | 50 | $out->addInlineScript( |
— | — | @@ -79,9 +71,7 @@ |
80 | 72 | * BeforePageDisplay hook |
81 | 73 | * Add css style sheet |
82 | 74 | */ |
83 | | - public static function addCSS( |
84 | | - $out |
85 | | - ) { |
| 75 | + public static function addCSS( $out ) { |
86 | 76 | global $wgScriptPath, $wgToolbarStyleVersion; |
87 | 77 | // Add css for various styles |
88 | 78 | $out->addLink( |
— | — | @@ -96,5 +86,4 @@ |
97 | 87 | // Continue |
98 | 88 | return true; |
99 | 89 | } |
100 | | - |
101 | 90 | } |
Index: trunk/extensions/UsabilityInitiative/Toolbar/Toolbar.js |
— | — | @@ -33,4 +33,4 @@ |
34 | 34 | toolDiv.css( 'background-image', 'url(' + imageUrl + tools[group][tool]['icon'] + ')' ); |
35 | 35 | } |
36 | 36 | } |
37 | | -}); |
\ No newline at end of file |
| 37 | +}); |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -14,9 +14,7 @@ |
15 | 15 | * AjaxAddScript hook |
16 | 16 | * Add ajax support script |
17 | 17 | */ |
18 | | - public static function addJS( |
19 | | - $out |
20 | | - ) { |
| 18 | + public static function addJS( $out ) { |
21 | 19 | global $wgScriptPath, $wgJsMimeType; |
22 | 20 | // Add javascript resources to document |
23 | 21 | $out->addScript( |
— | — | @@ -34,4 +32,4 @@ |
35 | 33 | // Continue |
36 | 34 | return true; |
37 | 35 | } |
38 | | -} |
\ No newline at end of file |
| 36 | +} |