Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | 'articlefeedbackv5-cta1-confirmation-title' => 'Did you know that you can edit this page?', |
16 | 16 | 'articlefeedbackv5-cta1-confirmation-call' => 'Wikipedia works because anyone can edit its articles. Go ahead, give it a try. Be bold!', |
17 | 17 | 'articlefeedbackv5-cta1-learn-how' => 'Learn how to edit', |
18 | | - 'articlefeedbackv5-cta1-learn-how-url' => 'http://en.wikipedia.org/wiki/Wikipedia:Tutorial', |
| 18 | + 'articlefeedbackv5-cta1-learn-how-url' => 'http://en.wikipedia.org/wiki/Wikipedia:Article_Feedback_Tool/Tutorial', |
19 | 19 | 'articlefeedbackv5-cta1-edit-linktext' => 'Edit this page', |
20 | 20 | 'articlefeedbackv5-cta2-confirmation-title' => 'Help improve Wikipedia', |
21 | 21 | 'articlefeedbackv5-cta2-confirmation-call' => 'This encyclopedia is created by people like you. Can you give us a hand?', |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | 'articlefeedbackv5-help-tooltip-title' => 'What\'s this?', |
171 | 171 | 'articlefeedbackv5-help-tooltip-info' => 'Wikipedia would like to hear what you think of this article. Share your feedback with the editors -- and help improve this page.', |
172 | 172 | 'articlefeedbackv5-help-tooltip-linktext' => 'Learn more', |
173 | | - 'articlefeedbackv5-help-tooltip-linkurl' => 'http://en.wikipedia.org/wiki/Wikipedia:Article_Feedback_Tool/Tutorial', |
| 173 | + 'articlefeedbackv5-help-tooltip-linkurl' => 'http://en.wikipedia.org/wiki/Wikipedia:Article_Feedback_Tool/Version_5/Help', |
174 | 174 | 'articlefeedbackv5-transparency-terms' => 'By posting, you agree to transparency under these $1.', |
175 | 175 | 'articlefeedbackv5-transparency-terms-linktext' => 'terms', |
176 | 176 | 'articlefeedbackv5-transparency-terms-url' => 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement', |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -62,6 +62,11 @@ |
63 | 63 | $.articleFeedbackv5.debug = mw.config.get( 'wgArticleFeedbackv5Debug' ) ? true : false; |
64 | 64 | |
65 | 65 | /** |
| 66 | + * Are we tracking clicks? |
| 67 | + */ |
| 68 | + $.articleFeedbackv5.clickTracking = false; |
| 69 | + |
| 70 | + /** |
66 | 71 | * Have the containers been added? |
67 | 72 | */ |
68 | 73 | $.articleFeedbackv5.hasContainers = false; |
— | — | @@ -398,6 +403,8 @@ |
399 | 404 | $block.find( '.articleFeedbackv5-submit' ) |
400 | 405 | .click( function ( e ) { |
401 | 406 | e.preventDefault(); |
| 407 | + $.articleFeedbackv5.trackClick( 'option1-submit-' + |
| 408 | + ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) ); |
402 | 409 | $.articleFeedbackv5.submitForm(); |
403 | 410 | } ); |
404 | 411 | }, |
— | — | @@ -652,8 +659,9 @@ |
653 | 660 | // Attach the submit |
654 | 661 | $block.find( '.articleFeedbackv5-submit' ) |
655 | 662 | .click( function ( e ) { |
656 | | - //alert( 'got to click event' ); |
657 | 663 | e.preventDefault(); |
| 664 | + $.articleFeedbackv5.trackClick( 'option2-submit-' + |
| 665 | + ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) ); |
658 | 666 | $.articleFeedbackv5.submitForm(); |
659 | 667 | } ); |
660 | 668 | |
— | — | @@ -980,6 +988,8 @@ |
981 | 989 | $block.find( '.articleFeedbackv5-submit' ) |
982 | 990 | .click( function ( e ) { |
983 | 991 | e.preventDefault(); |
| 992 | + $.articleFeedbackv5.trackClick( 'option3-submit-' + |
| 993 | + ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) ); |
984 | 994 | $.articleFeedbackv5.submitForm(); |
985 | 995 | } ); |
986 | 996 | |
— | — | @@ -1118,16 +1128,10 @@ |
1119 | 1129 | .attr( 'href', mw.config.get( 'wgArticleFeedbackv5LearnToEdit' ) ); |
1120 | 1130 | |
1121 | 1131 | // Fill in the edit link |
1122 | | - $block.find( '.articleFeedbackv5-submit' ) |
1123 | | - .attr( 'href', |
1124 | | - mw.config.get( 'wgScript' ) + '?' + $.param( { |
1125 | | - 'title': mw.config.get( 'wgPageName' ), |
1126 | | - 'action': 'edit', |
1127 | | - 'articleFeedbackv5_feedback_id': $.articleFeedbackv5.feedbackId, |
1128 | | - 'articleFeedbackv5_cta_id': $.articleFeedbackv5.ctaId, |
1129 | | - 'articleFeedbackv5_bucket_id': $.articleFeedbackv5.bucketId |
1130 | | - } ) |
1131 | | - ); |
| 1132 | + var edit_track_id = $.articleFeedbackv5.buttonName() + '-button-click-' + |
| 1133 | + ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ); |
| 1134 | + $block.find( '.articleFeedbackv5-cta-button' ) |
| 1135 | + .attr( 'href', $.articleFeedbackv5.editUrl( edit_track_id ) ); |
1132 | 1136 | |
1133 | 1137 | // Turn the submit into a slick button |
1134 | 1138 | $block.find( '.articleFeedbackv5-submit' ) |
— | — | @@ -1898,17 +1902,11 @@ |
1899 | 1903 | .attr( 'href', mw.msg( 'articlefeedbackv5-cta1-learn-how-url' ) ); |
1900 | 1904 | |
1901 | 1905 | // Fill in the link |
| 1906 | + var edit_track_id = $.articleFeedbackv5.bucketName() + '-' + |
| 1907 | + $.articleFeedbackv5.ctaName() + '-button-click-' + |
| 1908 | + ( $.articleFeedbackv5.inDialog ? 'overlay': 'bottom' ); |
1902 | 1909 | $block.find( '.articleFeedbackv5-cta-button' ) |
1903 | | - .attr( |
1904 | | - 'href', |
1905 | | - mw.config.get( 'wgScript' ) + '?' + $.param( { |
1906 | | - 'title': mw.config.get( 'wgPageName' ), |
1907 | | - 'action': 'edit', |
1908 | | - 'articleFeedbackv5_feedback_id': $.articleFeedbackv5.feedbackId, |
1909 | | - 'articleFeedbackv5_cta_id': $.articleFeedbackv5.ctaId, |
1910 | | - 'articleFeedbackv5_bucket_id': $.articleFeedbackv5.bucketId |
1911 | | - } ) |
1912 | | - ); |
| 1910 | + .attr( 'href', $.articleFeedbackv5.editUrl( edit_track_id ) ); |
1913 | 1911 | |
1914 | 1912 | return $block; |
1915 | 1913 | }, |
— | — | @@ -1970,8 +1968,12 @@ |
1971 | 1969 | var $block = $( $.articleFeedbackv5.currentCTA().templates.block ); |
1972 | 1970 | |
1973 | 1971 | // Fill in the button link |
| 1972 | + var learn_url = mw.msg( 'articlefeedbackv5-cta1-learn-how-url' ); |
| 1973 | + var learn_track_id = $.articleFeedbackv5.bucketName() + '-' + |
| 1974 | + $.articleFeedbackv5.ctaName() + '-button-click-' + |
| 1975 | + ( $.articleFeedbackv5.inDialog ? 'overlay': 'bottom' ); |
1974 | 1976 | $block.find( '.articleFeedbackv5-cta-button' ) |
1975 | | - .attr( 'href', mw.msg( 'articlefeedbackv5-cta1-learn-how-url' ) ); |
| 1977 | + .attr( 'href', $.articleFeedbackv5.trackingUrl( learn_url, learn_track_id ) ); |
1976 | 1978 | |
1977 | 1979 | return $block; |
1978 | 1980 | }, |
— | — | @@ -2013,6 +2015,8 @@ |
2014 | 2016 | $.articleFeedbackv5.init = function ( $el, config ) { |
2015 | 2017 | $.articleFeedbackv5.$holder = $el; |
2016 | 2018 | $.articleFeedbackv5.config = config; |
| 2019 | + // Are we tracking clicks? |
| 2020 | + $.articleFeedbackv5.clickTracking = $.articleFeedbackv5.checkClickTracking(); |
2017 | 2021 | // Has the user already submitted ratings for this page at this revision? |
2018 | 2022 | $.articleFeedbackv5.alreadySubmitted = $.cookie( $.articleFeedbackv5.prefix( 'submitted' ) ) === 'true'; |
2019 | 2023 | // Are we in debug mode? |
— | — | @@ -2077,8 +2081,28 @@ |
2078 | 2082 | }; |
2079 | 2083 | |
2080 | 2084 | // }}} |
| 2085 | + // {{{ checkClickTracking |
2081 | 2086 | |
| 2087 | + /** |
| 2088 | + * Checks whether click tracking is turned on |
| 2089 | + * |
| 2090 | + * Only track users who have been assigned to the tracking group; don't bucket |
| 2091 | + * at all if we're set to always ignore or always track. |
| 2092 | + */ |
| 2093 | + $.articleFeedbackv5.checkClickTracking = function () { |
| 2094 | + var b = mw.config.get( 'wgArticleFeedbackv5Tracking' ); |
| 2095 | + if ( b.buckets.ignore == 100 && b.buckets.track == 0 ) { |
| 2096 | + return false; |
| 2097 | + } |
| 2098 | + if ( b.buckets.ignore == 0 && b.buckets.track == 100 ) { |
| 2099 | + return true; |
| 2100 | + } |
| 2101 | + return ( 'track' === mw.user.bucket( 'ext.articleFeedbackv5-tracking', b ) ); |
| 2102 | + }; |
| 2103 | + |
2082 | 2104 | // }}} |
| 2105 | + |
| 2106 | + // }}} |
2083 | 2107 | // {{{ Utility methods |
2084 | 2108 | |
2085 | 2109 | // {{{ prefix |
— | — | @@ -2206,8 +2230,87 @@ |
2207 | 2231 | }; |
2208 | 2232 | |
2209 | 2233 | // }}} |
| 2234 | + // {{{ bucketName |
2210 | 2235 | |
| 2236 | + /** |
| 2237 | + * Utility method: Gets the name of the current bucket |
| 2238 | + * |
| 2239 | + * @return string the bucket name |
| 2240 | + */ |
| 2241 | + $.articleFeedbackv5.bucketName = function () { |
| 2242 | + return 'option' + $.articleFeedbackv5.bucketId; |
| 2243 | + }; |
| 2244 | + |
2211 | 2245 | // }}} |
| 2246 | + // {{{ ctaName |
| 2247 | + |
| 2248 | + /** |
| 2249 | + * Utility method: Gets the name of the current CTA |
| 2250 | + * |
| 2251 | + * @return string the CTA name |
| 2252 | + */ |
| 2253 | + $.articleFeedbackv5.ctaName = function () { |
| 2254 | + if ( '0' == $.articleFeedbackv5.ctaId ) { |
| 2255 | + return 'cta-none'; |
| 2256 | + } else if ( '1' == $.articleFeedbackv5.ctaId ) { |
| 2257 | + return 'cta-edit'; |
| 2258 | + } else if ( '2' == $.articleFeedbackv5.ctaId ) { |
| 2259 | + return 'cta-learnmore'; |
| 2260 | + } else { |
| 2261 | + return 'cta-unknown'; |
| 2262 | + } |
| 2263 | + }; |
| 2264 | + |
| 2265 | + // }}} |
| 2266 | + // {{{ trackingUrl |
| 2267 | + |
| 2268 | + /** |
| 2269 | + * Creates a URL that tracks a particular click |
| 2270 | + * |
| 2271 | + * @param url string the url so far |
| 2272 | + * @param trackingId string the tracking ID |
| 2273 | + */ |
| 2274 | + $.articleFeedbackv5.trackingUrl = function ( url, trackingId ) { |
| 2275 | + if ( $.articleFeedbackv5.clickTracking && $.isFunction( $.trackActionURL ) ) { |
| 2276 | + return $.trackActionURL( url, $.articleFeedbackv5.prefix( trackingId ) ); |
| 2277 | + } else { |
| 2278 | + return url; |
| 2279 | + } |
| 2280 | + }; |
| 2281 | + |
| 2282 | + // }}} |
| 2283 | + // {{{ editUrl |
| 2284 | + |
| 2285 | + /** |
| 2286 | + * Builds the edit URL, with tracking if appropriate |
| 2287 | + * |
| 2288 | + * @param trackingId string the tracking ID |
| 2289 | + */ |
| 2290 | + $.articleFeedbackv5.editUrl = function ( url, trackingId ) { |
| 2291 | + var params = { |
| 2292 | + 'title': mw.config.get( 'wgPageName' ), |
| 2293 | + 'action': 'edit', |
| 2294 | + }; |
| 2295 | + if ( $.articleFeedbackv5.bucketId ) { |
| 2296 | + params.articleFeedbackv5_bucket_id = $.articleFeedbackv5.bucketId; |
| 2297 | + } |
| 2298 | + if ( $.articleFeedbackv5.ctaId ) { |
| 2299 | + params.articleFeedbackv5_cta_id = $.articleFeedbackv5.ctaId; |
| 2300 | + } |
| 2301 | + if ( $.articleFeedbackv5.feedbackId ) { |
| 2302 | + params.articleFeedbackv5_feedback_id = $.articleFeedbackv5.feedbackId; |
| 2303 | + } |
| 2304 | + var url = mw.config.get( 'wgScript' ) + '?' + $.param( params ); |
| 2305 | + if ( trackingId ) { |
| 2306 | + return $.articleFeedbackv5.trackingUrl( url, trackingId ); |
| 2307 | + } else { |
| 2308 | + return url; |
| 2309 | + } |
| 2310 | + }; |
| 2311 | + |
| 2312 | + // }}} |
| 2313 | + |
| 2314 | + // }}} |
2212 | 2315 | // {{{ Process methods |
2213 | 2316 | |
2214 | 2317 | // {{{ load |
— | — | @@ -2358,6 +2461,14 @@ |
2359 | 2462 | bucket.afterBuild(); |
2360 | 2463 | } |
2361 | 2464 | |
| 2465 | + // Track the event |
| 2466 | + if ( $.articleFeedbackv5.inDialog ) { |
| 2467 | + $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-overlay-impression' ); |
| 2468 | + } else { |
| 2469 | + // Don't track bottom-of-the-page loads, at least for now |
| 2470 | + // $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-bottom-impression' ); |
| 2471 | + } |
| 2472 | + |
2362 | 2473 | $.articleFeedbackv5.nowShowing = 'form'; |
2363 | 2474 | }; |
2364 | 2475 | |
— | — | @@ -2546,6 +2657,11 @@ |
2547 | 2658 | // Reset the panel dimensions |
2548 | 2659 | $.articleFeedbackv5.setDialogDimensions(); |
2549 | 2660 | |
| 2661 | + // Track the event |
| 2662 | + $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-' + |
| 2663 | + $.articleFeedbackv5.ctaName() + '-impression-' + |
| 2664 | + ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) ); |
| 2665 | + |
2550 | 2666 | $.articleFeedbackv5.nowShowing = 'cta'; |
2551 | 2667 | }; |
2552 | 2668 | |
— | — | @@ -2795,6 +2911,12 @@ |
2796 | 2912 | */ |
2797 | 2913 | $.articleFeedbackv5.closeAsModal = function () { |
2798 | 2914 | if ( $.articleFeedbackv5.inDialog ) { |
| 2915 | + if ( 'form' == $.articleFeedbackv5.nowShowing ) { |
| 2916 | + $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-overlay-close' ); |
| 2917 | + } else if ('cta' == $.articleFeedbackv5.nowShowing ) { |
| 2918 | + $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-' + |
| 2919 | + $.articleFeedbackv5.ctaName() + '-overlay-close' ); |
| 2920 | + } |
2799 | 2921 | $.articleFeedbackv5.setLinkId( '0' ); |
2800 | 2922 | $.articleFeedbackv5.$dialog.find( '.articleFeedbackv5-tooltip' ).hide(); |
2801 | 2923 | $inner = $.articleFeedbackv5.$dialog.find( '.articleFeedbackv5-ui' ).detach(); |
— | — | @@ -2821,9 +2943,26 @@ |
2822 | 2944 | }; |
2823 | 2945 | |
2824 | 2946 | // }}} |
| 2947 | + // {{{ trackClick |
2825 | 2948 | |
| 2949 | + /** |
| 2950 | + * Tracks a click |
| 2951 | + * |
| 2952 | + * @param trackingId string the tracking ID |
| 2953 | + */ |
| 2954 | + $.articleFeedbackv5.trackClick = function ( trackingId ) { |
| 2955 | + if ( $.articleFeedbackv5.clickTracking && $.isFunction( $.trackActionWithInfo ) ) { |
| 2956 | + $.trackActionWithInfo( |
| 2957 | + $.articleFeedbackv5.prefix( trackingId ), |
| 2958 | + mw.config.get( 'wgTitle' ) |
| 2959 | + ); |
| 2960 | + } |
| 2961 | + }; |
| 2962 | + |
2826 | 2963 | // }}} |
2827 | 2964 | |
| 2965 | + // }}} |
| 2966 | + |
2828 | 2967 | // }}} |
2829 | 2968 | // {{{ articleFeedbackv5 plugin |
2830 | 2969 | |
— | — | @@ -2844,9 +2983,11 @@ |
2845 | 2984 | inDebug: { args: 0, ret: true }, |
2846 | 2985 | nowShowing: { args: 0, ret: true }, |
2847 | 2986 | prefix: { args: 1, ret: true }, |
| 2987 | + bucketName: { args: 0, ret: true }, |
2848 | 2988 | addToRemovalQueue: { args: 1, ret: false }, |
2849 | 2989 | openAsModal: { args: 1, ret: false }, |
2850 | | - closeAsModal: { args: 0, ret: true } |
| 2990 | + closeAsModal: { args: 0, ret: true }, |
| 2991 | + trackClick: { args: 1, ret: false } |
2851 | 2992 | }; |
2852 | 2993 | if ( opts in public ) { |
2853 | 2994 | var r; |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.ie.css |
— | — | @@ -23,16 +23,16 @@ |
24 | 24 | text-align: center; |
25 | 25 | line-height: 18px !important; |
26 | 26 | } |
27 | | - |
28 | | -.articleFeedbackv5-fixedtabbox { |
| 27 | +.articleFeedbackv5-fixedtab { |
| 28 | + margin: 0 40px 0 0 !important; |
| 29 | + *margin: 0 !important; |
29 | 30 | /*filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);*/ |
30 | 31 | } |
| 32 | +.articleFeedbackv5-fixedtabbox { |
| 33 | + |
| 34 | +} |
31 | 35 | .articleFeedbackv5-fixedtablink { |
32 | 36 | /*position: absolute;*/ |
33 | | - min-width: 0 !important; |
34 | | - display: block !important; |
35 | | - border: #000 1px solid !important; |
36 | | -} |
37 | | -.articleFeedbackv5-fixedtablink span { |
38 | | - border: #00F 1px solid; |
| 37 | + *min-width: 0 !important; |
| 38 | + *display: block !important; |
39 | 39 | } |
\ No newline at end of file |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/images/img_aftv5_tablink.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/images/img_aftv5_tablink.png |
___________________________________________________________________ |
Added: svn:mime-type |
40 | 40 | + application/octet-stream |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.css |
— | — | @@ -23,31 +23,39 @@ |
24 | 24 | top: 200px; |
25 | 25 | } |
26 | 26 | .articleFeedbackv5-fixedtabbox { |
27 | | - position: relative; |
28 | | -} |
29 | | -.articleFeedbackv5-fixedtablink { |
30 | | - position: absolute; |
31 | | - border: 1px solid #555599; |
32 | | - background-color: #eeeef9; |
33 | | - min-width: 105px; |
34 | | - width: auto; |
35 | | - height: auto; |
36 | | - left: 0; |
37 | | - display: block; |
38 | | - margin: 0; |
39 | | - padding: 5px 10px; |
40 | | - color: .333; |
41 | | - text-align: center; |
42 | | - writing-mode: tb-rl; |
43 | | - -moz-transform:rotate(90deg); |
| 27 | + position: relative; |
| 28 | + /*-moz-transform:rotate(90deg); |
44 | 29 | -moz-transform-origin: top left; |
45 | 30 | -webkit-transform: rotate(90deg); |
46 | 31 | -webkit-transform-origin: top left; |
47 | 32 | -o-transform: rotate(90deg); |
48 | 33 | -o-transform-origin: top left; |
49 | | - /*transform: rotate(90deg); |
50 | | - transform-origin: top left;*/ |
| 34 | + -ms-transform: rotate(90deg); |
| 35 | + -ms-transform-origin: top left; |
| 36 | + transform: rotate(90deg); |
| 37 | + transform-origin: top left;*/ |
51 | 38 | } |
| 39 | +.articleFeedbackv5-fixedtablink { |
| 40 | + /*border: none; |
| 41 | + background-color: #5373a6; |
| 42 | + -moz-border-radius: 0 0 10px 10px; |
| 43 | + -webkit-border-radius: 0 0 10px 10px; |
| 44 | + -ms-border-radius: 0 0 10px 10px; |
| 45 | + border-radius: 0 0 10px 10px; |
| 46 | + min-width: 105px;*/ |
| 47 | + width: 27px; |
| 48 | + height: 114px; |
| 49 | + right: 0; |
| 50 | + display: block; |
| 51 | + margin: 0; |
| 52 | + background: url(images/img_aftv5_tablink.png) no-repeat; |
| 53 | + /*padding: 5px 10px; |
| 54 | + color: #fff; |
| 55 | + text-align: center; |
| 56 | + writing-mode: tb-rl;*/ |
| 57 | + position: absolute; |
| 58 | + z-index: 100000; |
| 59 | +} |
52 | 60 | .articleFeedbackv5-fixedtablink:hover { |
53 | 61 | text-decoration: none; |
54 | 62 | } |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js |
— | — | @@ -18,39 +18,19 @@ |
19 | 19 | |
20 | 20 | /* Setup for feedback links */ |
21 | 21 | |
22 | | -// Only track users who have been assigned to the tracking group; don't bucket |
23 | | -// at all if we're set to always ignore or always track. |
24 | | -var useClickTracking = function () { |
25 | | - var b = mw.config.get( 'wgArticleFeedbackv5Tracking' ); |
26 | | - if ( b.buckets.ignore == 100 && b.buckets.track == 0 ) { |
27 | | - return false; |
28 | | - } |
29 | | - if ( b.buckets.ignore == 0 && b.buckets.track == 100 ) { |
30 | | - return true; |
31 | | - } |
32 | | - return ( 'track' === mw.user.bucket( 'ext.articleFeedbackv5-tracking', b ) ); |
33 | | -}(); |
34 | | - |
35 | 22 | // Info about each of the links |
36 | 23 | var linkInfo = { |
37 | | - '1': { |
38 | | - clickTracking: $aftDiv.articleFeedbackv5( 'prefix', 'section-link' ) |
39 | | - }, |
40 | | - '2': { |
41 | | - clickTracking: $aftDiv.articleFeedbackv5( 'prefix', 'titlebar-link' ) |
42 | | - }, |
43 | | - '4': { |
44 | | - clickTracking: $aftDiv.articleFeedbackv5( 'prefix', 'toolbox-link' ) |
45 | | - } |
| 24 | + '1': { trackId: 'section-link' }, |
| 25 | + '2': { trackId: 'titlebar-link' }, |
| 26 | + '3': { trackId: 'vertical-link' }, |
| 27 | + '4': { trackId: 'toolbox-link' } |
46 | 28 | }; |
47 | 29 | |
48 | 30 | // Click event |
49 | 31 | var clickFeedbackLink = function ( $link ) { |
50 | | - // Click tracking |
51 | | - if ( useClickTracking && $.isFunction( $.trackActionWithInfo ) ) { |
52 | | - $.trackActionWithInfo( linkInfo[ $link.data( 'linkId' ) ].clickTracking, mw.config.get( 'wgTitle' ) ); |
53 | | - } |
54 | | - // Open as modal |
| 32 | + var tracking_id = $aftDiv.articleFeedbackv5( 'bucketName' ) + |
| 33 | + linkInfo[ $link.data( 'linkId' ) ].trackId; |
| 34 | + $aftDiv.articleFeedbackv5( 'trackClick', tracking_id ); |
55 | 35 | $aftDiv.articleFeedbackv5( 'openAsModal', $link ); |
56 | 36 | }; |
57 | 37 | |
— | — | @@ -119,7 +99,7 @@ |
120 | 100 | </div>' ); |
121 | 101 | $fixedTab.find( '#articleFeedbackv5-fixedtablink' ) |
122 | 102 | .data( 'linkId', 3 ) |
123 | | - .text( mw.msg( 'articlefeedbackv5-fixedtab-linktext' ) ) |
| 103 | + .attr( 'title', mw.msg( 'articlefeedbackv5-fixedtab-linktext' ) ) |
124 | 104 | .click( function( e ) { |
125 | 105 | e.preventDefault(); |
126 | 106 | clickFeedbackLink( $( e.target ) ); |
— | — | @@ -128,7 +108,6 @@ |
129 | 109 | $fixedTab.addClass( 'articleFeedbackv5-fixedtab' ); |
130 | 110 | $fixedTab.find( '#articleFeedbackv5-fixedtabbox' ).addClass( 'articleFeedbackv5-fixedtabbox' ); |
131 | 111 | $fixedTab.find( '#articleFeedbackv5-fixedtablink' ).addClass( 'articleFeedbackv5-fixedtablink' ); |
132 | | - $fixedTab.find( '#articleFeedbackv5-fixedtablink' ).css( 'border', '#00F 1px solid' ); |
133 | 112 | $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab ); |
134 | 113 | } |
135 | 114 | |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.startup.js |
— | — | @@ -16,6 +16,21 @@ |
17 | 17 | /*** Main entry point ***/ |
18 | 18 | jQuery( function( $ ) { |
19 | 19 | |
| 20 | + var ua = navigator.appVersion.toLowerCase(); |
| 21 | + // Rule out MSIE 6, iPhone, iPod, iPad, Android |
| 22 | + if( |
| 23 | + (ua.indexOf( 'msie 6' ) != -1) || |
| 24 | + (ua.indexOf( 'msie 7' ) != -1) || |
| 25 | + (ua.indexOf( 'firefox/2') != -1) || |
| 26 | + (ua.indexOf( 'firefox 2') != -1) || |
| 27 | + (ua.indexOf( 'android' ) != -1) || |
| 28 | + (ua.indexOf( 'iphone' ) != -1) || |
| 29 | + (ua.indexOf( 'ipod' ) != -1 ) || |
| 30 | + (ua.indexOf( 'ipad' ) != -1) |
| 31 | + ) { |
| 32 | + return; |
| 33 | + } |
| 34 | + |
20 | 35 | // Load check, is this page ArticleFeedbackv5-enabled ? |
21 | 36 | // Keep in sync with ApiArticleFeedbackv5.php |
22 | 37 | if ( |
— | — | @@ -67,7 +82,7 @@ |
68 | 83 | if ( enable ) { |
69 | 84 | mw.loader.load( 'ext.articleFeedbackv5' ); |
70 | 85 | // Load the IE-specific module |
71 | | - if( navigator.appVersion.indexOf( 'MSIE' ) != -1 ) { |
| 86 | + if( navigator.appVersion.indexOf( 'MSIE 7' ) != -1 ) { |
72 | 87 | mw.loader.load( 'ext.articleFeedbackv5.ie' ); |
73 | 88 | } |
74 | 89 | } |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | 'tracked' => false, |
84 | 84 | ); |
85 | 85 | |
86 | | -// Bucket settings for click tracking on feedback links |
| 86 | +// Bucket settings for click tracking across the plugin |
87 | 87 | $wgArticleFeedbackv5Tracking = array( |
88 | 88 | // Not all users need to be tracked, but we do want to track some users over time - these |
89 | 89 | // buckets are used when deciding to track someone or not, placing them in one of two buckets: |
— | — | @@ -91,8 +91,8 @@ |
92 | 92 | // this number to ensure the new odds are applied to everyone, not just people who have yet to |
93 | 93 | // be placed in a bucket. |
94 | 94 | 'buckets' => array( |
95 | | - 'ignore' => 100, |
96 | | - 'track' => 0, |
| 95 | + 'ignore' => 0, |
| 96 | + 'track' => 100, |
97 | 97 | ), |
98 | 98 | // This version number is added to all tracking event names, so that changes in the software |
99 | 99 | // don't corrupt the data being collected. Bump this when you want to start a new "experiment". |
— | — | @@ -242,11 +242,11 @@ |
243 | 243 | $wgHooks['ArticleSaveComplete'][] = 'ArticleFeedbackv5Hooks::trackEdit'; |
244 | 244 | |
245 | 245 | // API Registration |
246 | | -$wgAPIListModules['articlefeedbackv5-view-ratings'] = 'ApiViewRatingsArticleFeedbackv5'; |
| 246 | +//$wgAPIListModules['articlefeedbackv5-view-ratings'] = 'ApiViewRatingsArticleFeedbackv5'; |
247 | 247 | //$wgAPIListModules['articlefeedbackv5-view-feedback'] = 'ApiViewFeedbackArticleFeedbackv5'; |
248 | | -$wgAPIModules['articlefeedbackv5-flag-feedback'] = 'ApiFlagFeedbackArticleFeedbackv5'; |
| 248 | +//$wgAPIModules['articlefeedbackv5-flag-feedback'] = 'ApiFlagFeedbackArticleFeedbackv5'; |
249 | 249 | $wgAPIModules['articlefeedbackv5'] = 'ApiArticleFeedbackv5'; |
250 | 250 | |
251 | 251 | // Special Page |
252 | 252 | //$wgSpecialPages['ArticleFeedbackv5'] = 'SpecialArticleFeedbackv5'; |
253 | | -$wgSpecialPageGroups['ArticleFeedbackv5'] = 'other'; |
| 253 | +//$wgSpecialPageGroups['ArticleFeedbackv5'] = 'other'; |
Property changes on: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
254 | 254 | Merged /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php:r106201-106322 |
Property changes on: branches/wmf/1.18wmf1/extensions/ArticleFeedbackv5 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
255 | 255 | Merged /trunk/extensions/ArticleFeedbackv5:r106201-106322 |