Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -1078,21 +1078,6 @@ |
1079 | 1079 | $wgOut->setSquidMaxage( 0 ); |
1080 | 1080 | $wgOut->enableClientCache( false ); |
1081 | 1081 | |
1082 | | - $out .= <<<EOS |
1083 | | -<script type="text/javascript"> |
1084 | | - function collectionCall(func, args) { |
1085 | | - sajax_request_type = 'POST'; |
1086 | | - sajax_do_call('wfAjaxCollection' + func, args, function(xhr) { |
1087 | | - sajax_request_type = 'GET'; |
1088 | | - sajax_do_call('wfAjaxCollectionGetPortlet', [func], function(xhr) { |
1089 | | - document.getElementById('collectionPortletList').parentNode.innerHTML = xhr.responseText; |
1090 | | - }); |
1091 | | - }); |
1092 | | - } |
1093 | | -</script> |
1094 | | -EOS |
1095 | | - ; |
1096 | | - |
1097 | 1082 | $namespace = $wgTitle->getNamespace(); |
1098 | 1083 | |
1099 | 1084 | if ( $ajaxHint == 'AddCategory' || $namespace == NS_CATEGORY ) { |
— | — | @@ -1180,6 +1165,24 @@ |
1181 | 1166 | } |
1182 | 1167 | |
1183 | 1168 | $out .= "</ul>"; |
| 1169 | + |
| 1170 | + $out .= <<<EOS |
| 1171 | +<script type="text/javascript"> |
| 1172 | +/* <![CDATA[ */ |
| 1173 | + function collectionCall(func, args) { |
| 1174 | + sajax_request_type = 'POST'; |
| 1175 | + sajax_do_call('wfAjaxCollection' + func, args, function(xhr) { |
| 1176 | + sajax_request_type = 'GET'; |
| 1177 | + sajax_do_call('wfAjaxCollectionGetPortlet', [func], function(xhr) { |
| 1178 | + document.getElementById('collectionPortletList').parentNode.innerHTML = xhr.responseText; |
| 1179 | + }); |
| 1180 | + }); |
| 1181 | + } |
| 1182 | +/* ]]> */ |
| 1183 | +</script> |
| 1184 | +EOS |
| 1185 | + ; |
| 1186 | + |
1184 | 1187 | return $out; |
1185 | 1188 | } |
1186 | 1189 | |