https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114328

Revision: 114328
Author:   rsterbin
Date:     2012-03-20 23:08:29 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
Followup to r114271 and r114064:
        - Fixed up the disable flyover message to be less stupid (and now 
without
          line breaks)
        - Added prefixes to the tipsy css rules; however, this caused the whole
          thing to shift ~200px upward -- passing to Yoni for help
        - Made the regex in $.articleFeedbackv5.buildLink() global -- stil 
working
          on solution to other issues
        - Updated Link A to use the pipe-selector message rather than a literal
          pipe character

Modified Paths:
--------------
    trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
    trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
    
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.css
    
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js

Modified: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
===================================================================
--- trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php      
2012-03-20 23:04:38 UTC (rev 114327)
+++ trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php      
2012-03-20 23:08:29 UTC (rev 114328)
@@ -147,12 +147,13 @@
                                'articlefeedbackv5-transparency-terms-linktext',
                                'parentheses',
                                'articlefeedbackv5-disable-flyover-title',
-                               'articlefeedbackv5-disable-flyover-help-goto',
+                               'articlefeedbackv5-disable-flyover-help',
                                
'articlefeedbackv5-disable-flyover-help-emphasis-text',
                                
'articlefeedbackv5-disable-flyover-help-location',
                                
'articlefeedbackv5-disable-flyover-help-direction',
                                'articlefeedbackv5-disable-flyover-prefbutton',
                                'articlefeedbackv5-disable-preference',
+                               'pipe-separator',
                        ),
                        'dependencies' => array(
                                'jquery.appear',

Modified: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
===================================================================
--- trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php       
2012-03-20 23:04:38 UTC (rev 114327)
+++ trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php       
2012-03-20 23:08:29 UTC (rev 114328)
@@ -422,10 +422,9 @@
 
        /* Front-end: feedback link close button */
        'articlefeedbackv5-disable-flyover-title' => 'Remove this tool?',
-       'articlefeedbackv5-disable-flyover-help-goto' => 'To remove $1, go to',
+       'articlefeedbackv5-disable-flyover-help' => 'To remove $1, go to $2 and 
check $3',
        'articlefeedbackv5-disable-flyover-help-emphasis-text' => 'Article 
Feedback',
        'articlefeedbackv5-disable-flyover-help-location' => 'My preferences > 
Appearance',
-       'articlefeedbackv5-disable-flyover-help-direction' => 'and check',
        'articlefeedbackv5-disable-flyover-prefbutton' => 'Go to my 
preferences',
 
 );
@@ -703,10 +702,12 @@
 * <code>$3</code> – URL directly to feedback location
 * <code>$4</code> – The help link.',
        'articlefeedbackv5-disable-flyover-title' => 'Title of the tooltip that 
pops up when you click the close button on a feedback trigger link, explaining 
how to remove the Article Feedback tool',
-       'articlefeedbackv5-disable-flyover-help-goto' => 'Help text for the 
tooltip that pops up when you click the close button on a feedback trigger 
link, explaining where to go to remove the Article Feedback tool.  
<code>$1</code>: Emphasized name of the tool (text is 
{{msg-mw|articlefeedbackv5-disable-flyover-help-emphasis-text}})',
-       'articlefeedbackv5-disable-flyover-help-emphasis-text' => 'The emphasis 
text for {{msg-mw|articlefeedbackv5-disable-flyover-help-goto}}',
-       'articlefeedbackv5-disable-flyover-help-location' => 'A short 
indication of where to go to change your Article Feedback preferences, 
immediately below {{msg-mw|articlefeedbackv5-disable-flyover-help-goto}}',
-       'articlefeedbackv5-disable-flyover-help-direction' => 'Help text for 
what to do once you get to the preferences panel (name of checkbox will be on 
the line below)',
+       'articlefeedbackv5-disable-flyover-help' => 'Help text for the tooltip 
that pops up when you click the close button on a feedback trigger link, 
explaining how to remove the Article Feedback tool.
+* <code>$1</code>: Emphasized name of the tool 
({{msg-mw|articlefeedbackv5-disable-flyover-help-emphasis-text}})
+* <code>$2</code>: The location of the preference panel 
({{msg-mw|articlefeedbackv5-disable-flyover-help-location}})
+* <code>$3</code>: The label of the checkbox ( 
{{msg-mw|articlefeedbackv5-disable-preference}})',
+       'articlefeedbackv5-disable-flyover-help-emphasis-text' => 'The emphasis 
text for {{msg-mw|articlefeedbackv5-disable-flyover-help}} (the name of the 
tool)',
+       'articlefeedbackv5-disable-flyover-help-location' => 'A short 
indication of where to go to change your Article Feedback preferences, inside 
{{msg-mw|articlefeedbackv5-disable-flyover-help}}',
        'articlefeedbackv5-disable-flyover-prefbutton' => 'The text of the big 
glossy button used to send the user to their preferences in the tooltip that 
pops up when you click the close button on a feedback trigger link, explaining 
how to remove the Article Feedback tool',
 );
 

Modified: 
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.css
===================================================================
--- 
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.css
    2012-03-20 23:04:38 UTC (rev 114327)
+++ 
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.css
    2012-03-20 23:08:29 UTC (rev 114328)
@@ -1138,7 +1138,8 @@
 }
 
 /* Disable flyover */
