Index: trunk/extensions/Configure/CHANGELOG |
— | — | @@ -1,6 +1,9 @@ |
2 | 2 | This file lists changes on this extension. |
3 | 3 | Localisation updates are done on betawiki and aren't listed here. |
4 | 4 | |
| 5 | +0.13.12 - 27 April 2009 |
| 6 | + (bugs 16828, 18582) Fixed some JavaScript issues on Internet Explorer. |
| 7 | + |
5 | 8 | 0.13.11 - 26 April 2009 |
6 | 9 | Removed obsolete translateSettings.php maintenance script. |
7 | 10 | |
Index: trunk/extensions/Configure/Configure.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure', |
20 | 20 | 'description' => 'Allow authorised users to configure the wiki via a web-based interface', |
21 | 21 | 'descriptionmsg' => 'configure-desc', |
22 | | - 'version' => '0.13.11', |
| 22 | + 'version' => '0.13.12', |
23 | 23 | ); |
24 | 24 | |
25 | 25 | # Configuration part |
— | — | @@ -167,7 +167,7 @@ |
168 | 168 | /** |
169 | 169 | * Styles versions, you shouldn't change it |
170 | 170 | */ |
171 | | -$wgConfigureStyleVersion = '20'; |
| 171 | +$wgConfigureStyleVersion = '21'; |
172 | 172 | |
173 | 173 | # Adding new rights... |
174 | 174 | $wgAvailableRights[] = 'configure'; |
Index: trunk/extensions/Configure/Configure.js |
— | — | @@ -24,25 +24,24 @@ |
25 | 25 | var sections = []; |
26 | 26 | var children = configform.childNodes; |
27 | 27 | var hid = 0; |
28 | | - var toc = document.createElement('ul'); |
| 28 | + var toc = document.createElement( 'ul' ); |
29 | 29 | toc.className = 'configtoc'; |
30 | 30 | toc.id = 'configtoc'; |
31 | 31 | toc.subLen = {}; |
32 | | - toc.confSec = 1; |
33 | 32 | toc.confSub = -1; |
34 | 33 | for( var i = 0; i < children.length; i++ ){ |
35 | | - if (children[i].nodeName.toLowerCase() == 'fieldset') { |
| 34 | + if ( children[i].nodeName.toLowerCase() == 'fieldset' ) { |
36 | 35 | children[i].id = 'config-section-' + i; |
37 | 36 | children[i].className = 'configsection'; |
38 | 37 | var legends = children[i].getElementsByTagName( 'legend' ); |
39 | | - if (legends[0] && legends[0].firstChild.nodeValue) { |
| 38 | + if ( legends[0] && legends[0].firstChild.nodeValue ) { |
40 | 39 | var legend = legends[0].firstChild.nodeValue; |
41 | 40 | } else { |
42 | 41 | var legend = '# ' + seci; |
43 | 42 | } |
44 | 43 | |
45 | | - var li = document.createElement('li'); |
46 | | - if (i === 0) { |
| 44 | + var li = document.createElement( 'li' ); |
| 45 | + if ( i == 0 ) { |
47 | 46 | li.className = 'selected'; |
48 | 47 | } |
49 | 48 | |
— | — | @@ -50,12 +49,12 @@ |
51 | 50 | var tables = getElementsByClassName( children[i], 'table', 'configure-table' ); |
52 | 51 | |
53 | 52 | if (headers.length > 1 && headers.length == tables.length) { |
54 | | - var a = document.createElement('a'); |
| 53 | + var a = document.createElement( 'a' ); |
55 | 54 | a.onmousedown = a.onclick = configTocToggleElement; |
56 | 55 | a.tocId = i; |
57 | 56 | a.collapsed = true; |
58 | 57 | a.appendChild( document.createTextNode( '[+]' ) ); |
59 | | - li.appendChild(a); |
| 58 | + li.appendChild( a ); |
60 | 59 | } |
61 | 60 | |
62 | 61 | var a = document.createElement('a'); |
— | — | @@ -68,7 +67,7 @@ |
69 | 68 | a.className = 'selected'; |
70 | 69 | } |
71 | 70 | a.appendChild( document.createTextNode( legend ) ); |
72 | | - li.appendChild(a); |
| 71 | + li.appendChild( a ); |
73 | 72 | |
74 | 73 | if( headers.length == tables.length && headers.length > 1 ){ |
75 | 74 | var len = headers.length; |
— | — | @@ -83,7 +82,7 @@ |
84 | 83 | for( var subsect = 0; subsect < len; subsect++ ){ |
85 | 84 | headers[subsect].id = 'config-head-' + i + '-' + subsect; |
86 | 85 | tables[subsect].id = 'config-table-' + i + '-' + subsect; |
87 | | - var a = document.createElement('a'); |
| 86 | + var a = document.createElement( 'a' ); |
88 | 87 | a.href = '#' + headers[subsect].id; |
89 | 88 | a.onmousedown = a.onclick = configToggle; |
90 | 89 | a.confSec = i; |
— | — | @@ -100,6 +99,9 @@ |
101 | 100 | toc.appendChild( li ); |
102 | 101 | if( hid == 1 ){ |
103 | 102 | children[i].style.display = 'none'; |
| 103 | + } else { |
| 104 | + // IE wants 1, but FF and others want 0 |
| 105 | + toc.confSec = i; |
104 | 106 | } |
105 | 107 | hid = 1; |
106 | 108 | } |
— | — | @@ -291,7 +293,7 @@ |
292 | 294 | var li = document.createElement( 'li' ); |
293 | 295 | |
294 | 296 | a.href = '#config-head-'+data.fid+'-'+data.sid; |
295 | | - addHandler( a, 'click', configToggle ); |
| 297 | + a.onclick = configToggle; |
296 | 298 | a.confSec = data.fid; |
297 | 299 | a.confSub = data.sid; |
298 | 300 | a.appendChild( document.createTextNode( data.displayDescription ) ); |
— | — | @@ -466,7 +468,7 @@ |
467 | 469 | } |
468 | 470 | } |
469 | 471 | |
470 | | - if (!rows) { |
| 472 | + if ( !rows ) { |
471 | 473 | tr = document.createElement( 'tr' ); |
472 | 474 | var td = document.createElement( 'td' ); |
473 | 475 | td.setAttribute( 'colspan', 2 ); |
— | — | @@ -494,7 +496,7 @@ |
495 | 497 | var newLinkText; |
496 | 498 | var newPlaceholderText; |
497 | 499 | |
498 | | - if (toggleLink.firstChild.nodeValue == wgConfigureBiglistShow) { |
| 500 | + if ( toggleLink.firstChild.nodeValue == wgConfigureBiglistShow ) { |
499 | 501 | act = 'show'; |
500 | 502 | newLinkText = wgConfigureBiglistHide; |
501 | 503 | content.style.display = 'block'; |
— | — | @@ -722,7 +724,6 @@ |
723 | 725 | * Helper for TOC |
724 | 726 | */ |
725 | 727 | function configToggle() { |
726 | | - var oldsecid = this.parentNode.parentNode.selectedid; |
727 | 728 | var confSec = this.confSec; |
728 | 729 | var confSub = this.confSub; |
729 | 730 | var toc = document.getElementById( 'configtoc' ); |