Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -9,13 +9,16 @@ |
10 | 10 | */ |
11 | 11 | $messages['en'] = array( |
12 | 12 | // CTA translations |
13 | | - 'articlefeedbackv5-cta1-thanks' => 'Thanks!', |
14 | | - 'articlefeedbackv5-cta1-confirmation-followup' => 'Your feedback has been saved.', |
| 13 | + 'articlefeedbackv5-cta-thanks' => 'Thanks!', |
| 14 | + 'articlefeedbackv5-cta-confirmation-followup' => 'Your feedback has been saved.', |
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 | 18 | 'articlefeedbackv5-cta1-learn-how-url' => 'http://en.wikipedia.org/wiki/Wikipedia:Tutorial', |
19 | 19 | 'articlefeedbackv5-cta1-edit-linktext' => 'Edit this page', |
| 20 | + 'articlefeedbackv5-cta2-confirmation-title' => 'Help improve Wikipedia', |
| 21 | + 'articlefeedbackv5-cta2-confirmation-call' => 'This encyclopedia is created by people like you. Can you give us a hand?', |
| 22 | + 'articlefeedbackv5-cta2-button-text' => 'Learn more', |
20 | 23 | |
21 | 24 | // error messages |
22 | 25 | 'articlefeedbackv5-error' => 'An error has occured. Please try again later.', |
— | — | @@ -270,6 +273,18 @@ |
271 | 274 | Please visit http://prototype.wikimedia.org/articleassess/Main_Page for a prototype installation.', |
272 | 275 | 'articlefeedbackv5-desc' => '{{desc}}', |
273 | 276 | |
| 277 | + /* CTAs */ |
| 278 | + 'articlefeedbackv5-cta-thanks' => 'The bolded part of the message that appears at the top of every CTA', |
| 279 | + 'articlefeedbackv5-cta-confirmation-followup' => 'The non-bolded part of the message that appears at the top of every CTA', |
| 280 | + 'articlefeedbackv5-cta1-confirmation-title' => 'The title of the edit CTA', |
| 281 | + 'articlefeedbackv5-cta1-confirmation-call' => 'The text of the edit CTA', |
| 282 | + 'articlefeedbackv5-cta1-learn-how' => 'The link below the text on the edit CTA, pointing to the edit tutorial', |
| 283 | + 'articlefeedbackv5-cta1-learn-how-url' => 'The link to the edit tutorial', |
| 284 | + 'articlefeedbackv5-cta1-edit-linktext' => 'The explanatory text for the button on the edit CTA', |
| 285 | + 'articlefeedbackv5-cta2-confirmation-title' => 'The title of the learn more CTA', |
| 286 | + 'articlefeedbackv5-cta2-confirmation-call' => 'The explanatory text of the learn more CTA', |
| 287 | + 'articlefeedbackv5-cta2-button-text' => 'The text for the button on the learn more CTA', |
| 288 | + |
274 | 289 | /* Feedback forms */ |
275 | 290 | /* Option 1 ("Did you find what you were looking for?") */ |
276 | 291 | 'articlefeedbackv5-bucket1-title' => 'This is the title of the feedback form for option 1 ("Did you find what you were looking for?" with yes/no buttons, plus a comment box)', |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.css |
— | — | @@ -650,7 +650,7 @@ |
651 | 651 | box-shadow: -2px 2px 1px #999; |
652 | 652 | } |
653 | 653 | |
654 | | -.articleFeedbackv5-ui .articleFeedbackv5-edit-cta-link { |
| 654 | +.articleFeedbackv5-ui .articleFeedbackv5-cta-button { |
655 | 655 | float: right; |
656 | 656 | position: relative; |
657 | 657 | bottom: 10px; |
— | — | @@ -871,7 +871,7 @@ |
872 | 872 | .articleFeedbackv5-confirmation-panel .articleFeedbackv5-panel-leftContent .articleFeedbackv5-confirmation-learnHow { |
873 | 873 | font-weight: bold; |
874 | 874 | } |
875 | | -.articleFeedbackv5-ui .articleFeedbackv5-edit-cta-link { |
| 875 | +.articleFeedbackv5-ui .articleFeedbackv5-cta-button { |
876 | 876 | float: left; |
877 | 877 | height: 35px !important; |
878 | 878 | width: auto; |
— | — | @@ -890,14 +890,14 @@ |
891 | 891 | box-shadow: -2px 2px 1px #999; |
892 | 892 | } |
893 | 893 | /*.articleFeedbackv5-option-4 .articleFeedbackv5-submit,*/ |
894 | | -.articleFeedbackv5-ui .articleFeedbackv5-edit-cta-link { |
| 894 | +.articleFeedbackv5-ui .articleFeedbackv5-cta-button { |
895 | 895 | float: right; |
896 | 896 | position: relative; |
897 | 897 | bottom: 10px; |
898 | 898 | margin: 105px 0 0 !important; |
899 | 899 | } |
900 | 900 | |
901 | | -.articleFeedbackv5-ui .articleFeedbackv5-edit-cta-link span{ |
| 901 | +.articleFeedbackv5-ui .articleFeedbackv5-cta-button span { |
902 | 902 | font-size: 14px; |
903 | 903 | font-weight: bold; |
904 | 904 | display: inline-block; |
— | — | @@ -967,12 +967,19 @@ |
968 | 968 | text-decoration: none; |
969 | 969 | } |
970 | 970 | |
971 | | -.articleFeedbackv5-cta-1 .articleFeedbackv5-tooltip { |
| 971 | +.articleFeedbackv5-cta-0 .articleFeedbackv5-tooltip, |
| 972 | +.articleFeedbackv5-cta-1 .articleFeedbackv5-tooltip, |
| 973 | +.articleFeedbackv5-cta-2 .articleFeedbackv5-tooltip { |
972 | 974 | top: -405px; |
973 | 975 | right: -68px; |
974 | 976 | } |
975 | 977 | |
976 | | -.articleFeedbackv5-panel .articleFeedbackv5-cta-1 h2.articleFeedbackv5-title { |
| 978 | +.articleFeedbackv5-panel .articleFeedbackv5-cta-0 h2.articleFeedbackv5-title, |
| 979 | +.articleFeedbackv5-panel .articleFeedbackv5-cta-1 h2.articleFeedbackv5-title, |
| 980 | +.articleFeedbackv5-panel .articleFeedbackv5-cta-2 h2.articleFeedbackv5-title { |
977 | 981 | font-weight: normal; |
978 | 982 | } |
979 | 983 | |
| 984 | +.articleFeedbackv5-panel .articleFeedbackv5-cta-2 .articleFeedbackv5-cta-button { |
| 985 | + margin-top: 50px !important; |
| 986 | +} |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -193,8 +193,8 @@ |
194 | 194 | |
195 | 195 | ctaTitleConfirm: '\ |
196 | 196 | <div class="articleFeedbackv5-confirmation-text">\ |
197 | | - <span class="articleFeedbackv5-confirmation-thanks"><html:msg key="cta1-thanks" /></span>\ |
198 | | - <span class="articleFeedbackv5-confirmation-follow-up"><html:msg key="cta1-confirmation-followup" /></span>\ |
| 197 | + <span class="articleFeedbackv5-confirmation-thanks"><html:msg key="cta-thanks" /></span>\ |
| 198 | + <span class="articleFeedbackv5-confirmation-follow-up"><html:msg key="cta-confirmation-followup" /></span>\ |
199 | 199 | </div>\ |
200 | 200 | ', |
201 | 201 | |
— | — | @@ -1851,7 +1851,7 @@ |
1852 | 1852 | <p class="articleFeedbackv5-confirmation-wikipediaWorks"><html:msg key="cta1-confirmation-call" /></p>\ |
1853 | 1853 | <p class="articleFeedbackv5-confirmation-learnHow"><a target="_blank" href="#"><html:msg key="cta1-learn-how" /> »</a></p>\ |
1854 | 1854 | </div>\ |
1855 | | - <a href="&action=edit" class="articleFeedbackv5-edit-cta-link"><span class="ui-button-text"><html:msg key="cta1-edit-linktext" /></span></a>\ |
| 1855 | + <a href="&action=edit" class="articleFeedbackv5-cta-button"><span class="ui-button-text"><html:msg key="cta1-edit-linktext" /></span></a>\ |
1856 | 1856 | <div class="clear"></div>\ |
1857 | 1857 | </div>\ |
1858 | 1858 | ' |
— | — | @@ -1916,6 +1916,59 @@ |
1917 | 1917 | |
1918 | 1918 | // }}} |
1919 | 1919 | |
| 1920 | + }, |
| 1921 | + |
| 1922 | + // }}} |
| 1923 | + // {{{ CTA 2: Learn more |
| 1924 | + |
| 1925 | + '2': { |
| 1926 | + |
| 1927 | + // {{{ templates |
| 1928 | + |
| 1929 | + /** |
| 1930 | + * Pull out the markup so it's easy to find |
| 1931 | + */ |
| 1932 | + templates: { |
| 1933 | + |
| 1934 | + /** |
| 1935 | + * The template for the whole block |
| 1936 | + */ |
| 1937 | + block: '\ |
| 1938 | + <div class="clear"></div>\ |
| 1939 | + <div class="articleFeedbackv5-confirmation-panel">\ |
| 1940 | + <div class="articleFeedbackv5-panel-leftContent">\ |
| 1941 | + <h3 class="articleFeedbackv5-confirmation-title"><html:msg key="cta2-confirmation-title" /></h3>\ |
| 1942 | + <p class="articleFeedbackv5-confirmation-wikipediaWorks"><html:msg key="cta2-confirmation-call" /></p>\ |
| 1943 | + </div>\ |
| 1944 | + <a href="&action=edit" class="articleFeedbackv5-cta-button"><span class="ui-button-text"><html:msg key="cta2-button-text" /></span></a>\ |
| 1945 | + <div class="clear"></div>\ |
| 1946 | + </div>\ |
| 1947 | + ' |
| 1948 | + |
| 1949 | + }, |
| 1950 | + |
| 1951 | + // }}} |
| 1952 | + // {{{ build |
| 1953 | + |
| 1954 | + /** |
| 1955 | + * Builds the CTA |
| 1956 | + * |
| 1957 | + * @return Element the form |
| 1958 | + */ |
| 1959 | + build: function () { |
| 1960 | + |
| 1961 | + // Start up the block to return |
| 1962 | + var $block = $( $.articleFeedbackv5.currentCTA().templates.block ); |
| 1963 | + |
| 1964 | + // Fill in the button link |
| 1965 | + $block.find( '.articleFeedbackv5-cta-button' ) |
| 1966 | + .attr( 'href', mw.msg( 'articlefeedbackv5-cta1-learn-how-url' ) ); |
| 1967 | + |
| 1968 | + return $block; |
| 1969 | + } |
| 1970 | + |
| 1971 | + // }}} |
| 1972 | + |
1920 | 1973 | } |
1921 | 1974 | |
1922 | 1975 | // }}} |
— | — | @@ -2349,7 +2402,6 @@ |
2350 | 2403 | && 'cta_id' in data.articlefeedbackv5 ) { |
2351 | 2404 | $.articleFeedbackv5.feedbackId = data.articlefeedbackv5.feedback_id; |
2352 | 2405 | $.articleFeedbackv5.selectCTA( data.articlefeedbackv5.cta_id ); |
2353 | | - $.articleFeedbackv5.ctaId = data.articlefeedbackv5.cta_id; |
2354 | 2406 | $.articleFeedbackv5.unlockForm(); |
2355 | 2407 | $.articleFeedbackv5.showCTA(); |
2356 | 2408 | // Drop a cookie for a successful submit |
— | — | @@ -2400,7 +2452,7 @@ |
2401 | 2453 | temp = $.articleFeedbackv5.ctas[requested]; |
2402 | 2454 | if ( 'verify' in temp ) { |
2403 | 2455 | if ( !temp.verify() ) { |
2404 | | - requested = '0'; |
| 2456 | + requested = requested == '1' ? '2' : '0'; |
2405 | 2457 | } |
2406 | 2458 | } |
2407 | 2459 | $.articleFeedbackv5.ctaId = requested; |
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php |
— | — | @@ -54,13 +54,16 @@ |
55 | 55 | 'articlefeedbackv5-error-nofeedback', |
56 | 56 | 'articlefeedbackv5-error-unknown', |
57 | 57 | 'articlefeedbackv5-error-submit', |
58 | | - 'articlefeedbackv5-cta1-thanks', |
59 | | - 'articlefeedbackv5-cta1-confirmation-followup', |
| 58 | + 'articlefeedbackv5-cta-thanks', |
| 59 | + 'articlefeedbackv5-cta-confirmation-followup', |
60 | 60 | 'articlefeedbackv5-cta1-confirmation-title', |
61 | 61 | 'articlefeedbackv5-cta1-confirmation-call', |
62 | 62 | 'articlefeedbackv5-cta1-learn-how', |
63 | 63 | 'articlefeedbackv5-cta1-learn-how-url', |
64 | 64 | 'articlefeedbackv5-cta1-edit-linktext', |
| 65 | + 'articlefeedbackv5-cta2-confirmation-title', |
| 66 | + 'articlefeedbackv5-cta2-confirmation-call', |
| 67 | + 'articlefeedbackv5-cta2-button-text', |
65 | 68 | 'articlefeedbackv5-bucket1-title', |
66 | 69 | 'articlefeedbackv5-bucket1-question-toggle', |
67 | 70 | 'articlefeedbackv5-bucket1-toggle-found-yes', |