Index: trunk/extensions/UsabilityInitiative/InlineSectionEdit/InlineSectionEdit.js |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | * Simple inline section edit example h3 ->h3 h2 |
4 | 4 | */ |
5 | 5 | mw.ready(function(){ |
6 | | - $j('.editsection').click(function(){ |
| 6 | + $j( '.editsection' ).click(function(){ |
7 | 7 | // Get section number: |
8 | 8 | var href = $j( this ).children('a').attr( 'href'); |
9 | 9 | var sectionNumber = mw.parseUri( href ).queryKey['section']; |
— | — | @@ -100,27 +100,27 @@ |
101 | 101 | function doInlineWikiEditor( wikiText, sectionNumber ){ |
102 | 102 | // Here we have to plop in a hidden wikitext box identical to edit page |
103 | 103 | // We don't want to build out custom config |
104 | | - // ( too much config is sotred in wikiEditor/Toolbar/Toolbar.js ) |
| 104 | + // ( too much config is stored in wikiEditor/Toolbar/Toolbar.js ) |
105 | 105 | $j('#edit_section_' + sectionNumber).append( |
106 | 106 | $j('<textarea>') |
107 | | - .attr({ |
| 107 | + .attr( { |
108 | 108 | 'name' : "wpTextbox1", |
109 | 109 | 'id' : "wpTextbox1", |
110 | 110 | 'cols' : "80", |
111 | 111 | 'rows' : "20", |
112 | 112 | 'tabindex' : "1", |
113 | 113 | 'accesskey' : "," |
114 | | - }) |
| 114 | + } ) |
115 | 115 | .val( wikiText ) |
116 | 116 | .hide() |
117 | 117 | ); |
118 | | - //load the wikitext module: |
119 | | - mw.load('WikiEditor', function(){ |
| 118 | + // Load the wikitext module: |
| 119 | + mw.load( 'WikiEditor' , function(){ |
120 | 120 | //Remove the loader ( callback on mw.load('WikiEditor') is having trouble atm ) |
121 | 121 | $j('.loading_spinner').remove(); |
122 | 122 | // show the editor: |
123 | 123 | $j('#wpTextbox1').show( 'fast' ); |
124 | | - // add the add-media-wizard binding" |
| 124 | + // add the add-media-wizard binding" via editPage js |
125 | 125 | mw.load( 'editPage', function(){ |
126 | 126 | mw.log("editPage loaded"); |
127 | 127 | }); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/loader.js |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | mw.setConfig('loaderContext', wgScriptPath + '/extensions/UsabilityInitiative/WikiEditor/'); |
7 | 7 | |
8 | 8 | mw.addClassFilePaths({ |
9 | | - "wikiEditorHighlight" : "Modules/Highlight/Highlight.js", |
| 9 | + "wikiEditor.config.highlight" : "Modules/Highlight/Highlight.js", |
10 | 10 | "wikiEditor.config.preview" : "Modules/Preview/Preview.js", |
11 | 11 | "wikiEditor.config.publish" : "Modules/Publish/Publish.js", |
12 | 12 | "wikiEditor.config.toc" : "Modules/Toc/Toc.js", |
— | — | @@ -60,6 +60,7 @@ |
61 | 61 | |
62 | 62 | |
63 | 63 | mw.load(libReq, function(){ |
| 64 | + mw.log('wikiEditor done ' ); |
64 | 65 | callback( 'WikiEditor' ); |
65 | 66 | }); |
66 | 67 | |