r75832 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75831‎ | r75832 | r75833 >
Date:21:17, 1 November 2010
Author:bharris
Status:reverted (Comments)
Tags:
Comment:
* Added tipsy library
* Added associated files for tooltip display
* Added associated css rules for tooltip display
* Updated installer's help system in (most?) places to display help as tooltips instead of show/hide system
* Beginnings of visual changes (e.g., less boxes, more color)
* Modified several of the installer's widget display methods
* Added a couple new i18n values
* Fixed small bug in installer logic:
- Password validation on new users was being executed even if there wasn't a $user object
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/OracleInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/PostgresInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/SqliteInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerOutput.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.tipsy.js (added) (history)
  • /trunk/phase3/skins/common/config.css (modified) (history)
  • /trunk/phase3/skins/common/config.js (modified) (history)
  • /trunk/phase3/skins/common/images/help-question-hover.gif (added) (history)
  • /trunk/phase3/skins/common/images/help-question.gif (added) (history)
  • /trunk/phase3/skins/common/images/tipsy-arrow.gif (added) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/config.js
@@ -1,19 +1,9 @@
22 (function( $ ) {
33 $( document ).ready( function() {
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 -
 4+
 5+ // Generate the tool tips
 6+ $( '.mw-help-field-hint' ).tipsy( { gravity : 'se', opacity: '0.9' } );
 7+
188 // Show/hide code for DB-specific options
199 // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here?
2010 $( '.dbRadio' ).each( function() { $( '#' + $(this).attr( 'rel' ) ).hide(); } );
Index: trunk/phase3/skins/common/config.css
@@ -6,17 +6,23 @@
77 .config-section {
88 margin-top: 2em;
99 }
10 -
11 -.config-label {
12 - clear: left;
 10+.config-block {
 11+ margin-top: 2em;
 12+ display: block;
 13+
 14+}
 15+.config-block-label {
 16+ display: block;
 17+ margin-bottom: .2em;
 18+}
 19+.config-block-label label, .config-label {
1320 font-weight: bold;
14 - width: 10em;
15 - float: left;
16 - text-align: right;
17 - padding-right: 1em;
 21+ padding-right: .5em;
1822 padding-top: .2em;
1923 }
20 -
 24+.config-block-elements {
 25+ margin-left: 2em;
 26+}
2127 .config-input {
2228 clear: left;
2329 zoom: 100%; /* IE hack */
@@ -38,7 +44,7 @@
3945 padding: 0.5em 2em 0.5em 2em;
4046 /* 15em right margin to leave space for 12em page list */
4147 margin: 0.5em 15em 0.5em 0.5em;
42 - border: 1px solid #aaa;
 48+ background: #EEEEEE;
4349 }
4450
4551 .config-submit {
Index: trunk/phase3/skins/common/images/help-question.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/phase3/skins/common/images/help-question.gif
___________________________________________________________________
Added: svn:mime-type
4652 + application/octet-stream
Index: trunk/phase3/skins/common/images/help-question-hover.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/phase3/skins/common/images/help-question-hover.gif
___________________________________________________________________
Added: svn:mime-type
4753 + application/octet-stream
Index: trunk/phase3/skins/common/images/tipsy-arrow.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/phase3/skins/common/images/tipsy-arrow.gif
___________________________________________________________________
Added: svn:mime-type
4854 + application/octet-stream
Index: trunk/phase3/skins/common/shared.css
@@ -913,3 +913,23 @@
914914 list-style-type: -moz-bengali;
915915 list-style-type: bengali;
916916 }
 917+
 918+/* tooltip styles */
 919+.mw-help-field-hint {
 920+ width: 11px;
 921+ height: 24px;
 922+ display: inline-block;
 923+ padding: 0px;
 924+ margin-left: 2px;
 925+ margin-bottom: -8px;
 926+ background: url('images/help-question.gif') 0 50% no-repeat;
 927+}
 928+.mw-help-field-hint:hover {
 929+ background: url('images/help-question-hover.gif') 0 50% no-repeat;
 930+}
 931+.tipsy { padding: 5px 5px 10px; font-size: 12px; position: absolute; z-index: 100000; overflow: visible; }
 932+.tipsy-inner { padding: 5px 8px 4px 8px; background-color: #d6f3ff; color: black; border: 1px solid #5dc9f4; max-width: 300px; text-align: left; }
 933+.tipsy-arrow { position: absolute; background: url( 'images/tipsy-arrow.gif' ) no-repeat top left; width: 13px; height: 13px; }
 934+.tipsy-se .tipsy-arrow { bottom: -2px; right: 10px; background-position: 0% 100%; }
 935+
 936+
Index: trunk/phase3/includes/installer/WebInstaller.php
@@ -605,23 +605,14 @@
606606 array_shift( $args );
607607 $args = array_map( 'htmlspecialchars', $args );
608608 $text = wfMsgReal( $msg, $args, false, false, false );
609 - $html = $this->parse( $text, true );
610 -
 609+ //$html = $this->parse( $text, true );
 610+ $html = $text;
611611 return
612 - "<div class=\"config-help-wrapper\">\n" .
613 - "<div class=\"config-help-message\">\n" .
614 - $html .
615 - "</div>\n" .
616 - "<div class=\"config-show-help\">\n" .
617 - "<a href=\"#\">" .
618 - wfMsgHtml( 'config-show-help' ) .
619 - "</a></div>\n" .
620 - "<div class=\"config-hide-help\">\n" .
621 - "<a href=\"#\">" .
622 - wfMsgHtml( 'config-hide-help' ) .
623 - "</a></div>\n</div>\n";
 612+ "<span class=\"mw-help-field-hint\"\n" .
 613+ " title=\"" . $html . "\"\n" .
 614+ " original-title=\"" . $html . "\"></span>\n";
624615 }
625 -
 616+
626617 /**
627618 * Output a help box.
628619 */
@@ -662,7 +653,7 @@
663654 * Label a control by wrapping a config-input div around it and putting a
664655 * label before it.
665656 */
666 - public function label( $msg, $forId, $contents ) {
 657+ public function label( $msg, $forId, $contents, $helpData = "" ) {
667658 if ( strval( $msg ) == '' ) {
668659 $labelText = '&#160;';
669660 } else {
@@ -676,14 +667,19 @@
677668 }
678669
679670 return
680 - "<div class=\"config-input\">\n" .
 671+ "<div class=\"config-block\">\n" .
 672+ " <div class=\"config-block-label\">\n" .
681673 Xml::tags( 'label',
682674 $attributes,
683675 $labelText ) . "\n" .
684 - $contents .
 676+ $helpData .
 677+ " </div>\n" .
 678+ " <div class=\"config-block-elements\">\n" .
 679+ $contents .
 680+ " </div>\n" .
685681 "</div>\n";
686682 }
687 -
 683+
688684 /**
689685 * Get a labelled text box to configure a variable.
690686 *
@@ -694,6 +690,7 @@
695691 * attribs: Additional attributes for the input element (optional)
696692 * controlName: The name for the input element (optional)
697693 * value: The current value of the variable (optional)
 694+ * help: The html for the help text (optional)
698695 */
699696 public function getTextBox( $params ) {
700697 if ( !isset( $params['controlName'] ) ) {
@@ -707,7 +704,9 @@
708705 if ( !isset( $params['attribs'] ) ) {
709706 $params['attribs'] = array();
710707 }
711 -
 708+ if ( !isset( $params['help'] ) ) {
 709+ $params['help'] = "";
 710+ }
712711 return
713712 $this->label(
714713 $params['label'],
@@ -721,10 +720,11 @@
722721 'class' => 'config-input-text',
723722 'tabindex' => $this->nextTabIndex()
724723 )
725 - )
 724+ ),
 725+ $params['help']
726726 );
727727 }
728 -
 728+
729729 /**
730730 * Get a labelled password box to configure a variable.
731731 *
@@ -736,6 +736,7 @@
737737 * attribs: Additional attributes for the input element (optional)
738738 * controlName: The name for the input element (optional)
739739 * value: The current value of the variable (optional)
 740+ * help: The html for the help text (optional)
740741 */
741742 public function getPasswordBox( $params ) {
742743 if ( !isset( $params['value'] ) ) {
@@ -762,6 +763,7 @@
763764 * attribs: Additional attributes for the input element (optional)
764765 * controlName: The name for the input element (optional)
765766 * value: The current value of the variable (optional)
 767+ * help: The html for the help text (optional)
766768 */
767769 public function getCheckBox( $params ) {
768770 if ( !isset( $params['controlName'] ) ) {
@@ -775,7 +777,9 @@
776778 if ( !isset( $params['attribs'] ) ) {
777779 $params['attribs'] = array();
778780 }
779 -
 781+ if ( !isset( $params['help'] ) ) {
 782+ $params['help'] = "";
 783+ }
780784 if( isset( $params['rawtext'] ) ) {
781785 $labelText = $params['rawtext'];
782786 } else {
@@ -796,6 +800,7 @@
797801 ) .
798802 $labelText . "\n" .
799803 "</label>\n" .
 804+ $params['help'] .
800805 "</div>\n";
801806 }
802807
@@ -812,6 +817,7 @@
813818 * commonAttribs Attribute array applied to all items
814819 * controlName: The name for the input element (optional)
815820 * value: The current value of the variable (optional)
 821+ * help: The html for the help text (optional)
816822 */
817823 public function getRadioSet( $params ) {
818824 if ( !isset( $params['controlName'] ) ) {
@@ -825,13 +831,12 @@
826832 if ( !isset( $params['label'] ) ) {
827833 $label = '';
828834 } else {
829 - $label = $this->parse( wfMsgNoTrans( $params['label'] ) );
 835+ $label = $params['label'];
830836 }
831 -
832 - $s = "<label class=\"config-label\">\n" .
833 - $label .
834 - "</label>\n" .
835 - "<ul class=\"config-settings-block\">\n";
 837+ if ( !isset( $params['help'] ) ) {
 838+ $params['help'] = "";
 839+ }
 840+ $s = "<ul>\n";
836841 foreach ( $params['values'] as $value ) {
837842 $itemAttribs = array();
838843
@@ -859,7 +864,8 @@
860865 }
861866
862867 $s .= "</ul>\n";
863 - return $s;
 868+
 869+ return $this->label( $label, $params['controlName'], $s, $params['help'] );
864870 }
865871
866872 /**
Index: trunk/phase3/includes/installer/WebInstallerOutput.php
@@ -9,11 +9,11 @@
1010 /**
1111 * Output class modelled on OutputPage.
1212 *
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+ *
1818 * @ingroup Deployment
1919 * @since 1.17
2020 */
@@ -21,9 +21,9 @@
2222
2323 /**
2424 * The WebInstaller object this WebInstallerOutput is used by.
25 - *
 25+ *
2626 * @var WebInstaller
27 - */
 27+ */
2828 public $parent;
2929
3030 public $contents = '';
@@ -35,7 +35,7 @@
3636
3737 /**
3838 * Constructor.
39 - *
 39+ *
4040 * @param $parent WebInstaller
4141 */
4242 public function __construct( WebInstaller $parent ) {
@@ -145,6 +145,7 @@
146146 <?php echo Html::linkedStyle( '../skins/common/config.css' ) . "\n"; ?>
147147 <?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?>
148148 <?php echo $this->getJQuery() . "\n"; ?>
 149+ <?php echo $this->getJQueryTipsy() . "\n"; ?>
149150 <?php echo Html::linkedScript( '../skins/common/config.js' ) . "\n"; ?>
150151 </head>
151152
@@ -209,6 +210,7 @@
210211 <?php echo Html::linkedStyle( '../skins/monobook/main.css' ) . "\n"; ?>
211212 <?php echo Html::linkedStyle( '../skins/common/config.css' ) . "\n"; ?>
212213 <?php echo $this->getJQuery(); ?>
 214+ <?php echo $this->getJQueryTipsy() . "\n"; ?>
213215 <?php echo Html::linkedScript( '../skins/common/config.js' ); ?>
214216 </head>
215217
@@ -224,7 +226,10 @@
225227 public function getJQuery() {
226228 return Html::linkedScript( "../resources/jquery/jquery.js" );
227229 }
228 -
 230+ public function getJQueryTipsy() {
 231+ return Html::linkedScript( "../resources/jquery/jquery.tipsy.js" );
 232+ }
 233+
229234 public function outputWarnings() {
230235 $this->addHTML( $this->warnings );
231236 $this->warnings = '';
Index: trunk/phase3/includes/installer/SqliteInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using SQLLite.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -41,10 +41,8 @@
4242 }
4343
4444 public function getConnectForm() {
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' );
 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' ) );
4947 }
5048
5149 public function submitConnectForm() {
Index: trunk/phase3/includes/installer/DatabaseInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Base class for DBMS-specific installation helper classes.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -16,30 +16,30 @@
1717
1818 /**
1919 * The Installer object.
20 - *
 20+ *
2121 * TODO: naming this parent is confusing, 'installer' would be clearer.
22 - *
 22+ *
2323 * @var Installer
2424 */
2525 public $parent;
2626
2727 /**
2828 * The database connection.
29 - *
 29+ *
3030 * @var DatabaseBase
3131 */
3232 public $db;
3333
3434 /**
3535 * Internal variables for installation.
36 - *
 36+ *
3737 * @var array
3838 */
3939 protected $internalDefaults = array();
4040
4141 /**
4242 * Array of MW configuration globals this class uses.
43 - *
 43+ *
4444 * @var array
4545 */
4646 protected $globalNames = array();
@@ -56,7 +56,7 @@
5757
5858 /**
5959 * 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
6161 * whether install or upgrade is required.
6262 *
6363 * If this is called, $this->parent can be assumed to be a WebInstaller.
@@ -65,7 +65,7 @@
6666
6767 /**
6868 * 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
7070 * settings by attempting to connect with them.
7171 *
7272 * If this is called, $this->parent can be assumed to be a WebInstaller.
@@ -77,7 +77,7 @@
7878 /**
7979 * Get HTML for a web form that retrieves settings used for installation.
8080 * $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
8282 * getConnectForm(), this should return false.
8383 */
8484 public function getSettingsForm() {
@@ -87,7 +87,7 @@
8888 /**
8989 * Set variables based on the request array, assuming it was submitted via
9090 * the form return by getSettingsForm().
91 - *
 91+ *
9292 * @return Status
9393 */
9494 public function submitSettingsForm() {
@@ -96,7 +96,7 @@
9797
9898 /**
9999 * 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,
101101 * return a Status object.
102102 *
103103 * This may be called multiple times, so the result should be cached.
@@ -113,7 +113,7 @@
114114
115115 /**
116116 * Create database tables from scratch.
117 - *
 117+ *
118118 * @return Status
119119 */
120120 public function createTables() {
@@ -138,7 +138,7 @@
139139
140140 /**
141141 * Get the DBMS-specific options for LocalSettings.php generation.
142 - *
 142+ *
143143 * @return String
144144 */
145145 public abstract function getLocalSettings();
@@ -187,19 +187,19 @@
188188 */
189189 public function getGlobalNames() {
190190 return $this->globalNames;
191 - }
 191+ }
192192
193193 /**
194194 * Return any table options to be applied to all tables that don't
195195 * override them.
196 - *
 196+ *
197197 * @return Array
198198 */
199199 public function getTableOptions() {
200200 return array();
201201 }
202202
203 - /**
 203+ /**
204204 * Construct and initialise parent.
205205 * This is typically only called from Installer::getDBInstaller()
206206 */
@@ -210,7 +210,7 @@
211211 /**
212212 * Convenience function.
213213 * Check if a named extension is present.
214 - *
 214+ *
215215 * @see wfDl
216216 */
217217 protected static function checkExtension( $name ) {
@@ -266,15 +266,19 @@
267267 /**
268268 * Get a labelled text box to configure a local variable.
269269 */
270 - public function getTextBox( $var, $label, $attribs = array() ) {
 270+ public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) {
271271 $name = $this->getName() . '_' . $var;
272272 $value = $this->getVar( $var );
 273+ if ( !isset( $attribs ) ) {
 274+ $attribs = array();
 275+ }
273276 return $this->parent->getTextBox( array(
274277 'var' => $var,
275278 'label' => $label,
276279 'attribs' => $attribs,
277280 'controlName' => $name,
278 - 'value' => $value
 281+ 'value' => $value,
 282+ 'help' => $helpData
279283 ) );
280284 }
281285
@@ -282,22 +286,26 @@
283287 * Get a labelled password box to configure a local variable.
284288 * Implements password hiding.
285289 */
286 - public function getPasswordBox( $var, $label, $attribs = array() ) {
 290+ public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) {
287291 $name = $this->getName() . '_' . $var;
288292 $value = $this->getVar( $var );
 293+ if ( !isset( $attribs ) ) {
 294+ $attribs = array();
 295+ }
289296 return $this->parent->getPasswordBox( array(
290297 'var' => $var,
291298 'label' => $label,
292299 'attribs' => $attribs,
293300 'controlName' => $name,
294 - 'value' => $value
 301+ 'value' => $value,
 302+ 'help' => $helpData
295303 ) );
296304 }
297305
298306 /**
299307 * Get a labelled checkbox to configure a local boolean variable.
300308 */
301 - public function getCheckBox( $var, $label, $attribs = array() ) {
 309+ public function getCheckBox( $var, $label, $attribs = array(), $helpData = "" ) {
302310 $name = $this->getName() . '_' . $var;
303311 $value = $this->getVar( $var );
304312 return $this->parent->getCheckBox( array(
@@ -306,6 +314,7 @@
307315 'attribs' => $attribs,
308316 'controlName' => $name,
309317 'value' => $value,
 318+ 'help' => $helpData
310319 ));
311320 }
312321
@@ -338,11 +347,11 @@
339348 }
340349
341350 /**
342 - * Determine whether an existing installation of MediaWiki is present in
343 - * the configured administrative connection. Returns true if there is
 351+ * Determine whether an existing installation of MediaWiki is present in
 352+ * the configured administrative connection. Returns true if there is
344353 * such a wiki, false if the database doesn't exist.
345354 *
346 - * Traditionally, this is done by testing for the existence of either
 355+ * Traditionally, this is done by testing for the existence of either
347356 * the revision table or the cur table.
348357 *
349358 * @return Boolean
@@ -366,9 +375,8 @@
367376 return
368377 Xml::openElement( 'fieldset' ) .
369378 Xml::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) .
370 - $this->getTextBox( '_InstallUser', 'config-db-username' ) .
371 - $this->getPasswordBox( '_InstallPassword', 'config-db-password' ) .
372 - $this->parent->getHelpBox( 'config-db-install-help' ) .
 379+ $this->getTextBox( '_InstallUser', 'config-db-username', array(), $this->parent->getHelpBox( 'config-db-install-username' ) ) .
 380+ $this->getPasswordBox( '_InstallPassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-install-password' ) ) .
373381 Xml::closeElement( 'fieldset' );
374382 }
375383
@@ -389,7 +397,7 @@
390398 $name = $this->getName();
391399 $s = Xml::openElement( 'fieldset' ) .
392400 Xml::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
393 - $this->getCheckBox(
 401+ $this->getCheckBox(
394402 '_SameAccount', 'config-db-web-account-same',
395403 array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' )
396404 ) .
@@ -408,7 +416,7 @@
409417
410418 /**
411419 * Submit the form from getWebUserBox().
412 - *
 420+ *
413421 * @return Status
414422 */
415423 public function submitWebUserBox() {
Index: trunk/phase3/includes/installer/MysqlInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using MySQL.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -59,14 +59,11 @@
6060
6161 public function getConnectForm() {
6262 return
63 - $this->getTextBox( 'wgDBserver', 'config-db-host' ) .
64 - $this->parent->getHelpBox( 'config-db-host-help' ) .
 63+ $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
6564 Xml::openElement( 'fieldset' ) .
6665 Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
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' ) .
 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' ) ) .
7168 Xml::closeElement( 'fieldset' ) .
7269 $this->getInstallUserBox();
7370 }
@@ -120,7 +117,7 @@
121118 $this->getVar( '_InstallPassword' ),
122119 false,
123120 false,
124 - 0,
 121+ 0,
125122 $this->getVar( 'wgDBprefix' )
126123 );
127124 $status->value = $this->db;
@@ -252,12 +249,12 @@
253250 if ( count( $parts ) != 2 ) {
254251 return false;
255252 }
256 - $quotedUser = $conn->addQuotes( $parts[0] ) .
 253+ $quotedUser = $conn->addQuotes( $parts[0] ) .
257254 '@' . $conn->addQuotes( $parts[1] );
258255
259256 // The user needs to have INSERT on mysql.* to be able to CREATE USER
260257 // The grantee will be double-quoted in this query, as required
261 - $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*',
 258+ $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*',
262259 array( 'GRANTEE' => $quotedUser ), __METHOD__ );
263260 $insertMysql = false;
264261 $grantOptions = array_flip( $this->webUserPrivs );
@@ -273,7 +270,7 @@
274271 // Check for DB-specific privs for mysql.*
275272 if ( !$insertMysql ) {
276273 $row = $conn->selectRow( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
277 - array(
 274+ array(
278275 'GRANTEE' => $quotedUser,
279276 'TABLE_SCHEMA' => 'mysql',
280277 'PRIVILEGE_TYPE' => 'INSERT',
@@ -288,7 +285,7 @@
289286 }
290287
291288 // Check for DB-level grant options
292 - $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
 289+ $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
293290 array(
294291 'GRANTEE' => $quotedUser,
295292 'IS_GRANTABLE' => 1,
@@ -322,9 +319,9 @@
323320 }
324321 if ( count( $engines ) >= 2 ) {
325322 $s .= $this->getRadioSet( array(
326 - 'var' => '_MysqlEngine',
327 - 'label' => 'config-mysql-engine',
328 - 'itemLabelPrefix' => 'config-mysql-',
 323+ 'var' => '_MysqlEngine',
 324+ 'label' => 'config-mysql-engine',
 325+ 'itemLabelPrefix' => 'config-mysql-',
329326 'values' => $engines
330327 ));
331328 $s .= $this->parent->getHelpBox( 'config-mysql-engine-help' );
@@ -369,13 +366,13 @@
370367 if ( !$create ) {
371368 // Test the web account
372369 try {
373 - $webConn = new Database(
 370+ $webConn = new Database(
374371 $this->getVar( 'wgDBserver' ),
375372 $this->getVar( 'wgDBuser' ),
376373 $this->getVar( 'wgDBpassword' ),
377374 false,
378375 false,
379 - 0,
 376+ 0,
380377 $this->getVar( 'wgDBprefix' )
381378 );
382379 } catch ( DBConnectionError $e ) {
Index: trunk/phase3/includes/installer/OracleInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using Oracle.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -47,8 +47,7 @@
4848 Xml::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
4949 Xml::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) .
5050 $this->getTextBox( 'wgDBuser', 'config-db-username' ) .
51 - $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) .
52 - $this->parent->getHelpBox( 'config-db-web-help' ).
 51+ $this->getPasswordBox( 'wgDBpassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-web-help' ) ) .
5352 $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create', array( 'disabled' => true ) ).
5453 Xml::closeElement( 'div' ) . Xml::closeElement( 'fieldset' );
5554 }
@@ -57,14 +56,12 @@
5857 $this->parent->setVar( '_InstallUser', 'sys' );
5958 $this->parent->setVar( 'wgDBserver', '' );
6059 return
61 - $this->getTextBox( 'wgDBserver', 'config-db-host-oracle' ) .
62 - $this->parent->getHelpBox( 'config-db-host-oracle-help' ) .
 60+ $this->getTextBox( 'wgDBserver', 'config-db-host-oracle', array(), $this->parent->getHelpBox( 'config-db-host-oracle-help' ) ) .
6361 Xml::openElement( 'fieldset' ) .
6462 Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
6563 $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
6664 $this->getTextBox( '_OracleDefTS', 'config-oracle-def-ts' ) .
67 - $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts' ) .
68 - $this->parent->getHelpBox( 'config-db-oracle-help' ) .
 65+ $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts', array(), $this->parent->getHelpBox( 'config-db-oracle-help' ) ) .
6966 Xml::closeElement( 'fieldset' ) .
7067 $this->getInstallUserBox().
7168 $this->getWebUserBox();
Index: trunk/phase3/includes/installer/PostgresInstaller.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Class for setting up the MediaWiki database using Postgres.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -36,23 +36,20 @@
3737
3838 function getConnectForm() {
3939 return
40 - $this->getTextBox( 'wgDBserver', 'config-db-host' ) .
41 - $this->parent->getHelpBox( 'config-db-host-help' ) .
 40+ $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
4241 $this->getTextBox( 'wgDBport', 'config-db-port' ) .
4342 Xml::openElement( 'fieldset' ) .
4443 Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
45 - $this->getTextBox( 'wgDBname', 'config-db-name' ) .
46 - $this->parent->getHelpBox( 'config-db-name-help' ) .
47 - $this->getTextBox( 'wgDBmwschema', 'config-db-schema' ) .
 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' ) ) .
4846 $this->getTextBox( 'wgDBts2schema', 'config-db-ts2-schema' ) .
49 - $this->parent->getHelpBox( 'config-db-schema-help' ) .
5047 Xml::closeElement( 'fieldset' ) .
5148 $this->getInstallUserBox();
5249 }
5350
5451 function submitConnectForm() {
5552 // Get variables from the request
56 - $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
 53+ $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
5754 'wgDBname', 'wgDBmwschema', 'wgDBts2schema' ) );
5855
5956 // Validate them
Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -8,7 +8,7 @@
99
1010 /**
1111 * Abstract class to define pages for the web installer.
12 - *
 12+ *
1313 * @ingroup Deployment
1414 * @since 1.17
1515 */
@@ -16,7 +16,7 @@
1717
1818 /**
1919 * The WebInstaller object this WebInstallerPage belongs to.
20 - *
 20+ *
2121 * @var WebInstaller
2222 */
2323 public $parent;
@@ -25,7 +25,7 @@
2626
2727 /**
2828 * Constructor.
29 - *
 29+ *
3030 * @param $parent WebInstaller
3131 */
3232 public function __construct( WebInstaller $parent ) {
@@ -216,13 +216,15 @@
217217 }
218218 $this->startForm();
219219 $s = Html::hidden( 'LanguageRequestTime', time() ) .
220 - $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang ) .
221 - $this->parent->getHelpBox( 'config-your-language-help' ) .
222 - $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang ) .
223 - $this->parent->getHelpBox( 'config-wiki-language-help' ) .
224 - $this->parent->getCheckBox(
225 - array( 'var' => '_ExternalHTTP', 'label' => 'config-allow-requests' )
226 - ) . $this->parent->getHelpBox( 'config-allow-requests-help' );
 220+ $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang, $this->parent->getHelpBox( 'config-your-language-help' ) ) .
 221+ $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang, $this->parent->getHelpBox( 'config-wiki-language-help' ) ) .
 222+ $this->parent->getCheckBox(
 223+ array(
 224+ 'var' => '_ExternalHTTP',
 225+ 'label' => 'config-allow-requests',
 226+ 'help' => $this->parent->getHelpBox( 'config-allow-requests-help' )
 227+ )
 228+ );
227229
228230 $this->addHTML( $s );
229231 $this->endForm();
@@ -259,7 +261,7 @@
260262 $this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) );
261263 $status = $this->parent->doEnvironmentChecks();
262264 if ( $status ) {
263 - $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
 265+ $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
264266 SpecialVersion::getCopyrightAndAuthorList() ) );
265267 $this->startForm();
266268 $this->endForm();
@@ -291,7 +293,7 @@
292294 $dbSupport = '';
293295 foreach( $this->parent->getDBTypes() as $type ) {
294296 $db = 'Database' . ucfirst( $type );
295 - $dbSupport .= wfMsgNoTrans( "config-support-$type",
 297+ $dbSupport .= wfMsgNoTrans( "config-support-$type",
296298 call_user_func( array( $db, 'getSoftwareLink' ) ) ) . "\n";
297299 }
298300 $this->addHTML( $this->parent->getInfoBox(
@@ -460,21 +462,22 @@
461463 $this->parent->getTextBox( array(
462464 'var' => 'wgSitename',
463465 'label' => 'config-site-name',
 466+ 'help' => $this->parent->getHelpBox( 'config-site-name-help' )
464467 ) ) .
465 - $this->parent->getHelpBox( 'config-site-name-help' ) .
466468 $this->parent->getRadioSet( array(
467469 'var' => '_NamespaceType',
468470 'label' => 'config-project-namespace',
469471 'itemLabelPrefix' => 'config-ns-',
470472 'values' => array( 'site-name', 'generic', 'other' ),
471473 'commonAttribs' => array( 'class' => 'enableForOther', 'rel' => 'config_wgMetaNamespace' ),
 474+ 'help' => $this->parent->getHelpBox( 'config-project-namespace-help' )
472475 ) ) .
473476 $this->parent->getTextBox( array(
474477 'var' => 'wgMetaNamespace',
475478 'label' => '',
476479 'attribs' => array( 'disabled' => '' ),
 480+
477481 ) ) .
478 - $this->parent->getHelpBox( 'config-project-namespace-help' ) .
479482 $this->getFieldSetStart( 'config-admin-box' ) .
480483 $this->parent->getTextBox( array(
481484 'var' => '_AdminName',
@@ -483,22 +486,22 @@
484487 $this->parent->getPasswordBox( array(
485488 'var' => '_AdminPassword',
486489 'label' => 'config-admin-password',
 490+ 'help' => $this->parent->getHelpBox( 'config-admin-help' )
487491 ) ) .
488492 $this->parent->getPasswordBox( array(
489493 'var' => '_AdminPassword2',
490494 'label' => 'config-admin-password-confirm'
491495 ) ) .
492 - $this->parent->getHelpBox( 'config-admin-help' ) .
493496 $this->parent->getTextBox( array(
494497 'var' => '_AdminEmail',
495 - 'label' => 'config-admin-email'
 498+ 'label' => 'config-admin-email',
 499+ 'help' => $this->parent->getHelpBox( 'config-admin-email-help' )
496500 ) ) .
497 - $this->parent->getHelpBox( 'config-admin-email-help' ) .
498501 $this->parent->getCheckBox( array(
499502 'var' => '_Subscribe',
500 - 'label' => 'config-subscribe'
 503+ 'label' => 'config-subscribe',
 504+ 'help' => $this->parent->getHelpBox( 'config-subscribe-help' )
501505 ) ) .
502 - $this->parent->getHelpBox( 'config-subscribe-help' ) .
503506 $this->getFieldSetEnd() .
504507 $this->parent->getInfoBox( wfMsg( 'config-almost-done' ) ) .
505508 $this->parent->getRadioSet( array(
@@ -580,9 +583,12 @@
581584
582585 // Validate password
583586 $msg = false;
 587+ $valid = false;
584588 $pwd = $this->getVar( '_AdminPassword' );
585589 $user = User::newFromName( $cname );
586 - $valid = $user->getPasswordValidity( $pwd );
 590+ if ( ( isset ( $pwd ) ) && ( $user != null ) ) {
 591+ $valid = $user->getPasswordValidity( $pwd );
 592+ }
587593 if ( strval( $pwd ) === '' ) {
588594 # $user->getPasswordValidity just checks for $wgMinimalPasswordLength.
589595 # This message is more specific and helpful.
@@ -690,31 +696,31 @@
691697 }
692698
693699 $extHtml .= $this->parent->getHelpBox( 'config-extensions-help' ) .
694 - $this->getFieldSetEnd();
 700+ $this->getFieldSetEnd();
695701 $this->addHTML( $extHtml );
696702 }
697703
698704 $this->addHTML(
699705 # Uploading
700706 $this->getFieldSetStart( 'config-upload-settings' ) .
701 - $this->parent->getCheckBox( array(
 707+ $this->parent->getCheckBox( array(
702708 'var' => 'wgEnableUploads',
703709 'label' => 'config-upload-enable',
704710 'attribs' => array( 'class' => 'showHideRadio', 'rel' => 'uploadwrapper' ),
 711+ 'help' => $this->parent->getHelpBox( 'config-upload-help' )
705712 ) ) .
706 - $this->parent->getHelpBox( 'config-upload-help' ) .
707713 '<div id="uploadwrapper" style="display: none;">' .
708 - $this->parent->getTextBox( array(
 714+ $this->parent->getTextBox( array(
709715 'var' => 'wgDeletedDirectory',
710716 'label' => 'config-upload-deleted',
 717+ 'help' => $this->parent->getHelpBox( 'config-upload-deleted-help' )
711718 ) ) .
712 - $this->parent->getHelpBox( 'config-upload-deleted-help' ) .
713719 '</div>' .
714720 $this->parent->getTextBox( array(
715721 'var' => 'wgLogo',
716 - 'label' => 'config-logo'
717 - ) ) .
718 - $this->parent->getHelpBox( 'config-logo-help' )
 722+ 'label' => 'config-logo',
 723+ 'help' => $this->parent->getHelpBox( 'config-logo-help' )
 724+ ) )
719725 );
720726 $canUse = $this->getVar( '_ExternalHTTP' ) ?
721727 'config-instantcommons-good' : 'config-instantcommons-bad';
@@ -722,8 +728,8 @@
723729 $this->parent->getCheckBox( array(
724730 'var' => 'wgUseInstantCommons',
725731 'label' => 'config-instantcommons',
 732+ 'help' => $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) )
726733 ) ) .
727 - $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) ) .
728734 $this->getFieldSetEnd()
729735 );
730736
@@ -749,8 +755,9 @@
750756 $this->parent->getTextBox( array(
751757 'var' => '_MemCachedServers',
752758 'label' => 'config-memcached-servers',
 759+ 'help' => $this->parent->getHelpBox( 'config-memcached-help' )
753760 ) ) .
754 - $this->parent->getHelpBox( 'config-memcached-help' ) . '</div>' .
 761+ '</div>' .
755762 $this->getFieldSetEnd()
756763 );
757764 $this->endForm();
Index: trunk/phase3/resources/jquery/jquery.tipsy.js
@@ -0,0 +1,202 @@
 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);

Follow-up revisions

RevisionCommit summaryAuthorDate
r75836Followup r75832, fix svn properties of newly added filesreedy22:44, 1 November 2010
r75866Followup r75832, use shorthanddemon19:08, 2 November 2010
r76314Followup r75832: rm unused inline CSS and unused show/hide messagedemon16:25, 8 November 2010
r76315More followup r76314, r75832: more unused CSS, unused help imagedemon16:30, 8 November 2010
r77860Reverted r75832 per my comments on CR, unanswered for 19 days. Moving all hel...tstarling07:08, 6 December 2010
r77898Revert r77860, which was a reversion of r75832. ...bharris20:04, 6 December 2010
r77929* Fix issues brought up in r75832...bharris23:13, 6 December 2010

Comments

#Comment by Jorm (WMF) (talk | contribs)   21:30, 1 November 2010

It appears my i18n changes got conflicted into oblivion.

#Comment by Catrope (talk | contribs)   22:49, 1 November 2010

That's not all that got conflicted, this revision contains many unrelated changes, for instance

-		return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir' ) .
-			$this->parent->getHelpBox( 'config-sqlite-dir-help' ) .
-			$this->getTextBox( 'wgDBname', 'config-db-name' ) .
-			$this->parent->getHelpBox( 'config-sqlite-name-help' );
+		return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir', array(), $this->parent->getHelpBox( 'config-sqlite-dir-help' ) ) .
+			$this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-sqlite-name-help' ) );

and probably lots more. I'm not too familiar with the new installer, so someone who is should examine the diff carefully.

#Comment by Jorm (WMF) (talk | contribs)   23:11, 1 November 2010

That change was listed ("Modified several of the installer's widget display methods") - but that could possibly have been clearer.

Some of the widgets are defined multiple times with differing method signatures. I needed to move the "helpboxes" inside of the display methods across the board and in some cases the only way to do this was to add them as the last argument (which necessitated supplying an empty array() in some places, as shown in the example you pasted).

#Comment by Catrope (talk | contribs)   23:13, 1 November 2010

So it is, I missed that.

#Comment by MaxSem (talk | contribs)   11:24, 2 November 2010

There were whitespace-only changes on some lines, please try to avoid mixing them with other changes.

#Comment by 😂 (talk | contribs)   11:33, 2 November 2010

At first glance, this looks ok. Need to svn up and check though. One thing does stand out:

+	background: #EEEEEE;

Was this intentional, or left over from testing?

#Comment by Jorm (WMF) (talk | contribs)   16:50, 2 November 2010

It's intentional but it's part of a longer-term visual shift. I'm not done with it but I wanted to get this landed to avoid further conflicts.

#Comment by 😂 (talk | contribs)   16:50, 2 November 2010

Ok :)

#Comment by Krinkle (talk | contribs)   23:22, 5 November 2010

I see typsy was added as a plugin. Is there a reason not to use jQuery UI's tooltip ability ?

#Comment by MaxSem (talk | contribs)   18:26, 8 November 2010

Some help messages (ex.: config-sqlite-dir-help contain formatting, for example <code>. They're broken by this rev, as HTML tags are escaped in tooltips.

#Comment by MaxSem (talk | contribs)   18:30, 8 November 2010

Some minor nitpicking:

  • Question mark in a square looks slightly like checkbox. Proably, it could be enlarged a bit to reduce confusion?
  • Help messages are now impossible to copy+paste, which could be needed for support requests aka "but your installer said this and that".
#Comment by Tim Starling (talk | contribs)   12:06, 17 November 2010

I don't like them. Can we have the old help boxes back?

On the DBSettings page, they go off the left margin, so you can only read the second half of each line. The HTML formatting has gone away, meaning that we lose lots of formatting and links. In fact, proper HTML escaping is missing:

		//$html = $this->parse( $text, true );
    $html = $text;
		return
            "<span class=\"mw-help-field-hint\"\n" .
      	    "     title=\"" . $html . "\"\n" .
    	    "     original-title=\"" . $html . "\"></span>\n";

meaning that many pages are generating invalid HTML, since many of the messages have double quotes in them. There may even be XSS. The behaviour when JS is disabled is bad, the trigger on hover instead of mouseover is non-obvious, and some browsers won't display such a long tooltip. And I know that alpha/opacity is the latest cool thing in web design, but it makes foreground text harder to read when you have a low-contrast version of some other text in the background.

But the main problem, I think, is that tooltips are the wrong kind of display element to use when you want to show a large amount of text. They obscure what is underneath them, you can't select text in them or copy from them. You could make them stay up for a bit longer to enable things like text selection and links, but then the complaint would be that they randomly disappear when you're just about to do something with them.

#Comment by 😂 (talk | contribs)   17:40, 29 December 2010

Re-marking reverted (because it was).

It was re-added in r77898 and had fixes in r77929, so those should be the points of review now.

Status & tagging log