Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | |
20 | 20 | /* Configuration */ |
21 | 21 | |
| 22 | + |
22 | 23 | // Each module may be configured individually to be globally on/off or user preference based |
23 | 24 | $wgWikiEditorModules = array( |
24 | 25 | 'toolbar' => array( 'global' => false, 'user' => true ), // Order is significant: makes beta prefs appear before labs prefs |
— | — | @@ -26,6 +27,7 @@ |
27 | 28 | 'publish' => array( 'global' => false, 'user' => true ), |
28 | 29 | 'toc' => array( 'global' => false, 'user' => true ), |
29 | 30 | 'templateEditor' => array( 'global' => false, 'user' => true ), |
| 31 | + 'addMediaWizard' => array( 'global' => false, 'user' => false ), |
30 | 32 | ); |
31 | 33 | |
32 | 34 | /* Setup */ |
— | — | @@ -57,6 +59,7 @@ |
58 | 60 | $wgExtensionMessagesFiles['WikiEditorToc'] = dirname( __FILE__ ) . '/Modules/Toc/Toc.i18n.php'; |
59 | 61 | $wgExtensionMessagesFiles['WikiEditorToolbar'] = dirname( __FILE__ ) . '/Modules/Toolbar/Toolbar.i18n.php'; |
60 | 62 | $wgExtensionMessagesFiles['WikiEditorTemplateEditor'] = dirname( __FILE__ ) . '/Modules/TemplateEditor/TemplateEditor.i18n.php'; |
| 63 | +$wgExtensionMessagesFiles['WikiEditorAddMediaWizard'] = dirname( __FILE__ ) . '/Modules/AddMediaWizard/AddMediaWizard.i18n.php'; |
61 | 64 | |
62 | 65 | // Register Hooks |
63 | 66 | $wgHooks['EditPageBeforeEditToolbar'][] = 'WikiEditorHooks::addModules'; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
20 | 20 | array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 83 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 6 ), |
| 22 | + array( 'src' => 'Modules/AddMediaWizard/AddMediaWizard.js', 'version' => 6 ), |
22 | 23 | ), |
23 | 24 | 'combined' => array( |
24 | 25 | array( 'src' => 'WikiEditor.combined.js', 'version' => 87 ), |
— | — | @@ -67,6 +68,19 @@ |
68 | 69 | 'wikieditor-template-editor-dialog-cancel', |
69 | 70 | ), |
70 | 71 | ), |
| 72 | + 'addMediaWizard' => array( |
| 73 | + 'i18n' => 'addMediaWizard', |
| 74 | + 'preferences' => array( |
| 75 | + 'enable' => array( |
| 76 | + 'key' => 'addmediawizard-gadget', |
| 77 | + 'ui' => array( |
| 78 | + 'type' => 'toggle', |
| 79 | + 'label-message' => 'wikieditor-addMediaWizard-preference', |
| 80 | + 'section' => 'editing/labs', |
| 81 | + ), |
| 82 | + ), |
| 83 | + ) |
| 84 | + ), |
71 | 85 | 'preview' => array( |
72 | 86 | 'i18n' => 'WikiEditorPreview', |
73 | 87 | 'preferences' => array( |
— | — | @@ -130,7 +144,7 @@ |
131 | 145 | 'wikieditor-toc-show', |
132 | 146 | 'wikieditor-toc-hide', |
133 | 147 | ), |
134 | | - ), |
| 148 | + ), |
135 | 149 | 'toolbar' => array( |
136 | 150 | 'i18n' => 'WikiEditorToolbar', |
137 | 151 | 'preferences' => array( |
— | — | @@ -443,7 +457,6 @@ |
444 | 458 | if ( $key == 'enable' && !$enable['user'] ) { |
445 | 459 | continue; |
446 | 460 | } |
447 | | - |
448 | 461 | // The preference with the key 'enable' determines if the rest are even relevant, so in the future |
449 | 462 | // setting up some dependencies on that might make sense |
450 | 463 | $defaultPreferences[$preference['key']] = $preference['ui']; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/AddMediaWizard/AddMediaWizard.js |
— | — | @@ -0,0 +1,10 @@ |
| 2 | + |
| 3 | +/* JavaScript for AddMediaWizard gadget */ |
| 4 | + |
| 5 | +if( typeof mwAddMediaConfig == 'undefined'){ |
| 6 | + mwAddMediaConfig = {}; |
| 7 | +} |
| 8 | +mwAddMediaConfig['enabled_providers'] = [ 'wiki_commons', 'upload' ]; |
| 9 | + |
| 10 | +// Transclude mwEmbed.js |
| 11 | +importScriptURI('http://prototype.wikimedia.org/s-2/js/mwEmbed/remotes/mediaWiki.js?&uselang=' + wgUserLanguage ); |
Property changes on: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/AddMediaWizard/AddMediaWizard.js |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 12 | + native |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/AddMediaWizard/AddMediaWizard.i18n.php |
— | — | @@ -0,0 +1,16 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation for the AddMediaWizard gadget |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +/** English |
| 13 | + * @author Michael Dale |
| 14 | + */ |
| 15 | +$messages['en'] = array( |
| 16 | + 'wikieditor-addMediaWizard-preference' => 'Enable Add Media Wizard Gadget', |
| 17 | +); |
\ No newline at end of file |
Property changes on: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/AddMediaWizard/AddMediaWizard.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 18 | + native |
Index: trunk/extensions/UsabilityInitiative/Makefile |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | js/plugins/jquery.wikiEditor.highlight.js\ |
35 | 35 | js/plugins/jquery.wikiEditor.preview.js\ |
36 | 36 | js/plugins/jquery.wikiEditor.publish.js\ |
37 | | - js/plugins/jquery.wikiEditor.templateEditor.js\ |
| 37 | + js/plugins/jquery.wikiEditor.templateEditor.js\ |
38 | 38 | js/plugins/jquery.wikiEditor.toc.js\ |
39 | 39 | js/plugins/jquery.wikiEditor.toolbar.js |
40 | 40 | |
— | — | @@ -44,6 +44,7 @@ |
45 | 45 | WikiEditor/Modules/Toc/Toc.js\ |
46 | 46 | WikiEditor/Modules/Toolbar/Toolbar.js\ |
47 | 47 | WikiEditor/Modules/TemplateEditor/TemplateEditor.js |
| 48 | + WikiEditor/Modules/AddMediaWizard/AddMediaWizard.js |
48 | 49 | |
49 | 50 | VECTOR_MODULES := \ |
50 | 51 | Vector/Modules/CollapsibleNav/CollapsibleNav.js\ |