r105598 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105597‎ | r105598 | r105599 >
Date:22:12, 8 December 2011
Author:yonishostak
Status:resolved (Comments)
Tags:
Comment:
AFTv5: implement feedback link option C - fixed tab
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css
@@ -16,3 +16,31 @@
1717 white-space: nowrap;
1818 }
1919
 20+#articleFeedbackv5-fixedtablink {
 21+ display: block;
 22+ position: fixed;
 23+ margin: 0px;
 24+ padding: 5px 10px;
 25+ color: #333;
 26+ border: 1px solid #555599;
 27+ border-top: 0px solid #555599;
 28+ background-color: #eeeef9;
 29+
 30+ text-align: center;
 31+
 32+ -moz-transform:rotate(90deg);
 33+ -moz-transform-origin: top right;
 34+ -webkit-transform: rotate(90deg);
 35+ -webkit-transform-origin: top right;
 36+ -o-transform: rotate(90deg);
 37+ -o-transform-origin: top right;
 38+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
 39+
 40+ top: 45%;
 41+ right: 0%;
 42+
 43+}
 44+#articleFeedbackv5-fixedtablink:hover {
 45+ text-decoration: none;
 46+}
 47+
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js
@@ -64,7 +64,7 @@
6565 if ( '5' == displayBucket || '0' == displayBucket ) {
6666 return '0';
6767 }
68 - var knownBuckets = { '0': true, '1': true, '2': true };
 68+ var knownBuckets = { '0': true, '1': true, '2': true, '3': true };
6969 var requested = mw.util.getParamValue( 'aft_link' );
7070 if ( $aftDiv.articleFeedbackv5( 'inDebug' ) && requested in knownBuckets ) {
7171 return requested;
@@ -72,9 +72,8 @@
7373 var bucketName = mw.user.bucket( 'ext.articleFeedbackv5-links',
7474 mw.config.get( 'wgArticleFeedbackv5LinkBuckets' )
7575 );
76 - var nameMap = { '-': 0, 'A': 1, 'B': 2 };
 76+ var nameMap = { '-': '0', 'A': '1', 'B': '2', 'C': '3' };
7777 return nameMap[bucketName];
78 -
7978 }
8079 }();
8180 if ( $aftDiv.articleFeedbackv5( 'inDebug' ) ) {
@@ -109,6 +108,19 @@
110109 $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $tlk );
111110 }
112111
 112+/* Add fixed tab link */
 113+if( '3' == linkBucket ) {
 114+ var $fixedTab = $( '<a href="#mw-articleFeedbackv5" id="articleFeedbackv5-fixedtablink"></a>')
 115+ .data( 'linkId', 3 )
 116+ .text( mw.msg( 'articlefeedbackv5-fixedtab-linktext' ) )
 117+ .click( function( e ) {
 118+ e.preventDefault();
 119+ clickFeedbackLink( $( e.target ) );
 120+ } )
 121+ .insertBefore( $aftDiv );
 122+ $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab );
 123+}
 124+
113125 /* Add toolbox link */
114126 if ( '5' == $aftDiv.articleFeedbackv5( 'getBucketId' ) ) {
115127 var $aftLink4 = $( '<li id="t-articlefeedbackv5"><a href="#mw-articlefeedbackv5"></a></li>' )
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php
@@ -120,12 +120,12 @@
121121 // -: No link; user must scroll to the bottom of the page
122122 // A: Section bars
123123 // B: Title bar
124 - // C: Vertical button
 124+ // C: Vertical button (fixed tab)
125125 'buckets' => array(
126126 '-' => 0,
127127 'A' => 0,
128 - 'B' => 100,
129 - 'C' => 0,
 128+ 'B' => 0,
 129+ 'C' => 100,
130130 ),
131131 // This version number is added to all tracking event names, so that
132132 // changes in the software don't corrupt the data being collected. Bump
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -21,6 +21,7 @@
2222 'messages' => array(
2323 'articlefeedbackv5-section-linktext',
2424 'articlefeedbackv5-titlebar-linktext',
 25+ 'articlefeedbackv5-fixedtab-linktext',
2526 'articlefeedbackv5-toolbox-linktext',
2627 ),
2728 'dependencies' => array(

Comments

#Comment by Nikerabbit (talk | contribs)   07:46, 9 December 2011

Mixing spaces and tabs.

#Comment by P858snake (talk | contribs)   11:41, 9 December 2011

No non-browser specific transform (rotate) rules I could see <https://developer.mozilla.org/en/CSS/transform>.

#Comment by Catrope (talk | contribs)   17:21, 12 December 2011

Marking fixme per this comment. Please include the normal CSS3 transform: rule in addition to the browser-specific ones.

#Comment by Catrope (talk | contribs)   20:18, 12 December 2011

Was fixed in r105674.

Status & tagging log