r113860 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113859‎ | r113860 | r113861 >
Date:21:31, 14 March 2012
Author:emsmith
Status:ok
Tags:
Comment:
Reverse merged revision(s) 111548 from trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php: Remove the floating tab close button (Request of Fabrice)
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
@@ -76,8 +76,9 @@
7777 border: none;
7878 border-top: 1px solid gray;
7979 border-left: 1px solid gray;
 80+ color: #000;
8081 background-color: #d0e1f4;
81 - min-width: 130px;
 82+ min-width: 105px;
8283 right: 0;
8384 display: block;
8485 margin: 0;
@@ -86,13 +87,7 @@
8788 position: absolute;
8889 z-index: 999;
8990 }
90 -.articleFeedbackv5-bottomrighttablink a {
91 - color: #000;
92 -}
93 -.articleFeedbackv5-bottomrighttablink a:hover {
 91+.articleFeedbackv5-bottomrighttablink:hover {
9492 text-decoration: none;
9593 }
96 -.articleFeedbackv5-bottomrighttabclose {
97 - z-index: 999;
98 -}
9994
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js
@@ -48,27 +48,12 @@
4949 $aftDiv.articleFeedbackv5( 'toggleModal', $link );
5050 };
5151
52 -// Drop link event
53 -var dropFeedbackLink = function ( $wrapper, linkId ) {
54 - $wrapper.remove();
55 - var expireTime = mw.config.get( 'wgArticleFeedbackv5DropLinkCookieExpires' );
56 - $.cookie(
57 - $aftDiv.articleFeedbackv5( 'prefix', 'drop-link' ),
58 - 'true',
59 - { 'expires': expireTime, 'path': '/' }
60 - );
61 - var tracking_id = $aftDiv.articleFeedbackv5( 'bucketName' ) +
62 - '-trigger' + linkId + '-drop';
63 - $aftDiv.articleFeedbackv5( 'trackClick', tracking_id );
64 -};
65 -
6652 // Bucketing
6753 var linkBucket = function () {
6854 // Find out which link bucket they go in:
6955 // 1. Display buckets 0 or 5? Always no link.
7056 // 2. Requested in query string (debug only)
71 - // 3. Turned off via cookie?
72 - // 4. Random bucketing
 57+ // 3. Random bucketing
7358 var displayBucket = $aftDiv.articleFeedbackv5( 'getBucketId' );
7459 if ( '5' == displayBucket || '0' == displayBucket ) {
7560 return '-';
@@ -82,9 +67,6 @@
8368 if ( $aftDiv.articleFeedbackv5( 'inDebug' ) && requested in knownBuckets ) {
8469 return requested;
8570 }
86 - if ( $.cookie( $aftDiv.articleFeedbackv5( 'prefix', 'drop-link' ) ) === 'true' ) {
87 - return '-';
88 - }
8971 return mw.user.bucket( 'ext.articleFeedbackv5-links', cfg );
9072 }();
9173 if ( $aftDiv.articleFeedbackv5( 'inDebug' ) ) {
@@ -94,7 +76,7 @@
9577 // A: After the site tagline (below the article title)
9678 if ( 'A' == linkBucket ) {
9779 var $sub = $( '<a href="#mw-articleFeedbackv5" id="articleFeedbackv5-sitesublink"></a>' )
98 - .data( 'linkId', linkBucket )
 80+ .data( 'linkId', 'A' )
9981 .text( mw.msg( 'articlefeedbackv5-sitesub-linktext' ) )
10082 .click( function ( e ) {
10183 e.preventDefault();
@@ -118,7 +100,7 @@
119101 // B: Below the titlebar on the right
120102 if ( 'B' == linkBucket ) {
121103 var $tlk = $( '<a href="#mw-articleFeedbackv5" id="articleFeedbackv5-titlebarlink"></a>' )
122 - .data( 'linkId', linkBucket )
 104+ .data( 'linkId', 'B' )
123105 .text( mw.msg( 'articlefeedbackv5-titlebar-linktext' ) )
124106 .click( function ( e ) {
125107 e.preventDefault();
@@ -140,7 +122,7 @@
141123 </div>\
142124 </div>' );
143125 $fixedTab.find( '#articleFeedbackv5-fixedtablink' )
144 - .data( 'linkId', linkBucket )
 126+ .data( 'linkId', 'C' )
145127 .attr( 'title', mw.msg( 'articlefeedbackv5-fixedtab-linktext' ) )
146128 .click( function( e ) {
147129 e.preventDefault();
@@ -155,24 +137,16 @@
156138 var $bottomRightTab = $( '\
157139 <div id="articleFeedbackv5-bottomrighttab" class="articleFeedbackv5-bottomrighttab">\
158140 <div id="articleFeedbackv5-bottomrighttabbox" class="articleFeedbackv5-bottomrighttabbox">\
159 - <div class="articleFeedbackv5-bottomrighttablink">\
160 - <a href="#mw-articleFeedbackv5" id="articleFeedbackv5-bottomrighttablink"></a>\
161 - <a href="#" id="articleFeedbackv5-bottmrighttabclose" class="articleFeedbackv5-bottomrighttabclose"><span>X</span></a>\
162 - </div>\
 141+ <a href="#mw-articleFeedbackv5" id="articleFeedbackv5-bottomrighttablink" class="articleFeedbackv5-bottomrighttablink"></a>\
163142 </div>\
164143 </div>' );
165144 $bottomRightTab.find( '#articleFeedbackv5-bottomrighttablink' )
166 - .data( 'linkId', linkBucket )
 145+ .data( 'linkId', 'D' )
167146 .text( mw.msg( 'articlefeedbackv5-bottomrighttab-linktext' ) )
168147 .click( function( e ) {
169148 e.preventDefault();
170149 clickFeedbackLink( $( e.target ) );
171150 } );
172 - $bottomRightTab.find( '#articleFeedbackv5-bottmrighttabclose' )
173 - .click( function( e ) {
174 - e.preventDefault();
175 - dropFeedbackLink( $( e.target ).parents( '#articleFeedbackv5-bottomrighttab' ), linkBucket );
176 - } );
177151 $bottomRightTab.insertBefore( $aftDiv );
178152 $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $bottomRightTab );
179153 }
@@ -191,7 +165,7 @@
192166 var $wrp = $( '<span class="articleFeedbackv5-sectionlink-wrap"></span>' )
193167 .html( '&nbsp;[<a href="#mw-articlefeedbackv5" class="articleFeedbackv5-sectionlink"></a>]' );
194168 $wrp.find( 'a.articleFeedbackv5-sectionlink' )
195 - .data( 'linkId', linkBucket )
 169+ .data( 'linkId', 'H' )
196170 .text( mw.msg( 'articlefeedbackv5-section-linktext' ) )
197171 .click( function ( e ) {
198172 e.preventDefault();
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php
@@ -208,14 +208,6 @@
209209 $wgArticleFeedbackv5AbuseFiltering = false;
210210
211211 /**
212 - * If someone clicks the close button on a the floating link, wait this long
213 - * (in days) before showing it to them again.
214 - *
215 - * @var int
216 - */
217 -$wgArticleFeedbackv5DropLinkCookieExpires = 1;
218 -
219 -/**
220212 * The full URL for a discussion page about the Article Feedback Dashboard
221213 *
222214 * Since the dashboard is powered by a SpecialPage, we cannot rel on the built-in
@@ -328,4 +320,4 @@
329321 $wgLogActions['articlefeedbackv5/request'] = 'articlefeedbackv5-log-request';
330322 $wgLogActions['articlefeedbackv5/unrequest'] = 'articlefeedbackv5-log-unrequest';
331323 $wgLogActions['articlefeedbackv5/flag'] = 'articlefeedbackv5-log-flag';
332 -$wgLogActions['articlefeedbackv5/unflag'] = 'articlefeedbackv5-log-unflag';
 324+$wgLogActions['articlefeedbackv5/unflag'] = 'articlefeedbackv5-log-unflag';
\ No newline at end of file
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -342,7 +342,6 @@
343343 $wgArticleFeedbackv5Options,
344344 $wgArticleFeedbackv5LinkBuckets,
345345 $wgArticleFeedbackv5Namespaces,
346 - $wgArticleFeedbackv5DropLinkCookieExpires,
347346 $wgArticleFeedbackv5LearnToEdit,
348347 $wgArticleFeedbackv5SurveyUrls;
349348 $vars['wgArticleFeedbackv5SMaxage'] = $wgArticleFeedbackv5SMaxage;
@@ -357,7 +356,6 @@
358357 $vars['wgArticleFeedbackv5Options'] = $wgArticleFeedbackv5Options;
359358 $vars['wgArticleFeedbackv5LinkBuckets'] = $wgArticleFeedbackv5LinkBuckets;
360359 $vars['wgArticleFeedbackv5Namespaces'] = $wgArticleFeedbackv5Namespaces;
361 - $vars['wgArticleFeedbackv5DropLinkCookieExpires'] = $wgArticleFeedbackv5DropLinkCookieExpires;
362360 $vars['wgArticleFeedbackv5LearnToEdit'] = $wgArticleFeedbackv5LearnToEdit;
363361 $vars['wgArticleFeedbackv5WhatsThisPage'] = wfMsgForContent( 'articlefeedbackv5-bucket5-form-panel-explanation-link' );
364362 $vars['wgArticleFeedbackv5TermsPage'] = wfMsgForContent( 'articlefeedbackv5-transparency-terms-url' );

Status & tagging log