Index: trunk/phase3/skins/common/config.js |
— | — | @@ -1,9 +1,19 @@ |
2 | 2 | (function( $ ) { |
3 | 3 | $( document ).ready( function() { |
4 | | - |
5 | | - // Generate the tool tips |
6 | | - $( '.mw-help-field-hint' ).tipsy( { gravity : 'se', opacity: '0.9' } ); |
7 | | - |
| 4 | + // Show/hide code for help text |
| 5 | + $( '.config-show-help a' ).click( function() { |
| 6 | + $(this).parent().siblings( '.config-help-message' ).show( 'slow' ); |
| 7 | + $(this).parent().siblings( '.config-hide-help' ).show(); |
| 8 | + $(this).parent().hide(); |
| 9 | + return false; |
| 10 | + } ); |
| 11 | + $( '.config-hide-help a' ).click( function() { |
| 12 | + $(this).parent().siblings( '.config-help-message' ).hide( 'slow' ); |
| 13 | + $(this).parent().siblings( '.config-show-help' ).show(); |
| 14 | + $(this).parent().hide(); |
| 15 | + return false; |
| 16 | + } ); |
| 17 | + |
8 | 18 | // Show/hide code for DB-specific options |
9 | 19 | // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here? |
10 | 20 | $( '.dbRadio' ).each( function() { $( '#' + $(this).attr( 'rel' ) ).hide(); } ); |
Index: trunk/phase3/skins/common/config.css |
— | — | @@ -6,23 +6,17 @@ |
7 | 7 | .config-section { |
8 | 8 | margin-top: 2em; |
9 | 9 | } |
10 | | -.config-block { |
11 | | - margin-top: 2em; |
12 | | - display: block; |
13 | 10 | |
14 | | -} |
15 | | -.config-block-label { |
16 | | - display: block; |
17 | | - margin-bottom: .2em; |
18 | | -} |
19 | | -.config-block-label label, .config-label { |
| 11 | +.config-label { |
| 12 | + clear: left; |
20 | 13 | font-weight: bold; |
21 | | - padding-right: .5em; |
| 14 | + width: 10em; |
| 15 | + float: left; |
| 16 | + text-align: right; |
| 17 | + padding-right: 1em; |
22 | 18 | padding-top: .2em; |
23 | 19 | } |
24 | | -.config-block-elements { |
25 | | - margin-left: 2em; |
26 | | -} |
| 20 | + |
27 | 21 | .config-block-elements li { |
28 | 22 | list-style: none; |
29 | 23 | } |
— | — | @@ -48,7 +42,7 @@ |
49 | 43 | .config-page { |
50 | 44 | padding: 0.5em 0.5em 0.5em 2em; |
51 | 45 | margin: 0.5em 0.5em 0.5em 0.5em; |
52 | | - background: #eee; |
| 46 | + border: 1px solid #aaa; |
53 | 47 | } |
54 | 48 | |
55 | 49 | .config-submit { |
— | — | @@ -92,6 +86,29 @@ |
93 | 87 | font-weight: bold; |
94 | 88 | } |
95 | 89 | |
| 90 | +.config-help-wrapper { |
| 91 | + clear: left; |
| 92 | + margin: 0 0 2em 12em; |
| 93 | + padding-top: 1em; |
| 94 | +} |
| 95 | +.config-show-help, .config-hide-help { |
| 96 | + margin-left: 14em; |
| 97 | +} |
| 98 | +.config-hide-help { display: none; } |
| 99 | +.config-show-help a, .config-hide-help a { |
| 100 | + background-image: url(images/help-22.png); |
| 101 | + background-position: 0 0; |
| 102 | + background-repeat: no-repeat; |
| 103 | + display: inline-block; |
| 104 | + height: 26px; |
| 105 | + padding-left: 26px; |
| 106 | +} |
| 107 | + |
| 108 | +.config-help-message { |
| 109 | + font-size: 85%; |
| 110 | + display: none; |
| 111 | +} |
| 112 | + |
96 | 113 | .config-message { |
97 | 114 | display: list-item; |
98 | 115 | line-height: 1.5em; |
— | — | @@ -142,7 +159,7 @@ |
143 | 160 | .config-cc-wrapper { |
144 | 161 | clear: left; |
145 | 162 | /* If you change this height, also change it in WebInstaller_Options::submitCC() */ |
146 | | - height: 54em; |
| 163 | + height: 54em; |
147 | 164 | } |
148 | 165 | |
149 | 166 | .config-plainlink a { |
Index: trunk/phase3/skins/common/images/help-question.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Index: trunk/phase3/skins/common/images/help-question-hover.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Index: trunk/phase3/skins/common/images/tipsy-arrow.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = image/gif |
Index: trunk/phase3/skins/common/images/help-22.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/phase3/skins/common/images/help-22.png |
___________________________________________________________________ |
Added: svn:mime-type |
150 | 167 | + image/png |
Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -917,23 +917,3 @@ |
918 | 918 | list-style-type: -moz-bengali; |
919 | 919 | list-style-type: bengali; |
920 | 920 | } |
921 | | - |
922 | | -/* tooltip styles */ |
923 | | -.mw-help-field-hint { |
924 | | - width: 11px; |
925 | | - height: 24px; |
926 | | - display: inline-block; |
927 | | - padding: 0px; |
928 | | - margin-left: 2px; |
929 | | - margin-bottom: -8px; |
930 | | - background: url('images/help-question.gif') 0 50% no-repeat; |
931 | | -} |
932 | | -.mw-help-field-hint:hover { |
933 | | - background: url('images/help-question-hover.gif') 0 50% no-repeat; |
934 | | -} |
935 | | -.tipsy { padding: 5px 5px 10px; font-size: 12px; position: absolute; z-index: 100000; overflow: visible; } |
936 | | -.tipsy-inner { padding: 5px 8px 4px 8px; background-color: #d6f3ff; color: black; border: 1px solid #5dc9f4; max-width: 300px; text-align: left; } |
937 | | -.tipsy-arrow { position: absolute; background: url( 'images/tipsy-arrow.gif' ) no-repeat top left; width: 13px; height: 13px; } |
938 | | -.tipsy-se .tipsy-arrow { bottom: -2px; right: 10px; background-position: 0% 100%; } |
939 | | - |
940 | | - |
Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -613,12 +613,21 @@ |
614 | 614 | array_shift( $args ); |
615 | 615 | $args = array_map( 'htmlspecialchars', $args ); |
616 | 616 | $text = wfMsgReal( $msg, $args, false, false, false ); |
617 | | - $html = htmlspecialchars( $text ); |
618 | | - //$html = $this->parse( $text, true ); |
| 617 | + $html = $this->parse( $text, true ); |
| 618 | + |
619 | 619 | return |
620 | | - "<span class=\"mw-help-field-hint\"\n" . |
621 | | - " title=\"" . $html . "\"\n" . |
622 | | - " original-title=\"" . $html . "\"></span>\n"; |
| 620 | + "<div class=\"config-help-wrapper\">\n" . |
| 621 | + "<div class=\"config-help-message\">\n" . |
| 622 | + $html . |
| 623 | + "</div>\n" . |
| 624 | + "<div class=\"config-show-help\">\n" . |
| 625 | + "<a href=\"#\">" . |
| 626 | + wfMsgHtml( 'config-show-help' ) . |
| 627 | + "</a></div>\n" . |
| 628 | + "<div class=\"config-hide-help\">\n" . |
| 629 | + "<a href=\"#\">" . |
| 630 | + wfMsgHtml( 'config-hide-help' ) . |
| 631 | + "</a></div>\n</div>\n"; |
623 | 632 | } |
624 | 633 | |
625 | 634 | /** |
— | — | @@ -661,7 +670,7 @@ |
662 | 671 | * Label a control by wrapping a config-input div around it and putting a |
663 | 672 | * label before it. |
664 | 673 | */ |
665 | | - public function label( $msg, $forId, $contents, $helpData = "" ) { |
| 674 | + public function label( $msg, $forId, $contents ) { |
666 | 675 | if ( strval( $msg ) == '' ) { |
667 | 676 | $labelText = ' '; |
668 | 677 | } else { |
— | — | @@ -675,16 +684,11 @@ |
676 | 685 | } |
677 | 686 | |
678 | 687 | return |
679 | | - "<div class=\"config-block\">\n" . |
680 | | - " <div class=\"config-block-label\">\n" . |
| 688 | + "<div class=\"config-input\">\n" . |
681 | 689 | Xml::tags( 'label', |
682 | 690 | $attributes, |
683 | 691 | $labelText ) . "\n" . |
684 | | - $helpData . |
685 | | - " </div>\n" . |
686 | | - " <div class=\"config-block-elements\">\n" . |
687 | | - $contents . |
688 | | - " </div>\n" . |
| 692 | + $contents . |
689 | 693 | "</div>\n"; |
690 | 694 | } |
691 | 695 | |
— | — | @@ -698,7 +702,6 @@ |
699 | 703 | * attribs: Additional attributes for the input element (optional) |
700 | 704 | * controlName: The name for the input element (optional) |
701 | 705 | * value: The current value of the variable (optional) |
702 | | - * help: The html for the help text (optional) |
703 | 706 | */ |
704 | 707 | public function getTextBox( $params ) { |
705 | 708 | if ( !isset( $params['controlName'] ) ) { |
— | — | @@ -712,9 +715,7 @@ |
713 | 716 | if ( !isset( $params['attribs'] ) ) { |
714 | 717 | $params['attribs'] = array(); |
715 | 718 | } |
716 | | - if ( !isset( $params['help'] ) ) { |
717 | | - $params['help'] = ""; |
718 | | - } |
| 719 | + |
719 | 720 | return |
720 | 721 | $this->label( |
721 | 722 | $params['label'], |
— | — | @@ -728,8 +729,7 @@ |
729 | 730 | 'class' => 'config-input-text', |
730 | 731 | 'tabindex' => $this->nextTabIndex() |
731 | 732 | ) |
732 | | - ), |
733 | | - $params['help'] |
| 733 | + ) |
734 | 734 | ); |
735 | 735 | } |
736 | 736 | |
— | — | @@ -744,7 +744,6 @@ |
745 | 745 | * attribs: Additional attributes for the input element (optional) |
746 | 746 | * controlName: The name for the input element (optional) |
747 | 747 | * value: The current value of the variable (optional) |
748 | | - * help: The html for the help text (optional) |
749 | 748 | */ |
750 | 749 | public function getPasswordBox( $params ) { |
751 | 750 | if ( !isset( $params['value'] ) ) { |
— | — | @@ -771,7 +770,6 @@ |
772 | 771 | * attribs: Additional attributes for the input element (optional) |
773 | 772 | * controlName: The name for the input element (optional) |
774 | 773 | * value: The current value of the variable (optional) |
775 | | - * help: The html for the help text (optional) |
776 | 774 | */ |
777 | 775 | public function getCheckBox( $params ) { |
778 | 776 | if ( !isset( $params['controlName'] ) ) { |
— | — | @@ -785,9 +783,7 @@ |
786 | 784 | if ( !isset( $params['attribs'] ) ) { |
787 | 785 | $params['attribs'] = array(); |
788 | 786 | } |
789 | | - if ( !isset( $params['help'] ) ) { |
790 | | - $params['help'] = ""; |
791 | | - } |
| 787 | + |
792 | 788 | if( isset( $params['rawtext'] ) ) { |
793 | 789 | $labelText = $params['rawtext']; |
794 | 790 | } else { |
— | — | @@ -807,7 +803,6 @@ |
808 | 804 | ) . |
809 | 805 | $labelText . "\n" . |
810 | 806 | "</label>\n" . |
811 | | - $params['help'] . |
812 | 807 | "</div>\n"; |
813 | 808 | } |
814 | 809 | |
— | — | @@ -824,7 +819,6 @@ |
825 | 820 | * commonAttribs Attribute array applied to all items |
826 | 821 | * controlName: The name for the input element (optional) |
827 | 822 | * value: The current value of the variable (optional) |
828 | | - * help: The html for the help text (optional) |
829 | 823 | */ |
830 | 824 | public function getRadioSet( $params ) { |
831 | 825 | if ( !isset( $params['controlName'] ) ) { |
— | — | @@ -838,12 +832,13 @@ |
839 | 833 | if ( !isset( $params['label'] ) ) { |
840 | 834 | $label = ''; |
841 | 835 | } else { |
842 | | - $label = $params['label']; |
| 836 | + $label = $this->parse( wfMsgNoTrans( $params['label'] ) ); |
843 | 837 | } |
844 | | - if ( !isset( $params['help'] ) ) { |
845 | | - $params['help'] = ""; |
846 | | - } |
847 | | - $s = "<ul>\n"; |
| 838 | + |
| 839 | + $s = "<label class=\"config-label\">\n" . |
| 840 | + $label . |
| 841 | + "</label>\n" . |
| 842 | + "<ul class=\"config-settings-block\">\n"; |
848 | 843 | foreach ( $params['values'] as $value ) { |
849 | 844 | $itemAttribs = array(); |
850 | 845 | |
— | — | @@ -871,8 +866,7 @@ |
872 | 867 | } |
873 | 868 | |
874 | 869 | $s .= "</ul>\n"; |
875 | | - |
876 | | - return $this->label( $label, $params['controlName'], $s, $params['help'] ); |
| 870 | + return $s; |
877 | 871 | } |
878 | 872 | |
879 | 873 | /** |
Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -31,6 +31,8 @@ |
32 | 32 | 'config-no-session' => 'Your session data was lost! |
33 | 33 | Check your php.ini and make sure <code>session.save_path</code> is set to an appropriate directory.', |
34 | 34 | 'config-session-path-bad' => 'Your <code>session.save_path</code> (<code>$1</code>) seems to be invalid or unwritable.', |
| 35 | + 'config-show-help' => 'Help', |
| 36 | + 'config-hide-help' => 'Hide help', |
35 | 37 | 'config-your-language' => 'Your language:', |
36 | 38 | 'config-your-language-help' => 'Select a language to use during the installation process.', |
37 | 39 | 'config-wiki-language' => 'Wiki language:', |
Index: trunk/phase3/includes/installer/WebInstallerOutput.php |
— | — | @@ -9,20 +9,20 @@ |
10 | 10 | /** |
11 | 11 | * Output class modelled on OutputPage. |
12 | 12 | * |
13 | | - * I've opted to use a distinct class rather than derive from OutputPage here in |
14 | | - * the interests of separation of concerns: if we used a subclass, there would be |
15 | | - * quite a lot of things you could do in OutputPage that would break the installer, |
16 | | - * that wouldn't be immediately obvious. |
17 | | - * |
| 13 | + * I've opted to use a distinct class rather than derive from OutputPage here in |
| 14 | + * the interests of separation of concerns: if we used a subclass, there would be |
| 15 | + * quite a lot of things you could do in OutputPage that would break the installer, |
| 16 | + * that wouldn't be immediately obvious. |
| 17 | + * |
18 | 18 | * @ingroup Deployment |
19 | 19 | * @since 1.17 |
20 | 20 | */ |
21 | 21 | class WebInstallerOutput { |
22 | 22 | /** |
23 | 23 | * The WebInstaller object this WebInstallerOutput is used by. |
24 | | - * |
| 24 | + * |
25 | 25 | * @var WebInstaller |
26 | | - */ |
| 26 | + */ |
27 | 27 | public $parent; |
28 | 28 | |
29 | 29 | /** |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Constructor. |
51 | | - * |
| 51 | + * |
52 | 52 | * @param $parent WebInstaller |
53 | 53 | */ |
54 | 54 | public function __construct( WebInstaller $parent ) { |
— | — | @@ -182,11 +182,16 @@ |
183 | 183 | <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?> |
184 | 184 | <?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?> |
185 | 185 | <?php echo $this->getJQuery() . "\n"; ?> |
186 | | - <?php echo $this->getJQueryTipsy() . "\n"; ?> |
187 | 186 | <?php echo Html::linkedScript( '../skins/common/config.js' ) . "\n"; ?> |
188 | 187 | </head> |
189 | 188 | |
190 | 189 | <?php echo Html::openElement( 'body', array( 'class' => $this->getDir() ) ) . "\n"; ?> |
| 190 | +<noscript> |
| 191 | +<style type="text/css"> |
| 192 | +.config-help-message { display: block; } |
| 193 | +.config-show-help { display: none; } |
| 194 | +</style> |
| 195 | +</noscript> |
191 | 196 | <div id="mw-page-base"></div> |
192 | 197 | <div id="mw-head-base"></div> |
193 | 198 | <div id="content"> |
— | — | @@ -236,7 +241,6 @@ |
237 | 242 | <title><?php $this->outputTitle(); ?></title> |
238 | 243 | <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?> |
239 | 244 | <?php echo $this->getJQuery(); ?> |
240 | | - <?php echo $this->getJQueryTipsy() . "\n"; ?> |
241 | 245 | <?php echo Html::linkedScript( '../skins/common/config.js' ); ?> |
242 | 246 | </head> |
243 | 247 | |
— | — | @@ -252,7 +256,10 @@ |
253 | 257 | public function getJQuery() { |
254 | 258 | return Html::linkedScript( "../resources/jquery/jquery.js" ); |
255 | 259 | } |
256 | | - public function getJQueryTipsy() { |
257 | | - return Html::linkedScript( "../resources/jquery/jquery.tipsy.js" ); |
| 260 | + |
| 261 | + public function outputWarnings() { |
| 262 | + $this->addHTML( $this->warnings ); |
| 263 | + $this->warnings = ''; |
258 | 264 | } |
| 265 | + |
259 | 266 | } |
Index: trunk/phase3/includes/installer/SqliteInstaller.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Class for setting up the MediaWiki database using SQLLite. |
12 | | - * |
| 12 | + * |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
— | — | @@ -41,8 +41,10 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | public function getConnectForm() { |
45 | | - return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir', array(), $this->parent->getHelpBox( 'config-sqlite-dir-help' ) ) . |
46 | | - $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-sqlite-name-help' ) ); |
| 45 | + return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir' ) . |
| 46 | + $this->parent->getHelpBox( 'config-sqlite-dir-help' ) . |
| 47 | + $this->getTextBox( 'wgDBname', 'config-db-name' ) . |
| 48 | + $this->parent->getHelpBox( 'config-sqlite-name-help' ); |
47 | 49 | } |
48 | 50 | |
49 | 51 | public function submitConnectForm() { |
Index: trunk/phase3/includes/installer/DatabaseInstaller.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Base class for DBMS-specific installation helper classes. |
12 | | - * |
| 12 | + * |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
— | — | @@ -16,30 +16,30 @@ |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * The Installer object. |
20 | | - * |
| 20 | + * |
21 | 21 | * TODO: naming this parent is confusing, 'installer' would be clearer. |
22 | | - * |
| 22 | + * |
23 | 23 | * @var Installer |
24 | 24 | */ |
25 | 25 | public $parent; |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * The database connection. |
29 | | - * |
| 29 | + * |
30 | 30 | * @var DatabaseBase |
31 | 31 | */ |
32 | 32 | public $db; |
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Internal variables for installation. |
36 | | - * |
| 36 | + * |
37 | 37 | * @var array |
38 | 38 | */ |
39 | 39 | protected $internalDefaults = array(); |
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Array of MW configuration globals this class uses. |
43 | | - * |
| 43 | + * |
44 | 44 | * @var array |
45 | 45 | */ |
46 | 46 | protected $globalNames = array(); |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | |
58 | 58 | /** |
59 | 59 | * Get HTML for a web form that configures this database. Configuration |
60 | | - * at this time should be the minimum needed to connect and test |
| 60 | + * at this time should be the minimum needed to connect and test |
61 | 61 | * whether install or upgrade is required. |
62 | 62 | * |
63 | 63 | * If this is called, $this->parent can be assumed to be a WebInstaller. |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Set variables based on the request array, assuming it was submitted |
69 | | - * via the form returned by getConnectForm(). Validate the connection |
| 69 | + * via the form returned by getConnectForm(). Validate the connection |
70 | 70 | * settings by attempting to connect with them. |
71 | 71 | * |
72 | 72 | * If this is called, $this->parent can be assumed to be a WebInstaller. |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | /** |
79 | 79 | * Get HTML for a web form that retrieves settings used for installation. |
80 | 80 | * $this->parent can be assumed to be a WebInstaller. |
81 | | - * If the DB type has no settings beyond those already configured with |
| 81 | + * If the DB type has no settings beyond those already configured with |
82 | 82 | * getConnectForm(), this should return false. |
83 | 83 | */ |
84 | 84 | public function getSettingsForm() { |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | /** |
89 | 89 | * Set variables based on the request array, assuming it was submitted via |
90 | 90 | * the form return by getSettingsForm(). |
91 | | - * |
| 91 | + * |
92 | 92 | * @return Status |
93 | 93 | */ |
94 | 94 | public function submitSettingsForm() { |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | |
98 | 98 | /** |
99 | 99 | * Connect to the database using the administrative user/password currently |
100 | | - * defined in the session. On success, return the connection, on failure, |
| 100 | + * defined in the session. On success, return the connection, on failure, |
101 | 101 | * |
102 | 102 | * This may be called multiple times, so the result should be cached. |
103 | 103 | * |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | |
116 | 116 | /** |
117 | 117 | * Create database tables from scratch. |
118 | | - * |
| 118 | + * |
119 | 119 | * @return Status |
120 | 120 | */ |
121 | 121 | public function createTables() { |
— | — | @@ -139,7 +139,7 @@ |
140 | 140 | |
141 | 141 | /** |
142 | 142 | * Get the DBMS-specific options for LocalSettings.php generation. |
143 | | - * |
| 143 | + * |
144 | 144 | * @return String |
145 | 145 | */ |
146 | 146 | public abstract function getLocalSettings(); |
— | — | @@ -188,19 +188,19 @@ |
189 | 189 | */ |
190 | 190 | public function getGlobalNames() { |
191 | 191 | return $this->globalNames; |
192 | | - } |
| 192 | + } |
193 | 193 | |
194 | 194 | /** |
195 | 195 | * Return any table options to be applied to all tables that don't |
196 | 196 | * override them. |
197 | | - * |
| 197 | + * |
198 | 198 | * @return Array |
199 | 199 | */ |
200 | 200 | public function getTableOptions() { |
201 | 201 | return array(); |
202 | 202 | } |
203 | 203 | |
204 | | - /** |
| 204 | + /** |
205 | 205 | * Construct and initialise parent. |
206 | 206 | * This is typically only called from Installer::getDBInstaller() |
207 | 207 | */ |
— | — | @@ -211,7 +211,7 @@ |
212 | 212 | /** |
213 | 213 | * Convenience function. |
214 | 214 | * Check if a named extension is present. |
215 | | - * |
| 215 | + * |
216 | 216 | * @see wfDl |
217 | 217 | */ |
218 | 218 | protected static function checkExtension( $name ) { |
— | — | @@ -267,19 +267,15 @@ |
268 | 268 | /** |
269 | 269 | * Get a labelled text box to configure a local variable. |
270 | 270 | */ |
271 | | - public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) { |
| 271 | + public function getTextBox( $var, $label, $attribs = array() ) { |
272 | 272 | $name = $this->getName() . '_' . $var; |
273 | 273 | $value = $this->getVar( $var ); |
274 | | - if ( !isset( $attribs ) ) { |
275 | | - $attribs = array(); |
276 | | - } |
277 | 274 | return $this->parent->getTextBox( array( |
278 | 275 | 'var' => $var, |
279 | 276 | 'label' => $label, |
280 | 277 | 'attribs' => $attribs, |
281 | 278 | 'controlName' => $name, |
282 | | - 'value' => $value, |
283 | | - 'help' => $helpData |
| 279 | + 'value' => $value |
284 | 280 | ) ); |
285 | 281 | } |
286 | 282 | |
— | — | @@ -287,26 +283,22 @@ |
288 | 284 | * Get a labelled password box to configure a local variable. |
289 | 285 | * Implements password hiding. |
290 | 286 | */ |
291 | | - public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) { |
| 287 | + public function getPasswordBox( $var, $label, $attribs = array() ) { |
292 | 288 | $name = $this->getName() . '_' . $var; |
293 | 289 | $value = $this->getVar( $var ); |
294 | | - if ( !isset( $attribs ) ) { |
295 | | - $attribs = array(); |
296 | | - } |
297 | 290 | return $this->parent->getPasswordBox( array( |
298 | 291 | 'var' => $var, |
299 | 292 | 'label' => $label, |
300 | 293 | 'attribs' => $attribs, |
301 | 294 | 'controlName' => $name, |
302 | | - 'value' => $value, |
303 | | - 'help' => $helpData |
| 295 | + 'value' => $value |
304 | 296 | ) ); |
305 | 297 | } |
306 | 298 | |
307 | 299 | /** |
308 | 300 | * Get a labelled checkbox to configure a local boolean variable. |
309 | 301 | */ |
310 | | - public function getCheckBox( $var, $label, $attribs = array(), $helpData = "" ) { |
| 302 | + public function getCheckBox( $var, $label, $attribs = array() ) { |
311 | 303 | $name = $this->getName() . '_' . $var; |
312 | 304 | $value = $this->getVar( $var ); |
313 | 305 | return $this->parent->getCheckBox( array( |
— | — | @@ -315,7 +307,6 @@ |
316 | 308 | 'attribs' => $attribs, |
317 | 309 | 'controlName' => $name, |
318 | 310 | 'value' => $value, |
319 | | - 'help' => $helpData |
320 | 311 | )); |
321 | 312 | } |
322 | 313 | |
— | — | @@ -348,11 +339,11 @@ |
349 | 340 | } |
350 | 341 | |
351 | 342 | /** |
352 | | - * Determine whether an existing installation of MediaWiki is present in |
353 | | - * the configured administrative connection. Returns true if there is |
| 343 | + * Determine whether an existing installation of MediaWiki is present in |
| 344 | + * the configured administrative connection. Returns true if there is |
354 | 345 | * such a wiki, false if the database doesn't exist. |
355 | 346 | * |
356 | | - * Traditionally, this is done by testing for the existence of either |
| 347 | + * Traditionally, this is done by testing for the existence of either |
357 | 348 | * the revision table or the cur table. |
358 | 349 | * |
359 | 350 | * @return Boolean |
— | — | @@ -376,8 +367,9 @@ |
377 | 368 | return |
378 | 369 | Html::openElement( 'fieldset' ) . |
379 | 370 | Html::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) . |
380 | | - $this->getTextBox( '_InstallUser', 'config-db-username', array(), $this->parent->getHelpBox( 'config-db-install-username' ) ) . |
381 | | - $this->getPasswordBox( '_InstallPassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-install-password' ) ) . |
| 371 | + $this->getTextBox( '_InstallUser', 'config-db-username' ) . |
| 372 | + $this->getPasswordBox( '_InstallPassword', 'config-db-password' ) . |
| 373 | + $this->parent->getHelpBox( 'config-db-install-help' ) . |
382 | 374 | Html::closeElement( 'fieldset' ); |
383 | 375 | } |
384 | 376 | |
— | — | @@ -397,7 +389,7 @@ |
398 | 390 | public function getWebUserBox( $noCreateMsg = false ) { |
399 | 391 | $s = Html::openElement( 'fieldset' ) . |
400 | 392 | Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) . |
401 | | - $this->getCheckBox( |
| 393 | + $this->getCheckBox( |
402 | 394 | '_SameAccount', 'config-db-web-account-same', |
403 | 395 | array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' ) |
404 | 396 | ) . |
— | — | @@ -416,7 +408,7 @@ |
417 | 409 | |
418 | 410 | /** |
419 | 411 | * Submit the form from getWebUserBox(). |
420 | | - * |
| 412 | + * |
421 | 413 | * @return Status |
422 | 414 | */ |
423 | 415 | public function submitWebUserBox() { |
Index: trunk/phase3/includes/installer/MysqlInstaller.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Class for setting up the MediaWiki database using MySQL. |
12 | | - * |
| 12 | + * |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
— | — | @@ -59,11 +59,14 @@ |
60 | 60 | |
61 | 61 | public function getConnectForm() { |
62 | 62 | return |
63 | | - $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) . |
| 63 | + $this->getTextBox( 'wgDBserver', 'config-db-host' ) . |
| 64 | + $this->parent->getHelpBox( 'config-db-host-help' ) . |
64 | 65 | Html::openElement( 'fieldset' ) . |
65 | 66 | Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) . |
66 | | - $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) . |
67 | | - $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array(), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) . |
| 67 | + $this->getTextBox( 'wgDBname', 'config-db-name' ) . |
| 68 | + $this->parent->getHelpBox( 'config-db-name-help' ) . |
| 69 | + $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) . |
| 70 | + $this->parent->getHelpBox( 'config-db-prefix-help' ) . |
68 | 71 | Html::closeElement( 'fieldset' ) . |
69 | 72 | $this->getInstallUserBox(); |
70 | 73 | } |
— | — | @@ -117,7 +120,7 @@ |
118 | 121 | $this->getVar( '_InstallPassword' ), |
119 | 122 | false, |
120 | 123 | false, |
121 | | - 0, |
| 124 | + 0, |
122 | 125 | $this->getVar( 'wgDBprefix' ) |
123 | 126 | ); |
124 | 127 | $status->value = $this->db; |
— | — | @@ -249,12 +252,12 @@ |
250 | 253 | if ( count( $parts ) != 2 ) { |
251 | 254 | return false; |
252 | 255 | } |
253 | | - $quotedUser = $conn->addQuotes( $parts[0] ) . |
| 256 | + $quotedUser = $conn->addQuotes( $parts[0] ) . |
254 | 257 | '@' . $conn->addQuotes( $parts[1] ); |
255 | 258 | |
256 | 259 | // The user needs to have INSERT on mysql.* to be able to CREATE USER |
257 | 260 | // The grantee will be double-quoted in this query, as required |
258 | | - $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*', |
| 261 | + $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*', |
259 | 262 | array( 'GRANTEE' => $quotedUser ), __METHOD__ ); |
260 | 263 | $insertMysql = false; |
261 | 264 | $grantOptions = array_flip( $this->webUserPrivs ); |
— | — | @@ -270,7 +273,7 @@ |
271 | 274 | // Check for DB-specific privs for mysql.* |
272 | 275 | if ( !$insertMysql ) { |
273 | 276 | $row = $conn->selectRow( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*', |
274 | | - array( |
| 277 | + array( |
275 | 278 | 'GRANTEE' => $quotedUser, |
276 | 279 | 'TABLE_SCHEMA' => 'mysql', |
277 | 280 | 'PRIVILEGE_TYPE' => 'INSERT', |
— | — | @@ -285,7 +288,7 @@ |
286 | 289 | } |
287 | 290 | |
288 | 291 | // Check for DB-level grant options |
289 | | - $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*', |
| 292 | + $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*', |
290 | 293 | array( |
291 | 294 | 'GRANTEE' => $quotedUser, |
292 | 295 | 'IS_GRANTABLE' => 1, |
— | — | @@ -319,9 +322,9 @@ |
320 | 323 | } |
321 | 324 | if ( count( $engines ) >= 2 ) { |
322 | 325 | $s .= $this->getRadioSet( array( |
323 | | - 'var' => '_MysqlEngine', |
324 | | - 'label' => 'config-mysql-engine', |
325 | | - 'itemLabelPrefix' => 'config-mysql-', |
| 326 | + 'var' => '_MysqlEngine', |
| 327 | + 'label' => 'config-mysql-engine', |
| 328 | + 'itemLabelPrefix' => 'config-mysql-', |
326 | 329 | 'values' => $engines |
327 | 330 | )); |
328 | 331 | $s .= $this->parent->getHelpBox( 'config-mysql-engine-help' ); |
— | — | @@ -372,7 +375,7 @@ |
373 | 376 | $this->getVar( 'wgDBpassword' ), |
374 | 377 | false, |
375 | 378 | false, |
376 | | - 0, |
| 379 | + 0, |
377 | 380 | $this->getVar( 'wgDBprefix' ) |
378 | 381 | ); |
379 | 382 | } catch ( DBConnectionError $e ) { |
Index: trunk/phase3/includes/installer/OracleInstaller.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Class for setting up the MediaWiki database using Oracle. |
12 | | - * |
| 12 | + * |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
— | — | @@ -46,7 +46,8 @@ |
47 | 47 | Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) . |
48 | 48 | Html::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) . |
49 | 49 | $this->getTextBox( 'wgDBuser', 'config-db-username' ) . |
50 | | - $this->getPasswordBox( 'wgDBpassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-web-help' ) ) . |
| 50 | + $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) . |
| 51 | + $this->parent->getHelpBox( 'config-db-web-help' ). |
51 | 52 | $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create', array( 'disabled' => true ) ). |
52 | 53 | Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' ); |
53 | 54 | } |
— | — | @@ -55,12 +56,14 @@ |
56 | 57 | $this->parent->setVar( '_InstallUser', 'sys' ); |
57 | 58 | $this->parent->setVar( 'wgDBserver', '' ); |
58 | 59 | return |
59 | | - $this->getTextBox( 'wgDBserver', 'config-db-host-oracle', array(), $this->parent->getHelpBox( 'config-db-host-oracle-help' ) ) . |
| 60 | + $this->getTextBox( 'wgDBserver', 'config-db-host-oracle' ) . |
| 61 | + $this->parent->getHelpBox( 'config-db-host-oracle-help' ) . |
60 | 62 | Html::openElement( 'fieldset' ) . |
61 | 63 | Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) . |
62 | 64 | $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) . |
63 | 65 | $this->getTextBox( '_OracleDefTS', 'config-oracle-def-ts' ) . |
64 | | - $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts', array(), $this->parent->getHelpBox( 'config-db-oracle-help' ) ) . |
| 66 | + $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts' ) . |
| 67 | + $this->parent->getHelpBox( 'config-db-oracle-help' ) . |
65 | 68 | Html::closeElement( 'fieldset' ) . |
66 | 69 | $this->getInstallUserBox(). |
67 | 70 | $this->getWebUserBox(); |
Index: trunk/phase3/includes/installer/PostgresInstaller.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Class for setting up the MediaWiki database using Postgres. |
12 | | - * |
| 12 | + * |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
— | — | @@ -36,20 +36,23 @@ |
37 | 37 | |
38 | 38 | function getConnectForm() { |
39 | 39 | return |
40 | | - $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) . |
| 40 | + $this->getTextBox( 'wgDBserver', 'config-db-host' ) . |
| 41 | + $this->parent->getHelpBox( 'config-db-host-help' ) . |
41 | 42 | $this->getTextBox( 'wgDBport', 'config-db-port' ) . |
42 | 43 | Html::openElement( 'fieldset' ) . |
43 | 44 | Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) . |
44 | | - $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) . |
45 | | - $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) . |
| 45 | + $this->getTextBox( 'wgDBname', 'config-db-name' ) . |
| 46 | + $this->parent->getHelpBox( 'config-db-name-help' ) . |
| 47 | + $this->getTextBox( 'wgDBmwschema', 'config-db-schema' ) . |
46 | 48 | $this->getTextBox( 'wgDBts2schema', 'config-db-ts2-schema' ) . |
| 49 | + $this->parent->getHelpBox( 'config-db-schema-help' ) . |
47 | 50 | Html::closeElement( 'fieldset' ) . |
48 | 51 | $this->getInstallUserBox(); |
49 | 52 | } |
50 | 53 | |
51 | 54 | function submitConnectForm() { |
52 | 55 | // Get variables from the request |
53 | | - $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport', |
| 56 | + $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport', |
54 | 57 | 'wgDBname', 'wgDBmwschema', 'wgDBts2schema' ) ); |
55 | 58 | |
56 | 59 | // Validate them |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Abstract class to define pages for the web installer. |
12 | | - * |
| 12 | + * |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * The WebInstaller object this WebInstallerPage belongs to. |
20 | | - * |
| 20 | + * |
21 | 21 | * @var WebInstaller |
22 | 22 | */ |
23 | 23 | public $parent; |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Constructor. |
29 | | - * |
| 29 | + * |
30 | 30 | * @param $parent WebInstaller |
31 | 31 | */ |
32 | 32 | public function __construct( WebInstaller $parent ) { |
— | — | @@ -220,15 +220,13 @@ |
221 | 221 | } |
222 | 222 | $this->startForm(); |
223 | 223 | $s = Html::hidden( 'LanguageRequestTime', time() ) . |
224 | | - $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang, $this->parent->getHelpBox( 'config-your-language-help' ) ) . |
225 | | - $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang, $this->parent->getHelpBox( 'config-wiki-language-help' ) ) . |
226 | | - $this->parent->getCheckBox( |
227 | | - array( |
228 | | - 'var' => '_ExternalHTTP', |
229 | | - 'label' => 'config-allow-requests', |
230 | | - 'help' => $this->parent->getHelpBox( 'config-allow-requests-help' ) |
231 | | - ) |
232 | | - ); |
| 224 | + $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang ) . |
| 225 | + $this->parent->getHelpBox( 'config-your-language-help' ) . |
| 226 | + $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang ) . |
| 227 | + $this->parent->getHelpBox( 'config-wiki-language-help' ) . |
| 228 | + $this->parent->getCheckBox( |
| 229 | + array( 'var' => '_ExternalHTTP', 'label' => 'config-allow-requests' ) |
| 230 | + ) . $this->parent->getHelpBox( 'config-allow-requests-help' ); |
233 | 231 | |
234 | 232 | $this->addHTML( $s ); |
235 | 233 | $this->endForm(); |
— | — | @@ -265,7 +263,7 @@ |
266 | 264 | $this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) ); |
267 | 265 | $status = $this->parent->doEnvironmentChecks(); |
268 | 266 | if ( $status ) { |
269 | | - $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright', |
| 267 | + $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright', |
270 | 268 | SpecialVersion::getCopyrightAndAuthorList() ) ); |
271 | 269 | $this->startForm(); |
272 | 270 | $this->endForm(); |
— | — | @@ -297,7 +295,7 @@ |
298 | 296 | $dbSupport = ''; |
299 | 297 | foreach( $this->parent->getDBTypes() as $type ) { |
300 | 298 | $db = 'Database' . ucfirst( $type ); |
301 | | - $dbSupport .= wfMsgNoTrans( "config-support-$type", |
| 299 | + $dbSupport .= wfMsgNoTrans( "config-support-$type", |
302 | 300 | call_user_func( array( $db, 'getSoftwareLink' ) ) ) . "\n"; |
303 | 301 | } |
304 | 302 | $this->addHTML( $this->parent->getInfoBox( |
— | — | @@ -466,22 +464,21 @@ |
467 | 465 | $this->parent->getTextBox( array( |
468 | 466 | 'var' => 'wgSitename', |
469 | 467 | 'label' => 'config-site-name', |
470 | | - 'help' => $this->parent->getHelpBox( 'config-site-name-help' ) |
471 | 468 | ) ) . |
| 469 | + $this->parent->getHelpBox( 'config-site-name-help' ) . |
472 | 470 | $this->parent->getRadioSet( array( |
473 | 471 | 'var' => '_NamespaceType', |
474 | 472 | 'label' => 'config-project-namespace', |
475 | 473 | 'itemLabelPrefix' => 'config-ns-', |
476 | 474 | 'values' => array( 'site-name', 'generic', 'other' ), |
477 | 475 | 'commonAttribs' => array( 'class' => 'enableForOther', 'rel' => 'config_wgMetaNamespace' ), |
478 | | - 'help' => $this->parent->getHelpBox( 'config-project-namespace-help' ) |
479 | 476 | ) ) . |
480 | 477 | $this->parent->getTextBox( array( |
481 | 478 | 'var' => 'wgMetaNamespace', |
482 | 479 | 'label' => '', //TODO: Needs a label? |
483 | 480 | 'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' ), |
484 | | - |
485 | 481 | ) ) . |
| 482 | + $this->parent->getHelpBox( 'config-project-namespace-help' ) . |
486 | 483 | $this->getFieldSetStart( 'config-admin-box' ) . |
487 | 484 | $this->parent->getTextBox( array( |
488 | 485 | 'var' => '_AdminName', |
— | — | @@ -496,16 +493,17 @@ |
497 | 494 | 'var' => '_AdminPassword2', |
498 | 495 | 'label' => 'config-admin-password-confirm' |
499 | 496 | ) ) . |
| 497 | + $this->parent->getHelpBox( 'config-admin-help' ) . |
500 | 498 | $this->parent->getTextBox( array( |
501 | 499 | 'var' => '_AdminEmail', |
502 | | - 'label' => 'config-admin-email', |
503 | | - 'help' => $this->parent->getHelpBox( 'config-admin-email-help' ) |
| 500 | + 'label' => 'config-admin-email' |
504 | 501 | ) ) . |
| 502 | + $this->parent->getHelpBox( 'config-admin-email-help' ) . |
505 | 503 | $this->parent->getCheckBox( array( |
506 | 504 | 'var' => '_Subscribe', |
507 | | - 'label' => 'config-subscribe', |
508 | | - 'help' => $this->parent->getHelpBox( 'config-subscribe-help' ) |
| 505 | + 'label' => 'config-subscribe' |
509 | 506 | ) ) . |
| 507 | + $this->parent->getHelpBox( 'config-subscribe-help' ) . |
510 | 508 | $this->getFieldSetEnd() . |
511 | 509 | $this->parent->getInfoBox( wfMsg( 'config-almost-done' ) ) . |
512 | 510 | $this->parent->getRadioSet( array( |
— | — | @@ -587,12 +585,9 @@ |
588 | 586 | |
589 | 587 | // Validate password |
590 | 588 | $msg = false; |
591 | | - $valid = false; |
592 | 589 | $pwd = $this->getVar( '_AdminPassword' ); |
593 | 590 | $user = User::newFromName( $cname ); |
594 | | - if ( ( isset ( $pwd ) ) && ( $user != null ) ) { |
595 | | - $valid = $user->getPasswordValidity( $pwd ); |
596 | | - } |
| 591 | + $valid = $user->getPasswordValidity( $pwd ); |
597 | 592 | if ( strval( $pwd ) === '' ) { |
598 | 593 | # $user->getPasswordValidity just checks for $wgMinimalPasswordLength. |
599 | 594 | # This message is more specific and helpful. |
— | — | @@ -700,31 +695,31 @@ |
701 | 696 | } |
702 | 697 | |
703 | 698 | $extHtml .= $this->parent->getHelpBox( 'config-extensions-help' ) . |
704 | | - $this->getFieldSetEnd(); |
| 699 | + $this->getFieldSetEnd(); |
705 | 700 | $this->addHTML( $extHtml ); |
706 | 701 | } |
707 | 702 | |
708 | 703 | $this->addHTML( |
709 | 704 | # Uploading |
710 | 705 | $this->getFieldSetStart( 'config-upload-settings' ) . |
711 | | - $this->parent->getCheckBox( array( |
| 706 | + $this->parent->getCheckBox( array( |
712 | 707 | 'var' => 'wgEnableUploads', |
713 | 708 | 'label' => 'config-upload-enable', |
714 | 709 | 'attribs' => array( 'class' => 'showHideRadio', 'rel' => 'uploadwrapper' ), |
715 | | - 'help' => $this->parent->getHelpBox( 'config-upload-help' ) |
716 | 710 | ) ) . |
| 711 | + $this->parent->getHelpBox( 'config-upload-help' ) . |
717 | 712 | '<div id="uploadwrapper" style="display: none;">' . |
718 | | - $this->parent->getTextBox( array( |
| 713 | + $this->parent->getTextBox( array( |
719 | 714 | 'var' => 'wgDeletedDirectory', |
720 | 715 | 'label' => 'config-upload-deleted', |
721 | | - 'help' => $this->parent->getHelpBox( 'config-upload-deleted-help' ) |
722 | 716 | ) ) . |
| 717 | + $this->parent->getHelpBox( 'config-upload-deleted-help' ) . |
723 | 718 | '</div>' . |
724 | 719 | $this->parent->getTextBox( array( |
725 | 720 | 'var' => 'wgLogo', |
726 | | - 'label' => 'config-logo', |
727 | | - 'help' => $this->parent->getHelpBox( 'config-logo-help' ) |
728 | | - ) ) |
| 721 | + 'label' => 'config-logo' |
| 722 | + ) ) . |
| 723 | + $this->parent->getHelpBox( 'config-logo-help' ) |
729 | 724 | ); |
730 | 725 | $canUse = $this->getVar( '_ExternalHTTP' ) ? |
731 | 726 | 'config-instantcommons-good' : 'config-instantcommons-bad'; |
— | — | @@ -732,8 +727,8 @@ |
733 | 728 | $this->parent->getCheckBox( array( |
734 | 729 | 'var' => 'wgUseInstantCommons', |
735 | 730 | 'label' => 'config-instantcommons', |
736 | | - 'help' => $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) ) |
737 | 731 | ) ) . |
| 732 | + $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) ) . |
738 | 733 | $this->getFieldSetEnd() |
739 | 734 | ); |
740 | 735 | |
— | — | @@ -759,9 +754,8 @@ |
760 | 755 | $this->parent->getTextBox( array( |
761 | 756 | 'var' => '_MemCachedServers', |
762 | 757 | 'label' => 'config-memcached-servers', |
763 | | - 'help' => $this->parent->getHelpBox( 'config-memcached-help' ) |
764 | 758 | ) ) . |
765 | | - '</div>' . |
| 759 | + $this->parent->getHelpBox( 'config-memcached-help' ) . '</div>' . |
766 | 760 | $this->getFieldSetEnd() |
767 | 761 | ); |
768 | 762 | $this->endForm(); |
Index: trunk/phase3/resources/jquery/jquery.tipsy.js |
— | — | @@ -1,202 +0,0 @@ |
2 | | -// tipsy, facebook style tooltips for jquery |
3 | | -// version 1.0.0a |
4 | | -// (c) 2008-2010 jason frame [jason@onehackoranother.com] |
5 | | -// released under the MIT license |
6 | | - |
7 | | -(function($) { |
8 | | - |
9 | | - function Tipsy(element, options) { |
10 | | - this.$element = $(element); |
11 | | - this.options = options; |
12 | | - this.enabled = true; |
13 | | - this.fixTitle(); |
14 | | - } |
15 | | - |
16 | | - Tipsy.prototype = { |
17 | | - show: function() { |
18 | | - var title = this.getTitle(); |
19 | | - if (title && this.enabled) { |
20 | | - var $tip = this.tip(); |
21 | | - |
22 | | - $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); |
23 | | - $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity |
24 | | - $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); |
25 | | - |
26 | | - var pos = $.extend({}, this.$element.offset(), { |
27 | | - width: this.$element[0].offsetWidth, |
28 | | - height: this.$element[0].offsetHeight |
29 | | - }); |
30 | | - |
31 | | - var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight; |
32 | | - var gravity = (typeof this.options.gravity == 'function') |
33 | | - ? this.options.gravity.call(this.$element[0]) |
34 | | - : this.options.gravity; |
35 | | - |
36 | | - var tp; |
37 | | - switch (gravity.charAt(0)) { |
38 | | - case 'n': |
39 | | - tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; |
40 | | - break; |
41 | | - case 's': |
42 | | - tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; |
43 | | - break; |
44 | | - case 'e': |
45 | | - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; |
46 | | - break; |
47 | | - case 'w': |
48 | | - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; |
49 | | - break; |
50 | | - } |
51 | | - |
52 | | - if (gravity.length == 2) { |
53 | | - if (gravity.charAt(1) == 'w') { |
54 | | - tp.left = pos.left + pos.width / 2 - 15; |
55 | | - } else { |
56 | | - tp.left = pos.left + pos.width / 2 - actualWidth + 15; |
57 | | - } |
58 | | - } |
59 | | - |
60 | | - $tip.css(tp).addClass('tipsy-' + gravity); |
61 | | - |
62 | | - if (this.options.fade) { |
63 | | - $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); |
64 | | - } else { |
65 | | - $tip.css({visibility: 'visible', opacity: this.options.opacity}); |
66 | | - } |
67 | | - } |
68 | | - }, |
69 | | - |
70 | | - hide: function() { |
71 | | - if (this.options.fade) { |
72 | | - this.tip().stop().fadeOut(function() { $(this).remove(); }); |
73 | | - } else { |
74 | | - this.tip().remove(); |
75 | | - } |
76 | | - }, |
77 | | - |
78 | | - fixTitle: function() { |
79 | | - var $e = this.$element; |
80 | | - if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') { |
81 | | - $e.attr('original-title', $e.attr('title') || '').removeAttr('title'); |
82 | | - } |
83 | | - }, |
84 | | - |
85 | | - getTitle: function() { |
86 | | - var title, $e = this.$element, o = this.options; |
87 | | - this.fixTitle(); |
88 | | - var title, o = this.options; |
89 | | - if (typeof o.title == 'string') { |
90 | | - title = $e.attr(o.title == 'title' ? 'original-title' : o.title); |
91 | | - } else if (typeof o.title == 'function') { |
92 | | - title = o.title.call($e[0]); |
93 | | - } |
94 | | - title = ('' + title).replace(/(^\s*|\s*$)/, ""); |
95 | | - return title || o.fallback; |
96 | | - }, |
97 | | - |
98 | | - tip: function() { |
99 | | - if (!this.$tip) { |
100 | | - this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'); |
101 | | - } |
102 | | - return this.$tip; |
103 | | - }, |
104 | | - |
105 | | - validate: function() { |
106 | | - if (!this.$element[0].parentNode) { |
107 | | - this.hide(); |
108 | | - this.$element = null; |
109 | | - this.options = null; |
110 | | - } |
111 | | - }, |
112 | | - |
113 | | - enable: function() { this.enabled = true; }, |
114 | | - disable: function() { this.enabled = false; }, |
115 | | - toggleEnabled: function() { this.enabled = !this.enabled; } |
116 | | - }; |
117 | | - |
118 | | - $.fn.tipsy = function(options) { |
119 | | - |
120 | | - if (options === true) { |
121 | | - return this.data('tipsy'); |
122 | | - } else if (typeof options == 'string') { |
123 | | - var tipsy = this.data('tipsy'); |
124 | | - if (tipsy) tipsy[options](); |
125 | | - return this; |
126 | | - } |
127 | | - |
128 | | - options = $.extend({}, $.fn.tipsy.defaults, options); |
129 | | - |
130 | | - function get(ele) { |
131 | | - var tipsy = $.data(ele, 'tipsy'); |
132 | | - if (!tipsy) { |
133 | | - tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); |
134 | | - $.data(ele, 'tipsy', tipsy); |
135 | | - } |
136 | | - return tipsy; |
137 | | - } |
138 | | - |
139 | | - function enter() { |
140 | | - var tipsy = get(this); |
141 | | - tipsy.hoverState = 'in'; |
142 | | - if (options.delayIn == 0) { |
143 | | - tipsy.show(); |
144 | | - } else { |
145 | | - tipsy.fixTitle(); |
146 | | - setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); |
147 | | - } |
148 | | - }; |
149 | | - |
150 | | - function leave() { |
151 | | - var tipsy = get(this); |
152 | | - tipsy.hoverState = 'out'; |
153 | | - if (options.delayOut == 0) { |
154 | | - tipsy.hide(); |
155 | | - } else { |
156 | | - setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); |
157 | | - } |
158 | | - }; |
159 | | - |
160 | | - if (!options.live) this.each(function() { get(this); }); |
161 | | - |
162 | | - if (options.trigger != 'manual') { |
163 | | - var binder = options.live ? 'live' : 'bind', |
164 | | - eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', |
165 | | - eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; |
166 | | - this[binder](eventIn, enter)[binder](eventOut, leave); |
167 | | - } |
168 | | - |
169 | | - return this; |
170 | | - |
171 | | - }; |
172 | | - |
173 | | - $.fn.tipsy.defaults = { |
174 | | - delayIn: 0, |
175 | | - delayOut: 0, |
176 | | - fade: false, |
177 | | - fallback: '', |
178 | | - gravity: 'n', |
179 | | - html: false, |
180 | | - live: false, |
181 | | - offset: 0, |
182 | | - opacity: 0.8, |
183 | | - title: 'title', |
184 | | - trigger: 'hover' |
185 | | - }; |
186 | | - |
187 | | - // Overwrite this method to provide options on a per-element basis. |
188 | | - // For example, you could store the gravity in a 'tipsy-gravity' attribute: |
189 | | - // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); |
190 | | - // (remember - do not modify 'options' in place!) |
191 | | - $.fn.tipsy.elementOptions = function(ele, options) { |
192 | | - return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; |
193 | | - }; |
194 | | - |
195 | | - $.fn.tipsy.autoNS = function() { |
196 | | - return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; |
197 | | - }; |
198 | | - |
199 | | - $.fn.tipsy.autoWE = function() { |
200 | | - return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; |
201 | | - }; |
202 | | - |
203 | | -})(jQuery); |