Index: trunk/extensions/JS2Support/README |
— | — | @@ -1,14 +1,18 @@ |
2 | 2 | = JS2 Support Extension = |
3 | 3 | |
4 | | -The JS2 Support extension hosts the mwEmbed library. js2-work branch has been depreciated. |
| 4 | +The JS2 Support svn:externals hosts the mwEmbed library. svn does not support |
| 5 | +svn:externals on files so mwEmbed.js and jsScriptLoader.php are symbolically linked in the |
| 6 | +working directory and updates are manually committed to the JS2extension. |
5 | 7 | |
| 8 | +the js2-work branch has been depreciated. |
| 9 | + |
6 | 10 | The stand-alone mwEmbed support contains all the the stand alone mwEmbed modules |
7 | 11 | and these core mwEmbed libraries. You can learn more about mwEmbed stand alone in |
8 | 12 | /branches/mwEmbedStandAlone/README |
9 | 13 | |
10 | 14 | This extension solely supports other extensions, and hence would be a good candidate for |
11 | 15 | inclusion into core. Its built as an extension to enable development to move forward while |
12 | | -the core integration is sorted out. |
| 16 | +the core integration is sorted out. |
13 | 17 | |
14 | 18 | |
15 | 19 | == Developing with JS2 == |
Index: trunk/extensions/JS2Support/mwEmbed/modules/README |
— | — | @@ -0,0 +1 @@ |
| 2 | +Modules placed here will be enabled for all mwEmbed instances. ( presently all javascript modules used in mediawiki are hosted in extensions ) |
Index: trunk/extensions/JS2Support/mwEmbed/mwEmbed.js |
— | — | @@ -0,0 +1 @@ |
| 2 | +link /var/www/mwEmbedStandAlone/mwEmbed.js |
\ No newline at end of file |
Property changes on: trunk/extensions/JS2Support/mwEmbed/mwEmbed.js |
___________________________________________________________________ |
Added: svn:special |
1 | 3 | + * |
Index: trunk/extensions/JS2Support/mwEmbed/README |
— | — | @@ -0,0 +1,7 @@ |
| 2 | +This is the mediaWiki version of the mwEmbed library. |
| 3 | + |
| 4 | +The core components are svn:externals from the stand alone mwEmbed library. |
| 5 | + |
| 6 | +The loader.js does not include any default modules since in mediaWiki javascript modules live in extensions. |
| 7 | + |
| 8 | +If an extension module becomes widely reused we could potentially move it into the /modules folder in mwEmbed. |
Index: trunk/extensions/JS2Support/mwEmbed/jsScriptLoader.php |
— | — | @@ -0,0 +1 @@ |
| 2 | +link /var/www/mwEmbedStandAlone/jsScriptLoader.php |
\ No newline at end of file |
Property changes on: trunk/extensions/JS2Support/mwEmbed/jsScriptLoader.php |
___________________________________________________________________ |
Added: svn:special |
1 | 3 | + * |
Index: trunk/extensions/JS2Support/mwEmbed/loader.js |
— | — | @@ -0,0 +1,182 @@ |
| 2 | +/** |
| 3 | +* |
| 4 | +* Core "loader.js" for mwEmbed |
| 5 | +* |
| 6 | +* This loader along with all the enabled module loaders is combined with mwEmbed.js |
| 7 | +* via the script-loader. |
| 8 | +* |
| 9 | +*/ |
| 10 | + |
| 11 | +/** |
| 12 | +* Core js components |
| 13 | +* |
| 14 | +* These components are pieces of the core mwEmbed lib |
| 15 | +* They are in separate files to keep the code easier to maintain. |
| 16 | +* |
| 17 | +* All mwEmbed core classes are loaded on every mwEmbed request |
| 18 | +* |
| 19 | +* NOTE: All user / application module code should go into /modules |
| 20 | +* and enabled in mwEnabledModuleList below. |
| 21 | +*/ |
| 22 | +var mwCoreComponentList = [ |
| 23 | + 'mw.Language' |
| 24 | +]; |
| 25 | + |
| 26 | + |
| 27 | +/** |
| 28 | +* The default set of enabled modules |
| 29 | +* ( Modules can also be enabled via mediaWiki extensions ) |
| 30 | +* |
| 31 | +* Each enabledModules array value should be a name |
| 32 | +* of a folder in mwEmbed/modules |
| 33 | +* |
| 34 | +* Modules must define a loader.js file in the root |
| 35 | +* of the module folder. |
| 36 | +* |
| 37 | +* A loader file should only include: |
| 38 | +* * Class paths of the module classes |
| 39 | +* * Style sheets of the module |
| 40 | +* * Loader function(s) that load module classes |
| 41 | +* * Any code you want run on all pages like checking the DOM |
| 42 | +* for a tag that invokes your loader. |
| 43 | +* |
| 44 | +* When using the scriptLoader the enabledModules loader code |
| 45 | +* is transcluded into base mwEmbed class include. |
| 46 | +*/ |
| 47 | +var mwEnabledModuleList = [ |
| 48 | +]; |
| 49 | + |
| 50 | +/** |
| 51 | +* mwEmbed default config values. |
| 52 | +*/ |
| 53 | +mw.setDefaultConfig ( { |
| 54 | + // Default coreComponents: |
| 55 | + 'coreComponents' : mwCoreComponentList, |
| 56 | + |
| 57 | + // Default enabled modules: |
| 58 | + 'enabledModules' : mwEnabledModuleList, |
| 59 | + |
| 60 | + // Default jquery ui skin name |
| 61 | + 'jQueryUISkin' : 'jqueryUiRedmond', |
| 62 | + |
| 63 | + /** |
| 64 | + * If jQuery / mwEmbed should be loaded. |
| 65 | + * |
| 66 | + * This flag is automatically set to true if: |
| 67 | + * Any script calls mw.ready ( callback_function ) |
| 68 | + * Page DOM includes any tags set in config.rewritePlayerTags at onDomReady |
| 69 | + * ( embedPlayer module ) |
| 70 | + * |
| 71 | + * This flag increases page performance on pages that do not use mwEmbed |
| 72 | + * and don't already load jQuery |
| 73 | + * |
| 74 | + * For example when including the mwEmbed.js in your blog template |
| 75 | + * mwEmbed will only load extra js on blog posts that include the video tag. |
| 76 | + * |
| 77 | + * NOTE: Future architecture will probably do away with this flag and refactor it into |
| 78 | + * a smaller 'remotePageMwEmbed.js' script similar to ../remoteMwEmbed.js |
| 79 | + */ |
| 80 | + 'runSetupMwEmbed' : false, |
| 81 | + |
| 82 | + // The mediaWiki path of mwEmbed |
| 83 | + 'mediaWikiEmbedPath' : 'js/mwEmbed/', |
| 84 | + |
| 85 | + // Api actions that must be submitted in a POST, and need an api proxy for cross domain calls |
| 86 | + 'apiPostActions': [ 'login', 'purge', 'rollback', 'delete', 'undelete', |
| 87 | + 'protect', 'block', 'unblock', 'move', 'edit', 'upload', 'emailuser', |
| 88 | + 'import', 'userrights' ], |
| 89 | + |
| 90 | + //If we are in debug mode ( results in fresh debug javascript includes ) |
| 91 | + 'debug' : false, |
| 92 | + |
| 93 | + // Default request timeout ( for cases where we include js and normal browser timeout can't be used ) |
| 94 | + // stored in seconds |
| 95 | + 'defaultRequestTimeout' : 30, |
| 96 | + |
| 97 | + // Default user language is "en" Can be overwritten by: |
| 98 | + // "uselang" url param |
| 99 | + // wgUserLang global |
| 100 | + 'userLanguage' : 'en', |
| 101 | + |
| 102 | + // Set the default providers ( you can add more provider via {provider_id}_apiurl = apiUrl |
| 103 | + 'commons_apiurl' : 'http://commons.wikimedia.org/w/api.php' |
| 104 | +} ); |
| 105 | + |
| 106 | +/** |
| 107 | +* -- Load Class Paths -- |
| 108 | +* |
| 109 | +* PHP AutoLoader reads this loader.js file along with |
| 110 | +* all the "loader.js" files to determine script-loader |
| 111 | +* class paths |
| 112 | +* |
| 113 | +*/ |
| 114 | + |
| 115 | +// Set the loaderContext for the classFiles paths call: |
| 116 | +mw.setConfig( 'loaderContext', '' ); |
| 117 | + |
| 118 | +/** |
| 119 | + * Core set of mwEmbed classes: |
| 120 | + */ |
| 121 | +mw.addClassFilePaths( { |
| 122 | + "mwEmbed" : "mwEmbed.js", |
| 123 | + "window.jQuery" : "jquery/jquery-1.4.2.js", |
| 124 | + |
| 125 | + "mw.Language" : "languages/mw.Language.js", |
| 126 | + "$j.replaceText.js" : "jquery/plugins/jquery.replaceText.js", |
| 127 | + |
| 128 | + "$j.fn.menu" : "jquery/plugins/jquery.menu/jquery.menu.js", |
| 129 | + "mw.style.jquerymenu" : "jquery/plugins/jquery.menu/jquery.menu.css", |
| 130 | + |
| 131 | + "$j.fn.pngFix" : "jquery/plugins/jquery.pngFix.js", |
| 132 | + "$j.fn.autocomplete" : "jquery/plugins/jquery.autocomplete.js", |
| 133 | + "mw.style.autocomplete" : "jquery/plugins/jquery.autocomplete.css", |
| 134 | + |
| 135 | + "$j.fn.hoverIntent" : "jquery/plugins/jquery.hoverIntent.js", |
| 136 | + "$j.fn.datePicker" : "jquery/plugins/jquery.datePicker.js", |
| 137 | + "$j.ui" : "jquery/jquery.ui/ui/ui.core.js", |
| 138 | + |
| 139 | + "mw.style.jqueryUiRedmond" : "jquery/jquery.ui/themes/redmond/jquery-ui-1.7.1.custom.css", |
| 140 | + "mw.style.jqueryUiSmoothness" : "jquery/jquery.ui/themes/smoothness/jquery-ui-1.7.1.custom.css", |
| 141 | + "mw.style.mwCommon" : "skins/common/common.css", |
| 142 | + |
| 143 | + "mw.testLang" : "tests/testLang.js", |
| 144 | + |
| 145 | + "$j.cookie" : "jquery/plugins/jquery.cookie.js", |
| 146 | + "$j.contextMenu" : "jquery/plugins/jquery.contextMenu.js", |
| 147 | + "$j.fn.suggestions" : "jquery/plugins/jquery.suggestions.js", |
| 148 | + "$j.fn.textSelection" : "jquery/plugins/jquery.textSelection.js", |
| 149 | + "$j.browserTest" : "jquery/plugins/jquery.browserTest.js", |
| 150 | + "$j.fn.jWizard" : "jquery/plugins/jquery.jWizard.js", |
| 151 | + |
| 152 | + "$j.effects.blind" : "jquery/jquery.ui/ui/effects.blind.js", |
| 153 | + "$j.effects.drop" : "jquery/jquery.ui/ui/effects.drop.js", |
| 154 | + "$j.effects.pulsate" : "jquery/jquery.ui/ui/effects.pulsate.js", |
| 155 | + "$j.effects.transfer" : "jquery/jquery.ui/ui/effects.transfer.js", |
| 156 | + "$j.ui.droppable" : "jquery/jquery.ui/ui/ui.droppable.js", |
| 157 | + "$j.ui.slider" : "jquery/jquery.ui/ui/ui.slider.js", |
| 158 | + "$j.effects.bounce" : "jquery/jquery.ui/ui/effects.bounce.js", |
| 159 | + "$j.effects.explode" : "jquery/jquery.ui/ui/effects.explode.js", |
| 160 | + "$j.effects.scale" : "jquery/jquery.ui/ui/effects.scale.js", |
| 161 | + "$j.ui.datepicker" : "jquery/jquery.ui/ui/ui.datepicker.js", |
| 162 | + "$j.ui.progressbar" : "jquery/jquery.ui/ui/ui.progressbar.js", |
| 163 | + "$j.ui.sortable" : "jquery/jquery.ui/ui/ui.sortable.js", |
| 164 | + "$j.effects.clip" : "jquery/jquery.ui/ui/effects.clip.js", |
| 165 | + "$j.effects.fold" : "jquery/jquery.ui/ui/effects.fold.js", |
| 166 | + "$j.effects.shake" : "jquery/jquery.ui/ui/effects.shake.js", |
| 167 | + "$j.ui.dialog" : "jquery/jquery.ui/ui/ui.dialog.js", |
| 168 | + "$j.ui.resizable" : "jquery/jquery.ui/ui/ui.resizable.js", |
| 169 | + "$j.ui.tabs" : "jquery/jquery.ui/ui/ui.tabs.js", |
| 170 | + "$j.effects.core" : "jquery/jquery.ui/ui/effects.core.js", |
| 171 | + "$j.effects.highlight" : "jquery/jquery.ui/ui/effects.highlight.js", |
| 172 | + "$j.effects.slide" : "jquery/jquery.ui/ui/effects.slide.js", |
| 173 | + "$j.ui.accordion" : "jquery/jquery.ui/ui/ui.accordion.js", |
| 174 | + "$j.ui.draggable" : "jquery/jquery.ui/ui/ui.draggable.js", |
| 175 | + "$j.ui.selectable" : "jquery/jquery.ui/ui/ui.selectable.js" |
| 176 | + |
| 177 | +} ); |
| 178 | + |
| 179 | +// For now just the special case of $j.ui |
| 180 | +mw.addClassStyleDependency( { |
| 181 | + '$j.ui' : ( 'mw.style.' + mw.getConfig( 'jQueryUISkin' ) ) |
| 182 | +} ); |
| 183 | + |
Property changes on: trunk/extensions/JS2Support/mwEmbed |
___________________________________________________________________ |
Modified: svn:externals |
1 | 184 | - skins http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/skins |
languages http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/languages |
jquery http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/jquery |
includes http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/includes |
mwEmbed.js http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/mwEmbed.js |
jsScriptLoader.php http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/jsScriptLoader.php |
2 | 185 | + skins http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/skins |
languages http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/languages |
jquery http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/jquery |
includes http://svn.wikimedia.org/svnroot/mediawiki/branches/MwEmbedStandAlone/includes |