Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -527,45 +527,6 @@ |
528 | 528 | return $parser->insertStripItem( $output, $parser->mStripState ); |
529 | 529 | } |
530 | 530 | |
531 | | - static function loadScriptsForPopupForm( &$parser ) { |
532 | | - global $sfgScriptPath; |
533 | | - |
534 | | - if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) { |
535 | | - |
536 | | - // on MW 1.17+ just request the ResourceLoader to include modules |
537 | | - |
538 | | - $parser->getOutput()->addModules( 'ext.semanticforms.popupformedit' ); |
539 | | - |
540 | | - } else { |
541 | | - |
542 | | - // on MW pre1.17 insert the necessary headers into the page head |
543 | | - static $loaded = false; |
544 | | - |
545 | | - // load JavaScript and CSS files only once |
546 | | - if ( !$loaded ) { |
547 | | - |
548 | | - // load extensions JavaScript |
549 | | - $parser->getOutput()->addHeadItem( |
550 | | - '<script type="text/javascript" src="' . $sfgScriptPath |
551 | | - . '/libs/SF_popupform.js"></script> ' . "\n", |
552 | | - 'sf_popup_script' |
553 | | - ); |
554 | | - |
555 | | - // load extensions style sheet |
556 | | - $parser->getOutput()->addHeadItem( |
557 | | - '<link rel="stylesheet" href="' . $sfgScriptPath |
558 | | - . '/skins/SF_popupform.css"/> ' . "\n", |
559 | | - 'sf_popup_style' |
560 | | - ); |
561 | | - |
562 | | - $loaded = true; |
563 | | - } |
564 | | - |
565 | | - } |
566 | | - |
567 | | - return true; |
568 | | - } |
569 | | - |
570 | 531 | /** |
571 | 532 | * Load scripts and style files for AutoEdit |
572 | 533 | */ |
Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -1006,4 +1006,42 @@ |
1007 | 1007 | return $str; |
1008 | 1008 | } |
1009 | 1009 | |
| 1010 | + static function loadScriptsForPopupForm( &$parser ) { |
| 1011 | + global $sfgScriptPath; |
| 1012 | + |
| 1013 | + if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) { |
| 1014 | + |
| 1015 | + // on MW 1.17+ just request the ResourceLoader to include modules |
| 1016 | + |
| 1017 | + $parser->getOutput()->addModules( 'ext.semanticforms.popupformedit' ); |
| 1018 | + |
| 1019 | + } else { |
| 1020 | + |
| 1021 | + // on MW pre1.17 insert the necessary headers into the page head |
| 1022 | + static $loaded = false; |
| 1023 | + |
| 1024 | + // load JavaScript and CSS files only once |
| 1025 | + if ( !$loaded ) { |
| 1026 | + |
| 1027 | + // load extensions JavaScript |
| 1028 | + $parser->getOutput()->addHeadItem( |
| 1029 | + '<script type="text/javascript" src="' . $sfgScriptPath |
| 1030 | + . '/libs/SF_popupform.js"></script> ' . "\n", |
| 1031 | + 'sf_popup_script' |
| 1032 | + ); |
| 1033 | + |
| 1034 | + // load extensions style sheet |
| 1035 | + $parser->getOutput()->addHeadItem( |
| 1036 | + '<link rel="stylesheet" href="' . $sfgScriptPath |
| 1037 | + . '/skins/SF_popupform.css"/> ' . "\n", |
| 1038 | + 'sf_popup_style' |
| 1039 | + ); |
| 1040 | + |
| 1041 | + $loaded = true; |
| 1042 | + } |
| 1043 | + |
| 1044 | + } |
| 1045 | + |
| 1046 | + return true; |
| 1047 | + } |
1010 | 1048 | } |