r61226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61225‎ | r61226 | r61227 >
Date:00:26, 19 January 2010
Author:dale
Status:ok
Tags:
Comment:
fixed wikiEditor.config.highlight name
Modified paths:
  • /trunk/extensions/UsabilityInitiative/InlineSectionEdit/InlineSectionEdit.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/loader.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/InlineSectionEdit/InlineSectionEdit.js
@@ -2,7 +2,7 @@
33 * Simple inline section edit example h3 ->h3 h2
44 */
55 mw.ready(function(){
6 - $j('.editsection').click(function(){
 6+ $j( '.editsection' ).click(function(){
77 // Get section number:
88 var href = $j( this ).children('a').attr( 'href');
99 var sectionNumber = mw.parseUri( href ).queryKey['section'];
@@ -100,27 +100,27 @@
101101 function doInlineWikiEditor( wikiText, sectionNumber ){
102102 // Here we have to plop in a hidden wikitext box identical to edit page
103103 // 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 )
105105 $j('#edit_section_' + sectionNumber).append(
106106 $j('<textarea>')
107 - .attr({
 107+ .attr( {
108108 'name' : "wpTextbox1",
109109 'id' : "wpTextbox1",
110110 'cols' : "80",
111111 'rows' : "20",
112112 'tabindex' : "1",
113113 'accesskey' : ","
114 - })
 114+ } )
115115 .val( wikiText )
116116 .hide()
117117 );
118 - //load the wikitext module:
119 - mw.load('WikiEditor', function(){
 118+ // Load the wikitext module:
 119+ mw.load( 'WikiEditor' , function(){
120120 //Remove the loader ( callback on mw.load('WikiEditor') is having trouble atm )
121121 $j('.loading_spinner').remove();
122122 // show the editor:
123123 $j('#wpTextbox1').show( 'fast' );
124 - // add the add-media-wizard binding"
 124+ // add the add-media-wizard binding" via editPage js
125125 mw.load( 'editPage', function(){
126126 mw.log("editPage loaded");
127127 });
Index: trunk/extensions/UsabilityInitiative/WikiEditor/loader.js
@@ -5,7 +5,7 @@
66 mw.setConfig('loaderContext', wgScriptPath + '/extensions/UsabilityInitiative/WikiEditor/');
77
88 mw.addClassFilePaths({
9 - "wikiEditorHighlight" : "Modules/Highlight/Highlight.js",
 9+ "wikiEditor.config.highlight" : "Modules/Highlight/Highlight.js",
1010 "wikiEditor.config.preview" : "Modules/Preview/Preview.js",
1111 "wikiEditor.config.publish" : "Modules/Publish/Publish.js",
1212 "wikiEditor.config.toc" : "Modules/Toc/Toc.js",
@@ -60,6 +60,7 @@
6161
6262
6363 mw.load(libReq, function(){
 64+ mw.log('wikiEditor done ' );
6465 callback( 'WikiEditor' );
6566 });
6667

Status & tagging log