Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -197,8 +197,13 @@ |
198 | 198 | $scripts = array(); |
199 | 199 | if ( !$sfgUseFormEditPage ) |
200 | 200 | $scripts[] = "$sfgScriptPath/libs/SF_ajax_form_preview.js"; |
201 | | - $scripts[] = "$smwgScriptPath/skins/SMW_tooltip.js"; |
202 | | - $scripts[] = "$smwgScriptPath/skins/SMW_sorttable.js"; |
| 201 | + if ( method_exists( 'SMWOutputs', 'requireHeadItem' ) ) { |
| 202 | + SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
| 203 | + SMWOutputs::requireHeadItem( SMW_HEADER_SORTTABLE ); |
| 204 | + } else { |
| 205 | + $scripts[] = "$smwgScriptPath/skins/SMW_tooltip.js"; |
| 206 | + $scripts[] = "$smwgScriptPath/skins/SMW_sorttable.js"; |
| 207 | + } |
203 | 208 | if ( method_exists( 'OutputPage', 'includeJQuery' ) ) { |
204 | 209 | $wgOut->includeJQuery(); |
205 | 210 | } else { |