Index: trunk/extensions/CategoryTree/CategoryTree.js |
— | — | @@ -142,17 +142,21 @@ |
143 | 143 | |
144 | 144 | result = result.replace(/##LOAD##/g, categoryTreeExpandMsg); |
145 | 145 | div.innerHTML= result; |
| 146 | + |
| 147 | + categoryTreeShowToggles(); |
146 | 148 | } |
147 | 149 | |
148 | 150 | var opt = categoryTreeEncodeValue(options); |
149 | 151 | sajax_do_call( "efCategoryTreeAjaxWrapper", [cat, opt, 'json'] , f ); |
150 | 152 | } |
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); |