r44241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44240‎ | r44241 | r44242 >
Date:20:08, 4 December 2008
Author:ialex
Status:ok
Tags:
Comment:
\o/ \o/ \o/ :)

Fixing JS bugs affecting Internet Explorer, part one: No form shown in Special:Configure, Special:Extensions and Special:ViewConfig.
I passed some hours trying to fix this silly bug and guess what: it just need a <tbody> tag between <table> and <tr>.

This is not the only bug in IE, but at least there's something on the page :)
Modified paths:
  • /trunk/extensions/Configure/Configure.js (modified) (history)
  • /trunk/extensions/Configure/Configure.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.php
@@ -147,7 +147,7 @@
148148 /**
149149 * Styles versions, you shouldn't change it
150150 */
151 -$wgConfigureStyleVersion = '15';
 151+$wgConfigureStyleVersion = '16';
152152
153153 # Adding new rights...
154154 $wgAvailableRights[] = 'configure';
Index: trunk/extensions/Configure/Configure.js
@@ -110,8 +110,8 @@
111111 toggleToc.onmousedown = toggleToc.onclick = configTocToggle;
112112 toggleToc.appendChild( getArrowImg( 'l' ) );
113113
114 - var par = configform.parentNode;
115114 var table = document.createElement( 'table' );
 115+ var tbody = document.createElement( 'tbody' );
116116 var tr = document.createElement( 'tr' );
117117 var tdToc = document.createElement( 'td' );
118118 var tdForm = document.createElement( 'td' );
@@ -122,8 +122,9 @@
123123 tdForm.className = 'config-col-form';
124124 tr.appendChild( tdToc );
125125 tr.appendChild( tdForm );
126 - table.appendChild( tr );
127 - par.appendChild( table );
 126+ tbody.appendChild( tr );
 127+ table.appendChild( tbody );
 128+ document.getElementById( 'configure-form' ).appendChild( table );
128129
129130 // Associative tables
130131 // ------------------

Status & tagging log