r105933 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105932‎ | r105933 | r105934 >
Date:21:40, 12 December 2011
Author:yonishostak
Status:ok
Tags:
Comment:
AFTv5: vertical tab fixes, spaces -> tabs again, var leakage in startup script
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.startup.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css
@@ -21,7 +21,6 @@
2222 margin: 0;
2323 right: 0;
2424 top: 200px;
25 - z-index: 10000000;
2625 }
2726 .articleFeedbackv5-fixedtabbox {
2827 position: relative;
@@ -34,9 +33,9 @@
3534 margin: 0;
3635 padding: 5px 10px;
3736 color: .333;
38 - border: 1px solid .555599;
39 - border-top: 0px solid .555599;
40 - background-color: .eeeef9;
 37+ border: 1px solid #555599;
 38+ border-top: 0px solid #555599;
 39+ background-color: #eeeef9;
4140 text-align: center;
4241 writing-mode: tb-rl;
4342 -moz-transform:rotate(90deg);
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js
@@ -111,14 +111,23 @@
112112
113113 /* Add fixed tab link */
114114 if( '3' == linkBucket ) {
115 - var $fixedTab = $( '<a href="#mw-articleFeedbackv5" id="articleFeedbackv5-fixedtablink"></a>')
 115+ var $fixedTab = $( '\
 116+ <div id="articleFeedbackv5-fixedtab">\
 117+ <div id="articleFeedbackv5-fixedtabbox">\
 118+ <a href="#mw-articleFeedbackv5" id="articleFeedbackv5-fixedtablink"></a>\
 119+ </div>\
 120+ </div>' );
 121+ $fixedTab.find( '#articleFeedbackv5-fixedtablink' )
116122 .data( 'linkId', 3 )
117123 .text( mw.msg( 'articlefeedbackv5-fixedtab-linktext' ) )
118124 .click( function( e ) {
119125 e.preventDefault();
120126 clickFeedbackLink( $( e.target ) );
121 - } )
122 - .insertBefore( $aftDiv );
 127+ } );
 128+ $fixedTab.insertBefore( $aftDiv );
 129+ $fixedTab.addClass( 'articleFeedbackv5-fixedtab' );
 130+ $fixedTab.find( '#articleFeedbackv5-fixedtabbox' ).addClass( 'articleFeedbackv5-fixedtabbox' );
 131+ $fixedTab.find( '#articleFeedbackv5-fixedtablink' ).addClass( 'articleFeedbackv5-fixedtablink' );
123132 $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab );
124133 }
125134
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.startup.js
@@ -45,12 +45,12 @@
4646 'exclude': mw.config.get( 'wgArticleFeedbackv5BlacklistCategories', [] ),
4747 'current': mw.config.get( 'wgCategories', [] )
4848 };
49 -
 49+
5050 var enable = false;
51 - for( cat in categories['current'] ) {
 51+ for( var cat in categories['current'] ) {
5252 // Categories are configured with underscores, but article's categories are returned with
5353 // spaces instead. Revert to underscores here for sane comparison.
54 - categories['current'][cat] = categories['current'][cat].replace(/\s/gi, '_');
 54+ categories['current'][cat] = categories['current'][cat].replace(/\s/gi, '_');
5555 // Check exclusion - exclusion overrides everything else
5656 if( $.inArray( categories['current'][cat], categories.exclude ) > -1 ) {
5757 // Blacklist overrides everything else
@@ -61,7 +61,7 @@
6262 // categories, and others might be blacklisted - so continue iterating
6363 enable = true;
6464 }
65 - }
 65+ }
6666
6767 // Lazy loading
6868 if ( enable ) {

Status & tagging log