Index: trunk/extensions/LiquidThreads/LiquidThreads.php |
— | — | @@ -258,3 +258,10 @@ |
259 | 259 | |
260 | 260 | /** Allow LiquidThreads embedding */ |
261 | 261 | $wgLiquidThreadsAllowEmbedding = true; |
| 262 | + |
| 263 | +/** Location for LiquidThreads avatars. |
| 264 | + * Defaults to $wgImageDirectory/avatars */ |
| 265 | +$wgLiquidThreadsAvatarDirectory = null; |
| 266 | + |
| 267 | +/** Web accessible path for above location */ |
| 268 | +$wgLiquidThreadsAvatarPath = null; |
Index: trunk/extensions/LiquidThreads/lqt.js |
— | — | @@ -187,11 +187,21 @@ |
188 | 188 | $j(container).find('#wpDiff').hide(); |
189 | 189 | |
190 | 190 | if ( $j.fn.wikiEditor && $j.wikiEditor.isSupported( $j.wikiEditor.modules.toolbar ) ) { |
191 | | - if ( wgWikiEditorPreferences.toolbar.dialogs && $j.wikiEditor.isSupported( $j.wikiEditor.modules.dialogs ) ) { |
| 191 | + var useDialogs; |
| 192 | + |
| 193 | + if ( typeof wgWikiEditorPreferences != 'undefined' ) { |
| 194 | + useDialogs = wgWikiEditorPreferences.toolbar.dialogs; |
| 195 | + } else { |
| 196 | + useDialogs = mediaWiki.user.options['usebetatoolbar-cgd']; |
| 197 | + } |
| 198 | + |
| 199 | + if ( useDialogs && $j.wikiEditor.isSupported( $j.wikiEditor.modules.dialogs ) ) { |
192 | 200 | $j( '#wpTextbox1' ).addClass( 'toolbar-dialogs' ); |
193 | 201 | } |
| 202 | + |
194 | 203 | // Add wikiEditor toolbar |
195 | 204 | $j( '#wpTextbox1' ).wikiEditor( 'addModule', { 'toolbar': liquidThreads.toolbar.config, 'dialogs': liquidThreads.toolbar.dialogs } ); |
| 205 | + |
196 | 206 | // cleanup unnecessary things from the old toolbar |
197 | 207 | $j( '#editpage-specialchars' ).remove(); |
198 | 208 | $j( '#wpTextbox1' ).focus() |
— | — | @@ -213,7 +223,17 @@ |
214 | 224 | if ( isIE7 ) { |
215 | 225 | $j(container).empty().show(); |
216 | 226 | } |
217 | | - liquidThreads.loadInlineEditForm( params, container, finishSetup ); |
| 227 | + liquidThreads.loadInlineEditForm( params, container, |
| 228 | + function() { |
| 229 | + if ( typeof mediaWiki.loader != 'undefined' && mediaWiki.loader ) { |
| 230 | + mediaWiki.loader.using( |
| 231 | + [ 'ext.wikiEditor', 'jquery.wikiEditor.toolbar', |
| 232 | + 'jquery.async', 'jquery.cookie' ], |
| 233 | + finishSetup ); |
| 234 | + } else { |
| 235 | + finishSetup(); |
| 236 | + } |
| 237 | + } ); |
218 | 238 | } ); |
219 | 239 | |
220 | 240 | }, |