r101525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101524‎ | r101525 | r101526 >
Date:20:52, 1 November 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
followup r101510: next attempt at fixing timing issues when initializing wikieditor
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SF_wikieditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SF_wikieditor.js
@@ -15,24 +15,18 @@
1616 // }
1717
1818 // initialize the wikieditor on the specified element
19 - function init ( input_id, params ) {
 19+ this.init = function init ( input_id, params ) {
2020
2121 // if ( !isSetUp ) {
2222 // isSetUp = true;
2323 // setup();
2424 // }
2525
26 -// jQuery( document ).ready( function() {
27 - if ( !jQuery.wikiEditor.isSupported( jQuery.wikiEditor.modules.toolbar ) ) {
28 - return;
 26+ jQuery( document ).ready( function() {
 27+ if ( jQuery.wikiEditor.isSupported( jQuery.wikiEditor.modules.toolbar ) ) {
 28+ jQuery( '#' + input_id ).wikiEditor( 'addModule', jQuery.wikiEditor.modules.toolbar.config.getDefaultConfig() );
2929 }
30 - var input = jQuery( '#' + input_id );
31 - input.wikiEditor( 'addModule', jQuery.wikiEditor.modules.toolbar.config.getDefaultConfig() );
32 -// });
 30+ });
3331 }
3432
35 - // export public funcitons
36 -// this.setup = setup;
37 - this.init = init;
38 -
3933 };

Follow-up revisions

RevisionCommit summaryAuthorDate
r101533followup r101525: next attempt at fixing timing issues when initializing wiki...foxtrott21:37, 1 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101510next attempt at fixing timing issues when initializing wikieditorfoxtrott18:42, 1 November 2011