r77860 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77859‎ | r77860 | r77861 >
Date:07:08, 6 December 2010
Author:tstarling
Status:reverted (Comments)
Tags:
Comment:
Reverted r75832 per my comments on CR, unanswered for 19 days. Moving all help information into tooltips is a step backwards for usability. Reverted followups r75836, r75866, r76314 and r76315.
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.i18n.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 (deleted) (history)
  • /trunk/phase3/skins/common/config.css (modified) (history)
  • /trunk/phase3/skins/common/config.js (modified) (history)
  • /trunk/phase3/skins/common/images/help-22.png (added) (history)
  • /trunk/phase3/skins/common/images/help-question-hover.gif (deleted) (history)
  • /trunk/phase3/skins/common/images/help-question.gif (deleted) (history)
  • /trunk/phase3/skins/common/images/tipsy-arrow.gif (deleted) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/config.js
@@ -1,9 +1,19 @@
22 (function( $ ) {
33 $( 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+
818 // Show/hide code for DB-specific options
919 // FIXME: Do we want slow, fast, or even non-animated (instantaneous) showing/hiding here?
1020 $( '.dbRadio' ).each( function() { $( '#' + $(this).attr( 'rel' ) ).hide(); } );
Index: trunk/phase3/skins/common/config.css
@@ -6,23 +6,17 @@
77 .config-section {
88 margin-top: 2em;
99 }
10 -.config-block {
11 - margin-top: 2em;
12 - display: block;
1310
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;
2013 font-weight: bold;
21 - padding-right: .5em;
 14+ width: 10em;
 15+ float: left;
 16+ text-align: right;
 17+ padding-right: 1em;
2218 padding-top: .2em;
2319 }
24 -.config-block-elements {
25 - margin-left: 2em;
26 -}
 20+
2721 .config-block-elements li {
2822 list-style: none;
2923 }
@@ -48,7 +42,7 @@
4943 .config-page {
5044 padding: 0.5em 0.5em 0.5em 2em;
5145 margin: 0.5em 0.5em 0.5em 0.5em;
52 - background: #eee;
 46+ border: 1px solid #aaa;
5347 }
5448
5549 .config-submit {
@@ -92,6 +86,29 @@
9387 font-weight: bold;
9488 }
9589
 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+
96113 .config-message {
97114 display: list-item;
98115 line-height: 1.5em;
@@ -142,7 +159,7 @@
143160 .config-cc-wrapper {
144161 clear: left;
145162 /* If you change this height, also change it in WebInstaller_Options::submitCC() */
146 - height: 54em;
 163+ height: 54em;
147164 }
148165
149166 .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
150167 + image/png
Index: trunk/phase3/skins/common/shared.css
@@ -917,23 +917,3 @@
918918 list-style-type: -moz-bengali;
919919 list-style-type: bengali;
920920 }
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 @@
614614 array_shift( $args );
615615 $args = array_map( 'htmlspecialchars', $args );
616616 $text = wfMsgReal( $msg, $args, false, false, false );
617 - $html = htmlspecialchars( $text );
618 - //$html = $this->parse( $text, true );
 617+ $html = $this->parse( $text, true );
 618+
619619 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";
623632 }
624633
625634 /**
@@ -661,7 +670,7 @@
662671 * Label a control by wrapping a config-input div around it and putting a
663672 * label before it.
664673 */
665 - public function label( $msg, $forId, $contents, $helpData = "" ) {
 674+ public function label( $msg, $forId, $contents ) {
666675 if ( strval( $msg ) == '' ) {
667676 $labelText = '&#160;';
668677 } else {
@@ -675,16 +684,11 @@
676685 }
677686
678687 return
679 - "<div class=\"config-block\">\n" .
680 - " <div class=\"config-block-label\">\n" .
 688+ "<div class=\"config-input\">\n" .
681689 Xml::tags( 'label',
682690 $attributes,
683691 $labelText ) . "\n" .
684 - $helpData .
685 - " </div>\n" .
686 - " <div class=\"config-block-elements\">\n" .
687 - $contents .
688 - " </div>\n" .
 692+ $contents .
689693 "</div>\n";
690694 }
691695
@@ -698,7 +702,6 @@
699703 * attribs: Additional attributes for the input element (optional)
700704 * controlName: The name for the input element (optional)
701705 * value: The current value of the variable (optional)
702 - * help: The html for the help text (optional)
703706 */
704707 public function getTextBox( $params ) {
705708 if ( !isset( $params['controlName'] ) ) {
@@ -712,9 +715,7 @@
713716 if ( !isset( $params['attribs'] ) ) {
714717 $params['attribs'] = array();
715718 }
716 - if ( !isset( $params['help'] ) ) {
717 - $params['help'] = "";
718 - }
 719+
719720 return
720721 $this->label(
721722 $params['label'],
@@ -728,8 +729,7 @@
729730 'class' => 'config-input-text',
730731 'tabindex' => $this->nextTabIndex()
731732 )
732 - ),
733 - $params['help']
 733+ )
734734 );
735735 }
736736
@@ -744,7 +744,6 @@
745745 * attribs: Additional attributes for the input element (optional)
746746 * controlName: The name for the input element (optional)
747747 * value: The current value of the variable (optional)
748 - * help: The html for the help text (optional)
749748 */
750749 public function getPasswordBox( $params ) {
751750 if ( !isset( $params['value'] ) ) {
@@ -771,7 +770,6 @@
772771 * attribs: Additional attributes for the input element (optional)
773772 * controlName: The name for the input element (optional)
774773 * value: The current value of the variable (optional)
775 - * help: The html for the help text (optional)
776774 */
777775 public function getCheckBox( $params ) {
778776 if ( !isset( $params['controlName'] ) ) {
@@ -785,9 +783,7 @@
786784 if ( !isset( $params['attribs'] ) ) {
787785 $params['attribs'] = array();
788786 }
789 - if ( !isset( $params['help'] ) ) {
790 - $params['help'] = "";
791 - }
 787+
792788 if( isset( $params['rawtext'] ) ) {
793789 $labelText = $params['rawtext'];
794790 } else {
@@ -807,7 +803,6 @@
808804 ) .
809805 $labelText . "\n" .
810806 "</label>\n" .
811 - $params['help'] .
812807 "</div>\n";
813808 }
814809
@@ -824,7 +819,6 @@
825820 * commonAttribs Attribute array applied to all items
826821 * controlName: The name for the input element (optional)
827822 * value: The current value of the variable (optional)
828 - * help: The html for the help text (optional)
829823 */
830824 public function getRadioSet( $params ) {
831825 if ( !isset( $params['controlName'] ) ) {
@@ -838,12 +832,13 @@
839833 if ( !isset( $params['label'] ) ) {
840834 $label = '';
841835 } else {
842 - $label = $params['label'];
 836+ $label = $this->parse( wfMsgNoTrans( $params['label'] ) );
843837 }
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";
848843 foreach ( $params['values'] as $value ) {
849844 $itemAttribs = array();
850845
@@ -871,8 +866,7 @@
872867 }
873868
874869 $s .= "</ul>\n";
875 -
876 - return $this->label( $label, $params['controlName'], $s, $params['help'] );
 870+ return $s;
877871 }
878872
879873 /**
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -31,6 +31,8 @@
3232 'config-no-session' => 'Your session data was lost!
3333 Check your php.ini and make sure <code>session.save_path</code> is set to an appropriate directory.',
3434 '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',
3537 'config-your-language' => 'Your language:',
3638 'config-your-language-help' => 'Select a language to use during the installation process.',
3739 'config-wiki-language' => 'Wiki language:',
Index: trunk/phase3/includes/installer/WebInstallerOutput.php
@@ -9,20 +9,20 @@
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 */
2121 class WebInstallerOutput {
2222 /**
2323 * The WebInstaller object this WebInstallerOutput is used by.
24 - *
 24+ *
2525 * @var WebInstaller
26 - */
 26+ */
2727 public $parent;
2828
2929 /**
@@ -47,7 +47,7 @@
4848
4949 /**
5050 * Constructor.
51 - *
 51+ *
5252 * @param $parent WebInstaller
5353 */
5454 public function __construct( WebInstaller $parent ) {
@@ -182,11 +182,16 @@
183183 <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?>
184184 <?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?>
185185 <?php echo $this->getJQuery() . "\n"; ?>
186 - <?php echo $this->getJQueryTipsy() . "\n"; ?>
187186 <?php echo Html::linkedScript( '../skins/common/config.js' ) . "\n"; ?>
188187 </head>
189188
190189 <?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>
191196 <div id="mw-page-base"></div>
192197 <div id="mw-head-base"></div>
193198 <div id="content">
@@ -236,7 +241,6 @@
237242 <title><?php $this->outputTitle(); ?></title>
238243 <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?>
239244 <?php echo $this->getJQuery(); ?>
240 - <?php echo $this->getJQueryTipsy() . "\n"; ?>
241245 <?php echo Html::linkedScript( '../skins/common/config.js' ); ?>
242246 </head>
243247
@@ -252,7 +256,10 @@
253257 public function getJQuery() {
254258 return Html::linkedScript( "../resources/jquery/jquery.js" );
255259 }
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 = '';
258264 }
 265+
259266 }
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,8 +41,10 @@
4242 }
4343
4444 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' );
4749 }
4850
4951 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 *
102102 * This may be called multiple times, so the result should be cached.
103103 *
@@ -114,7 +114,7 @@
115115
116116 /**
117117 * Create database tables from scratch.
118 - *
 118+ *
119119 * @return Status
120120 */
121121 public function createTables() {
@@ -139,7 +139,7 @@
140140
141141 /**
142142 * Get the DBMS-specific options for LocalSettings.php generation.
143 - *
 143+ *
144144 * @return String
145145 */
146146 public abstract function getLocalSettings();
@@ -188,19 +188,19 @@
189189 */
190190 public function getGlobalNames() {
191191 return $this->globalNames;
192 - }
 192+ }
193193
194194 /**
195195 * Return any table options to be applied to all tables that don't
196196 * override them.
197 - *
 197+ *
198198 * @return Array
199199 */
200200 public function getTableOptions() {
201201 return array();
202202 }
203203
204 - /**
 204+ /**
205205 * Construct and initialise parent.
206206 * This is typically only called from Installer::getDBInstaller()
207207 */
@@ -211,7 +211,7 @@
212212 /**
213213 * Convenience function.
214214 * Check if a named extension is present.
215 - *
 215+ *
216216 * @see wfDl
217217 */
218218 protected static function checkExtension( $name ) {
@@ -267,19 +267,15 @@
268268 /**
269269 * Get a labelled text box to configure a local variable.
270270 */
271 - public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) {
 271+ public function getTextBox( $var, $label, $attribs = array() ) {
272272 $name = $this->getName() . '_' . $var;
273273 $value = $this->getVar( $var );
274 - if ( !isset( $attribs ) ) {
275 - $attribs = array();
276 - }
277274 return $this->parent->getTextBox( array(
278275 'var' => $var,
279276 'label' => $label,
280277 'attribs' => $attribs,
281278 'controlName' => $name,
282 - 'value' => $value,
283 - 'help' => $helpData
 279+ 'value' => $value
284280 ) );
285281 }
286282
@@ -287,26 +283,22 @@
288284 * Get a labelled password box to configure a local variable.
289285 * Implements password hiding.
290286 */
291 - public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) {
 287+ public function getPasswordBox( $var, $label, $attribs = array() ) {
292288 $name = $this->getName() . '_' . $var;
293289 $value = $this->getVar( $var );
294 - if ( !isset( $attribs ) ) {
295 - $attribs = array();
296 - }
297290 return $this->parent->getPasswordBox( array(
298291 'var' => $var,
299292 'label' => $label,
300293 'attribs' => $attribs,
301294 'controlName' => $name,
302 - 'value' => $value,
303 - 'help' => $helpData
 295+ 'value' => $value
304296 ) );
305297 }
306298
307299 /**
308300 * Get a labelled checkbox to configure a local boolean variable.
309301 */
310 - public function getCheckBox( $var, $label, $attribs = array(), $helpData = "" ) {
 302+ public function getCheckBox( $var, $label, $attribs = array() ) {
311303 $name = $this->getName() . '_' . $var;
312304 $value = $this->getVar( $var );
313305 return $this->parent->getCheckBox( array(
@@ -315,7 +307,6 @@
316308 'attribs' => $attribs,
317309 'controlName' => $name,
318310 'value' => $value,
319 - 'help' => $helpData
320311 ));
321312 }
322313
@@ -348,11 +339,11 @@
349340 }
350341
351342 /**
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
354345 * such a wiki, false if the database doesn't exist.
355346 *
356 - * Traditionally, this is done by testing for the existence of either
 347+ * Traditionally, this is done by testing for the existence of either
357348 * the revision table or the cur table.
358349 *
359350 * @return Boolean
@@ -376,8 +367,9 @@
377368 return
378369 Html::openElement( 'fieldset' ) .
379370 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' ) .
382374 Html::closeElement( 'fieldset' );
383375 }
384376
@@ -397,7 +389,7 @@
398390 public function getWebUserBox( $noCreateMsg = false ) {
399391 $s = Html::openElement( 'fieldset' ) .
400392 Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
401 - $this->getCheckBox(
 393+ $this->getCheckBox(
402394 '_SameAccount', 'config-db-web-account-same',
403395 array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' )
404396 ) .
@@ -416,7 +408,7 @@
417409
418410 /**
419411 * Submit the form from getWebUserBox().
420 - *
 412+ *
421413 * @return Status
422414 */
423415 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,11 +59,14 @@
6060
6161 public function getConnectForm() {
6262 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' ) .
6465 Html::openElement( 'fieldset' ) .
6566 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' ) .
6871 Html::closeElement( 'fieldset' ) .
6972 $this->getInstallUserBox();
7073 }
@@ -117,7 +120,7 @@
118121 $this->getVar( '_InstallPassword' ),
119122 false,
120123 false,
121 - 0,
 124+ 0,
122125 $this->getVar( 'wgDBprefix' )
123126 );
124127 $status->value = $this->db;
@@ -249,12 +252,12 @@
250253 if ( count( $parts ) != 2 ) {
251254 return false;
252255 }
253 - $quotedUser = $conn->addQuotes( $parts[0] ) .
 256+ $quotedUser = $conn->addQuotes( $parts[0] ) .
254257 '@' . $conn->addQuotes( $parts[1] );
255258
256259 // The user needs to have INSERT on mysql.* to be able to CREATE USER
257260 // 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', '*',
259262 array( 'GRANTEE' => $quotedUser ), __METHOD__ );
260263 $insertMysql = false;
261264 $grantOptions = array_flip( $this->webUserPrivs );
@@ -270,7 +273,7 @@
271274 // Check for DB-specific privs for mysql.*
272275 if ( !$insertMysql ) {
273276 $row = $conn->selectRow( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
274 - array(
 277+ array(
275278 'GRANTEE' => $quotedUser,
276279 'TABLE_SCHEMA' => 'mysql',
277280 'PRIVILEGE_TYPE' => 'INSERT',
@@ -285,7 +288,7 @@
286289 }
287290
288291 // Check for DB-level grant options
289 - $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
 292+ $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
290293 array(
291294 'GRANTEE' => $quotedUser,
292295 'IS_GRANTABLE' => 1,
@@ -319,9 +322,9 @@
320323 }
321324 if ( count( $engines ) >= 2 ) {
322325 $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-',
326329 'values' => $engines
327330 ));
328331 $s .= $this->parent->getHelpBox( 'config-mysql-engine-help' );
@@ -372,7 +375,7 @@
373376 $this->getVar( 'wgDBpassword' ),
374377 false,
375378 false,
376 - 0,
 379+ 0,
377380 $this->getVar( 'wgDBprefix' )
378381 );
379382 } 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 */
@@ -46,7 +46,8 @@
4747 Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
4848 Html::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) .
4949 $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' ).
5152 $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create', array( 'disabled' => true ) ).
5253 Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' );
5354 }
@@ -55,12 +56,14 @@
5657 $this->parent->setVar( '_InstallUser', 'sys' );
5758 $this->parent->setVar( 'wgDBserver', '' );
5859 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' ) .
6062 Html::openElement( 'fieldset' ) .
6163 Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
6264 $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
6365 $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' ) .
6568 Html::closeElement( 'fieldset' ) .
6669 $this->getInstallUserBox().
6770 $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,20 +36,23 @@
3737
3838 function getConnectForm() {
3939 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' ) .
4142 $this->getTextBox( 'wgDBport', 'config-db-port' ) .
4243 Html::openElement( 'fieldset' ) .
4344 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' ) .
4648 $this->getTextBox( 'wgDBts2schema', 'config-db-ts2-schema' ) .
 49+ $this->parent->getHelpBox( 'config-db-schema-help' ) .
4750 Html::closeElement( 'fieldset' ) .
4851 $this->getInstallUserBox();
4952 }
5053
5154 function submitConnectForm() {
5255 // Get variables from the request
53 - $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
 56+ $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
5457 'wgDBname', 'wgDBmwschema', 'wgDBts2schema' ) );
5558
5659 // 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 ) {
@@ -220,15 +220,13 @@
221221 }
222222 $this->startForm();
223223 $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' );
233231
234232 $this->addHTML( $s );
235233 $this->endForm();
@@ -265,7 +263,7 @@
266264 $this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) );
267265 $status = $this->parent->doEnvironmentChecks();
268266 if ( $status ) {
269 - $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
 267+ $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
270268 SpecialVersion::getCopyrightAndAuthorList() ) );
271269 $this->startForm();
272270 $this->endForm();
@@ -297,7 +295,7 @@
298296 $dbSupport = '';
299297 foreach( $this->parent->getDBTypes() as $type ) {
300298 $db = 'Database' . ucfirst( $type );
301 - $dbSupport .= wfMsgNoTrans( "config-support-$type",
 299+ $dbSupport .= wfMsgNoTrans( "config-support-$type",
302300 call_user_func( array( $db, 'getSoftwareLink' ) ) ) . "\n";
303301 }
304302 $this->addHTML( $this->parent->getInfoBox(
@@ -466,22 +464,21 @@
467465 $this->parent->getTextBox( array(
468466 'var' => 'wgSitename',
469467 'label' => 'config-site-name',
470 - 'help' => $this->parent->getHelpBox( 'config-site-name-help' )
471468 ) ) .
 469+ $this->parent->getHelpBox( 'config-site-name-help' ) .
472470 $this->parent->getRadioSet( array(
473471 'var' => '_NamespaceType',
474472 'label' => 'config-project-namespace',
475473 'itemLabelPrefix' => 'config-ns-',
476474 'values' => array( 'site-name', 'generic', 'other' ),
477475 'commonAttribs' => array( 'class' => 'enableForOther', 'rel' => 'config_wgMetaNamespace' ),
478 - 'help' => $this->parent->getHelpBox( 'config-project-namespace-help' )
479476 ) ) .
480477 $this->parent->getTextBox( array(
481478 'var' => 'wgMetaNamespace',
482479 'label' => '', //TODO: Needs a label?
483480 'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' ),
484 -
485481 ) ) .
 482+ $this->parent->getHelpBox( 'config-project-namespace-help' ) .
486483 $this->getFieldSetStart( 'config-admin-box' ) .
487484 $this->parent->getTextBox( array(
488485 'var' => '_AdminName',
@@ -496,16 +493,17 @@
497494 'var' => '_AdminPassword2',
498495 'label' => 'config-admin-password-confirm'
499496 ) ) .
 497+ $this->parent->getHelpBox( 'config-admin-help' ) .
500498 $this->parent->getTextBox( array(
501499 'var' => '_AdminEmail',
502 - 'label' => 'config-admin-email',
503 - 'help' => $this->parent->getHelpBox( 'config-admin-email-help' )
 500+ 'label' => 'config-admin-email'
504501 ) ) .
 502+ $this->parent->getHelpBox( 'config-admin-email-help' ) .
505503 $this->parent->getCheckBox( array(
506504 'var' => '_Subscribe',
507 - 'label' => 'config-subscribe',
508 - 'help' => $this->parent->getHelpBox( 'config-subscribe-help' )
 505+ 'label' => 'config-subscribe'
509506 ) ) .
 507+ $this->parent->getHelpBox( 'config-subscribe-help' ) .
510508 $this->getFieldSetEnd() .
511509 $this->parent->getInfoBox( wfMsg( 'config-almost-done' ) ) .
512510 $this->parent->getRadioSet( array(
@@ -587,12 +585,9 @@
588586
589587 // Validate password
590588 $msg = false;
591 - $valid = false;
592589 $pwd = $this->getVar( '_AdminPassword' );
593590 $user = User::newFromName( $cname );
594 - if ( ( isset ( $pwd ) ) && ( $user != null ) ) {
595 - $valid = $user->getPasswordValidity( $pwd );
596 - }
 591+ $valid = $user->getPasswordValidity( $pwd );
597592 if ( strval( $pwd ) === '' ) {
598593 # $user->getPasswordValidity just checks for $wgMinimalPasswordLength.
599594 # This message is more specific and helpful.
@@ -700,31 +695,31 @@
701696 }
702697
703698 $extHtml .= $this->parent->getHelpBox( 'config-extensions-help' ) .
704 - $this->getFieldSetEnd();
 699+ $this->getFieldSetEnd();
705700 $this->addHTML( $extHtml );
706701 }
707702
708703 $this->addHTML(
709704 # Uploading
710705 $this->getFieldSetStart( 'config-upload-settings' ) .
711 - $this->parent->getCheckBox( array(
 706+ $this->parent->getCheckBox( array(
712707 'var' => 'wgEnableUploads',
713708 'label' => 'config-upload-enable',
714709 'attribs' => array( 'class' => 'showHideRadio', 'rel' => 'uploadwrapper' ),
715 - 'help' => $this->parent->getHelpBox( 'config-upload-help' )
716710 ) ) .
 711+ $this->parent->getHelpBox( 'config-upload-help' ) .
717712 '<div id="uploadwrapper" style="display: none;">' .
718 - $this->parent->getTextBox( array(
 713+ $this->parent->getTextBox( array(
719714 'var' => 'wgDeletedDirectory',
720715 'label' => 'config-upload-deleted',
721 - 'help' => $this->parent->getHelpBox( 'config-upload-deleted-help' )
722716 ) ) .
 717+ $this->parent->getHelpBox( 'config-upload-deleted-help' ) .
723718 '</div>' .
724719 $this->parent->getTextBox( array(
725720 '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' )
729724 );
730725 $canUse = $this->getVar( '_ExternalHTTP' ) ?
731726 'config-instantcommons-good' : 'config-instantcommons-bad';
@@ -732,8 +727,8 @@
733728 $this->parent->getCheckBox( array(
734729 'var' => 'wgUseInstantCommons',
735730 'label' => 'config-instantcommons',
736 - 'help' => $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) )
737731 ) ) .
 732+ $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) ) .
738733 $this->getFieldSetEnd()
739734 );
740735
@@ -759,9 +754,8 @@
760755 $this->parent->getTextBox( array(
761756 'var' => '_MemCachedServers',
762757 'label' => 'config-memcached-servers',
763 - 'help' => $this->parent->getHelpBox( 'config-memcached-help' )
764758 ) ) .
765 - '</div>' .
 759+ $this->parent->getHelpBox( 'config-memcached-help' ) . '</div>' .
766760 $this->getFieldSetEnd()
767761 );
768762 $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);

Follow-up revisions

RevisionCommit summaryAuthorDate
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

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75832* Added tipsy library...bharris21:17, 1 November 2010
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

Comments

#Comment by RobLa-WMF (talk | contribs)   07:39, 6 December 2010

Tim, do you oppose tipsy in mediawiki generally, or just this application of it? If I recall correctly, Brandon was hoping to use this in a few other places (and may already be doing so), so the reversion of jquery.tipsy.js may have some ripple effects.

#Comment by Tim Starling (talk | contribs)   07:45, 6 December 2010

Just this application of it. I'll admit that there are places where tooltips can be useful, but I suspect that the range of applications in which I would find them acceptable will be smaller than Brandon's.

#Comment by Nikerabbit (talk | contribs)   10:36, 6 December 2010

Looks like one of the files is also used elsewhere: [06-Dec-2010 10:09:15] PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /www/w/skins/common/images/help-question-hover.gif in /www/w/includes/resourceloader/ResourceLoaderFileModule.php on line 360

#Comment by Tim Starling (talk | contribs)   13:15, 6 December 2010

I'm not seeing that warning, and grepping phase3 and extensions shows up nothing.

#Comment by Platonides (talk | contribs)   15:55, 6 December 2010

Probably it appears in some module cached inside resource loader.

#Comment by Nikerabbit (talk | contribs)   17:51, 6 December 2010

Likely, I couldn't find anything by grepping either. Should the resource loader be made to handle this case?

#Comment by Platonides (talk | contribs)   22:44, 6 December 2010

Yes. If filemtime() returns false it should discard whatever cache it has for that file value.

#Comment by Jorm (WMF) (talk | contribs)   18:09, 6 December 2010

This was a bad idea. It's one thing to hate on the tooltips - that's fine - but reverting the entire code tree has made future changes significantly more difficult.

One of the major points of that change was to consolidate the multiple places that the installer's UI elements were being generated so that global or more wide spread changes could be done in one location rather than in every file. You know, separating display logic from business logic.

Removing the tooltips would have been a *one line change* and returning them to the exact way they were previously could have been done with three lines.

This revert should be, uh, reverted. And we can have a whole conversation about the tooltips outside of that.

#Comment by Tim Starling (talk | contribs)   01:11, 7 December 2010

So you're saying that adding help parameters to getTextBox() etc. was the thing you were most proud of from r75832, and that the visual changes were just an aside?

#Comment by Jorm (WMF) (talk | contribs)   21:50, 7 December 2010

I wouldn't say I was "proud" of it (and it was more than simply adding a help parameter) but it was the most *important* part of that check-in.

The primary value was consolidating and cleaning up the four or five different ways that single UI elements were being built and displayed. The design wasn't finished and I didn't really want to check it in when I did but I was getting a ton of version drift and merge conflicts so I had to push it.

Status & tagging log