-.tipsy-inner {
+.articleFeedbackv5-disable-flyover-tip-A .tipsy-inner,
+.articleFeedbackv5-disable-flyover-tip-E .tipsy-inner {
        padding: 0;
        border-color: #888;
        max-width: 40em;
@@ -1148,16 +1149,19 @@
        margin-bottom: 5px;
        font-size: 0.9em;
 }
-.tipsy-arrow {
+.articleFeedbackv5-disable-flyover-tip-A .tipsy-arrow,
+.articleFeedbackv5-disable-flyover-tip-E .tipsy-arrow {
        /* @embed */
        background-image: url(images/tipsy-flyover.png);
        width: 23px;
        height: 11px;
 }
-.tipsy-nw .tipsy-arrow {
+.articleFeedbackv5-disable-flyover-tip-A.tipsy-nw .tipsy-arrow,
+.articleFeedbackv5-disable-flyover-tip-E.tipsy-nw .tipsy-arrow {
        margin-top: -6px;
 }
-.tipsy-se .tipsy-arrow {
+.articleFeedbackv5-disable-flyover-tip-A.tipsy-se .tipsy-arrow,
+.articleFeedbackv5-disable-flyover-tip-E.tipsy-se .tipsy-arrow {
        margin-top: -11px;
 }
 .articleFeedbackv5-disable-flyover {

Modified: 
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
===================================================================
--- 
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
     2012-03-20 23:04:38 UTC (rev 114327)
+++ 
trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
     2012-03-20 23:08:29 UTC (rev 114328)
@@ -245,12 +245,7 @@
                                                <a 
id="articleFeedbackv5-noteflyover-close" 
class="articleFeedbackv5-form-flyover-closebutton" href="#"></a>\
                                        </div>\
                                        <div 
class="articleFeedbackv5-form-flyover">\
-                                               <div 
class="articleFeedbackv5-disable-flyover-help" >\
-                                                       <p 
class="articleFeedbackv5-disable-flyover-help-goto"></p>\
-                                                       <p>&quot;<html:msg 
key="disable-flyover-help-location" />&quot;</p>\
-                                                       <p><html:msg 
key="disable-flyover-help-direction" /></p>\
-                                                       <p>&quot;<html:msg 
key="disable-preference" />&quot;</p>\
-                                               </div>\
+                                               <div 
class="articleFeedbackv5-disable-flyover-help" ></div>\
                                                <div 
class="articleFeedbackv5-flyover-footer">\
                                                        <a 
class="articleFeedbackv5-disable-flyover-button" target="_blank"><html:msg 
key="disable-flyover-prefbutton" /></a>\
                                                </div>\
@@ -2274,10 +2269,10 @@
                                // and it needs to show up if the site subhead 
(e.g., "From Wikipedia, the free
                                // encyclopedia") is not visible for any reason.
                                if ( $( '#siteSub' ).filter( ':visible' 
).length ) {
-                                       $link.prepend( ' &nbsp; | &nbsp; ' );
+                                       $link.prepend( ' &nbsp; ' + 
mw.msg('pipe-separator') + ' &nbsp; ' );
                                        $( '#siteSub' ).append( $link );
                                } else if ( $( 'h1.pagetitle + p.subtitle' 
).filter( ':visible' ).length ) {
-                                       $link.prepend( ' &nbsp; | &nbsp; ' );
+                                       $link.prepend( ' &nbsp; ' + 
mw.msg('pipe-separator') + ' &nbsp; ' );
                                        $( 'h1.pagetitle + p.subtitle' 
).append( $link );
                                } else if ( $( '#mw_contentholder .mw-topboxes' 
).length ) {
                                        $( '#mw_contentholder .mw-topboxes' 
).after( $link );
@@ -2921,12 +2916,16 @@
                var full = mw.html.escape( mw.msg( fulltext ) );
                for ( var i = 1; i < arguments.length; i++ ) {
                        var sub = arguments[i];
-                       var re = new RegExp("\\$" + i);
-                       full = full.replace( re, mw.html.element(
+                       var re = new RegExp("\\$" + i, 'g');
+                       if ( sub.tag == 'quotes' ) {
+                               full = full.replace( re, '&quot;' + mw.msg( 
sub.text ) + '&quot' );
+                       } else {
+                               full = full.replace( re, mw.html.element(
                                        'tag' in sub ? sub.tag : 'a',
                                        $.articleFeedbackv5.attribs( sub ),
                                        mw.msg( sub.text )
                                ).toString() );
+                       }
                }
                return full;
        };
@@ -3549,11 +3548,17 @@
                                        $flyover.find( 
'.articleFeedbackv5-disable-flyover' )
                                                .addClass( 
'articleFeedbackv5-disable-flyover-' + linkId );
 
-                                       $flyover.find( 
'.articleFeedbackv5-disable-flyover-help-goto' )
+                                       $flyover.find( 
'.articleFeedbackv5-disable-flyover-help' )
                                                .html( 
$.articleFeedbackv5.buildLink(
-                                                       
'articlefeedbackv5-disable-flyover-help-goto', {
+                                                       
'articlefeedbackv5-disable-flyover-help', {
                                                                tag: 'strong',
                                                                text: 
'articlefeedbackv5-disable-flyover-help-emphasis-text'
+                                                       }, {
+                                                               tag: 'quotes',
+                                                               text: 
'articlefeedbackv5-disable-flyover-help-location',
+                                                       }, {
+                                                               tag: 'quotes',
+                                                               text: 
'articlefeedbackv5-disable-preference',
                                                        } ) );
 
                                        var prefLink = mw.config.get( 
'wgScript' ) + '?' +


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to