r51817 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51816‎ | r51817 | r51818 >
Date:07:37, 13 June 2009
Author:daniel
Status:ok
Tags:
Comment:
fixed: 18203 CategoryTree js-generated expand links always hidden; patch by RockMFR; sorry it took so long
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTree.js (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTree.js
@@ -142,17 +142,21 @@
143143
144144 result = result.replace(/##LOAD##/g, categoryTreeExpandMsg);
145145 div.innerHTML= result;
 146+
 147+ categoryTreeShowToggles();
146148 }
147149
148150 var opt = categoryTreeEncodeValue(options);
149151 sajax_do_call( "efCategoryTreeAjaxWrapper", [cat, opt, 'json'] , f );
150152 }
151 -
152 - // Re-show the CategoryTreeToggles.
153 - addOnloadHook( function() {
154 - var toggles = getElementsByClassName( document, 'span', 'CategoryTreeToggle' );
155 -
156 - for( var i = 0; i<toggles.length; ++i ) {
157 - toggles[i].style.display = 'inline';
158 - }
159 - } );
 153+
 154+ function categoryTreeShowToggles() {
 155+ var toggles = getElementsByClassName( document, 'span', 'CategoryTreeToggle' );
 156+
 157+ for( var i = 0; i<toggles.length; ++i ) {
 158+ toggles[i].style.display = 'inline';
 159+ }
 160+ }
 161+
 162+ // Re-show the CategoryTreeToggles
 163+ addOnloadHook(categoryTreeShowToggles);

Status & tagging log