Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.i18n.php |
— | — | @@ -447,7 +447,7 @@ |
448 | 448 | 'moodbar-type-confused-title' => 'Зьмешаныя пачуцьці', |
449 | 449 | 'tooltip-moodbar-what' => 'Даведацца болей пра гэтую магчымасьць', |
450 | 450 | 'moodbar-what-label' => 'Што гэта?', |
451 | | - 'moodbar-what-content' => 'Гэтая магчымасьць распрацаваная для дапамогі супольнасьці зразумець вопыт людзей, якія рэдагуюць сайт. |
| 451 | + 'moodbar-what-content' => 'Гэтая магчымасьць распрацаваная для дапамогі супольнасьці зразумець вопыт людзей, якія рэдагуюць сайт. |
452 | 452 | Для дадатковай інфармацыі, калі ласка, наведайце $1.', |
453 | 453 | 'moodbar-what-link' => 'старонка магчымасьці', |
454 | 454 | 'moodbar-privacy' => 'Дасылаючы, Вы пагаджаецеся на доступ на гэтых $1.', |
— | — | @@ -1313,6 +1313,49 @@ |
1314 | 1314 | 'moodbar-log-restore' => 'restaurou a visibilidade de "[[$1]]"', |
1315 | 1315 | ); |
1316 | 1316 | |
| 1317 | +/** Swiss German (Alemannisch) |
| 1318 | + * @author Als-Chlämens |
| 1319 | + */ |
| 1320 | +$messages['gsw'] = array( |
| 1321 | + 'moodbar-trigger-feedback' => 'Ruggmäldig über Bearbeite', |
| 1322 | + 'moodbar-close' => '(zuemache)', |
| 1323 | + 'moodbar-type-happy-title' => 'Glicklig', |
| 1324 | + 'moodbar-type-sad-title' => 'Truurig', |
| 1325 | + 'moodbar-admin-empty' => 'Kei Ergebniss', |
| 1326 | + 'moodbar-header-id' => 'Ruggmäldigs-ID', |
| 1327 | + 'moodbar-header-timestamp' => 'Zytstämpfel', |
| 1328 | + 'moodbar-header-type' => 'Typ', |
| 1329 | + 'moodbar-header-page' => 'Syte', |
| 1330 | + 'moodbar-header-usertype' => 'Benutzerart', |
| 1331 | + 'moodbar-header-user' => 'Benutzer', |
| 1332 | + 'moodbar-header-editmode' => 'Bearbeitigsmodus', |
| 1333 | + 'moodbar-header-bucket' => 'Testumgäbig', |
| 1334 | + 'moodbar-header-system' => 'Systemtyp', |
| 1335 | + 'moodbar-header-locale' => 'Gebietsschema', |
| 1336 | + 'moodbar-header-useragent' => 'Browser', |
| 1337 | + 'moodbar-header-comment' => 'Kommentar', |
| 1338 | + 'moodbar-header-user-editcount' => 'Bearbeitigszääler', |
| 1339 | + 'moodbar-header-namespace' => 'Namensruum', |
| 1340 | + 'moodbar-header-own-talk' => 'Eigeni Diskussionssyte', |
| 1341 | + 'moodbar-feedback-title' => 'Ruggmäldigs-Brett', |
| 1342 | + 'moodbar-feedback-filters' => 'Filter', |
| 1343 | + 'moodbar-feedback-filters-type' => 'Launi', |
| 1344 | + 'moodbar-feedback-filters-type-happy' => 'Glicklig', |
| 1345 | + 'moodbar-feedback-filters-type-confused' => 'Verwirrt', |
| 1346 | + 'moodbar-feedback-filters-type-sad' => 'Truurig', |
| 1347 | + 'moodbar-feedback-filters-username' => 'Benutzername', |
| 1348 | + 'moodbar-feedback-filters-button' => 'Filter setze', |
| 1349 | + 'moodbar-type-happy' => 'Glicklig', |
| 1350 | + 'moodbar-type-sad' => 'Truurig', |
| 1351 | + 'moodbar-type-confused' => 'verwirrt', |
| 1352 | + 'moodbar-user-anonymized' => 'Anonymisiert', |
| 1353 | + 'moodbar-user-ip' => 'IP-Adräss', |
| 1354 | + 'moodbar-user-user' => 'Registrierte Benutzer', |
| 1355 | + 'moodbar-log-name' => 'Ruggmäldigs-Logbuech', |
| 1356 | + 'moodbar-log-hide' => 'het [[$1]] ussbländet', |
| 1357 | + 'moodbar-log-restore' => 'het [[$1]] wiider yybländet', |
| 1358 | +); |
| 1359 | + |
1317 | 1360 | /** Hebrew (עברית) |
1318 | 1361 | * @author Amire80 |
1319 | 1362 | */ |
— | — | @@ -1394,6 +1437,7 @@ |
1395 | 1438 | 'moodbar-hide-header' => 'הסתרת הפריט הזה מהתצוגה', |
1396 | 1439 | 'moodbar-restore-header' => 'שחזור הנראוּת של הפריט הזה', |
1397 | 1440 | 'moodbar-invalid-item' => 'המערכת לא הצליחה למצא את פריט המשוב הנכון.', |
| 1441 | + 'moodbar-feedback-action-error' => 'אירעה שגיאה בעת ניסיון לבצע את הפעולה הזאת.', |
1398 | 1442 | 'moodbar-type-happy' => 'שמחה', |
1399 | 1443 | 'moodbar-type-sad' => 'עצב', |
1400 | 1444 | 'moodbar-type-confused' => 'בלבול', |
— | — | @@ -1406,6 +1450,21 @@ |
1407 | 1451 | 'moodbar-log-restore' => 'שחזר את הנראוּת של [[$1]]', |
1408 | 1452 | ); |
1409 | 1453 | |
| 1454 | +/** Upper Sorbian (Hornjoserbsce) |
| 1455 | + * @author Michawiki |
| 1456 | + */ |
| 1457 | +$messages['hsb'] = array( |
| 1458 | + 'moodbar-close' => '(začinić)', |
| 1459 | + 'moodbar-what-label' => 'Što to je?', |
| 1460 | + 'moodbar-header-type' => 'Typ', |
| 1461 | + 'moodbar-header-page' => 'Strona', |
| 1462 | + 'moodbar-header-user' => 'Wužiwar', |
| 1463 | + 'moodbar-header-comment' => 'Komentary', |
| 1464 | + 'moodbar-header-namespace' => 'Mjenowy rum', |
| 1465 | + 'moodbar-feedback-filters' => 'Filtry', |
| 1466 | + 'moodbar-feedback-filters-username' => 'Wužiwarske mjeno', |
| 1467 | +); |
| 1468 | + |
1410 | 1469 | /** Interlingua (Interlingua) |
1411 | 1470 | * @author McDutchie |
1412 | 1471 | */ |
— | — | @@ -1417,7 +1476,7 @@ |
1418 | 1477 | 'moodbar-close' => '(clauder)', |
1419 | 1478 | 'moodbar-intro-feedback' => 'Modificar $1 me rendeva…', |
1420 | 1479 | 'moodbar-intro-share' => 'Mi experientia in $1 me rendeva…', |
1421 | | - 'moodbar-intro-editing' => 'Le uso de $1 me rendeva...', |
| 1480 | + 'moodbar-intro-editing' => 'Modificar $1 me rendeva…', |
1422 | 1481 | 'moodbar-type-happy-title' => 'Felice', |
1423 | 1482 | 'moodbar-type-sad-title' => 'Triste', |
1424 | 1483 | 'moodbar-type-confused-title' => 'Confuse', |
— | — | @@ -1486,6 +1545,7 @@ |
1487 | 1546 | 'moodbar-hide-header' => 'Render iste elemento invisibile', |
1488 | 1547 | 'moodbar-restore-header' => 'Restaurar le visibilitate de iste elemento', |
1489 | 1548 | 'moodbar-invalid-item' => 'Le systema non poteva trovar le elemento de retroaction correcte.', |
| 1549 | + 'moodbar-feedback-action-error' => 'Un error occurreva durante le tentativa de exequer iste action.', |
1490 | 1550 | 'moodbar-type-happy' => 'Felice', |
1491 | 1551 | 'moodbar-type-sad' => 'Triste', |
1492 | 1552 | 'moodbar-type-confused' => 'Confuse', |
— | — | @@ -1751,9 +1811,13 @@ |
1752 | 1812 | 'moodbar-header-user-editcount' => 'ഉപയോക്തൃ തിരുത്തലുകളുടെ എണ്ണം', |
1753 | 1813 | 'moodbar-header-namespace' => 'നാമമേഖല', |
1754 | 1814 | 'moodbar-header-own-talk' => 'സ്വന്തം സംവാദം താൾ', |
| 1815 | + 'moodbar-feedback-filters' => 'അരിപ്പകൾ', |
1755 | 1816 | 'moodbar-feedback-filters-type' => 'തരം:', |
1756 | 1817 | 'moodbar-feedback-filters-username' => 'ഉപയോക്തൃനാമം', |
| 1818 | + 'moodbar-feedback-filters-button' => 'അരിപ്പകൾ സജ്ജീകരിക്കുക', |
| 1819 | + 'moodbar-feedback-permalink' => 'ഇങ്ങോട്ടുള്ള കണ്ണികൾ', |
1757 | 1820 | 'moodbar-feedback-more' => 'കൂടുതൽ', |
| 1821 | + 'moodbar-feedback-nomore' => 'പ്രദർശിപ്പിക്കാൻ കൂടുതൽ ഫലങ്ങളിലില്ല.', |
1758 | 1822 | 'moodbar-feedback-newer' => 'പുതിയവ', |
1759 | 1823 | 'moodbar-feedback-older' => 'പഴയവ', |
1760 | 1824 | 'moodbar-feedback-ajaxerror' => 'കൂടുതൽ ഫലങ്ങൾ ശേഖരിക്കുന്നതിനിടെ പിഴവുണ്ടയി.', |
— | — | @@ -1939,6 +2003,7 @@ |
1940 | 2004 | 'moodbar-hide-header' => 'Dit item verbergen uit weergave', |
1941 | 2005 | 'moodbar-restore-header' => 'De zichtbaarheid van dit item herstellen', |
1942 | 2006 | 'moodbar-invalid-item' => 'Het systeem kon het juiste terugkoppelingsitem niet vinden.', |
| 2007 | + 'moodbar-feedback-action-error' => 'Er is een fout opgetreden tijdens het uitvoeren van deze handeling.', |
1943 | 2008 | 'moodbar-type-happy' => 'Blij', |
1944 | 2009 | 'moodbar-type-sad' => 'Triest', |
1945 | 2010 | 'moodbar-type-confused' => 'Verward', |
— | — | @@ -2005,9 +2070,9 @@ |
2006 | 2071 | 'moodbar-intro-feedback' => 'Edytowanie {{GRAMMAR:D.lp|$1}} przyniosło mi...', |
2007 | 2072 | 'moodbar-intro-share' => 'Moje doświadczenie w {{GRAMMAR:MS.lp|$1}} przyniosło mi...', |
2008 | 2073 | 'moodbar-intro-editing' => 'Edytowanie {{GRAMMAR:D.lp|$1}} przyniosło mi...', |
2009 | | - 'moodbar-type-happy-title' => 'zadowolenie', |
2010 | | - 'moodbar-type-sad-title' => 'rozczarowanie', |
2011 | | - 'moodbar-type-confused-title' => 'mieszane uczucia', |
| 2074 | + 'moodbar-type-happy-title' => 'bez problemu', |
| 2075 | + 'moodbar-type-sad-title' => 'koszmar', |
| 2076 | + 'moodbar-type-confused-title' => 'z kłopotami', |
2012 | 2077 | 'tooltip-moodbar-what' => 'Więcej informacji na temat tej funkcji', |
2013 | 2078 | 'moodbar-what-label' => 'O co tu chodzi?', |
2014 | 2079 | 'moodbar-what-content' => 'To narzędzie pomaga społeczności zrozumieć doświadczenia osób edytujących projekt. |
— | — | @@ -2049,10 +2114,10 @@ |
2050 | 2115 | 'moodbar-header-own-talk' => 'Własna strona dyskusji', |
2051 | 2116 | 'moodbar-feedback-title' => 'Tablica z otrzymanymi opiniami', |
2052 | 2117 | 'moodbar-feedback-filters' => 'Filtrowanie', |
2053 | | - 'moodbar-feedback-filters-type' => 'Nastrój', |
2054 | | - 'moodbar-feedback-filters-type-happy' => 'szczęśliwy', |
2055 | | - 'moodbar-feedback-filters-type-confused' => 'mieszane uczucia', |
2056 | | - 'moodbar-feedback-filters-type-sad' => 'smutny', |
| 2118 | + 'moodbar-feedback-filters-type' => 'Wrażenia', |
| 2119 | + 'moodbar-feedback-filters-type-happy' => 'Bez problemu', |
| 2120 | + 'moodbar-feedback-filters-type-confused' => 'Z kłopotami', |
| 2121 | + 'moodbar-feedback-filters-type-sad' => 'Koszmar', |
2057 | 2122 | 'moodbar-feedback-filters-username' => 'Nazwa użytkownika', |
2058 | 2123 | 'moodbar-feedback-filters-button' => 'Filtruj', |
2059 | 2124 | 'moodbar-feedback-whatis' => 'Jak działa to narzędzie?', |
— | — | @@ -2068,9 +2133,9 @@ |
2069 | 2134 | 'moodbar-feedback-show' => 'pokaż ukrytą opinię', |
2070 | 2135 | 'moodbar-feedback-hide' => 'ukryj opinię', |
2071 | 2136 | 'moodbar-feedback-restore' => 'przywróć ukrytą opinię', |
2072 | | - 'moodbar-type-happy' => 'Szczęśliwy', |
2073 | | - 'moodbar-type-sad' => 'Smutny', |
2074 | | - 'moodbar-type-confused' => 'Zmieszany', |
| 2137 | + 'moodbar-type-happy' => 'Bez problemu', |
| 2138 | + 'moodbar-type-sad' => 'Koszmar', |
| 2139 | + 'moodbar-type-confused' => 'Z kłopotami', |
2075 | 2140 | 'moodbar-user-anonymized' => 'Anonimowo', |
2076 | 2141 | 'moodbar-user-ip' => 'Adres IP', |
2077 | 2142 | 'moodbar-user-user' => 'Zarejestrowany użytkownik', |
— | — | @@ -2676,6 +2741,7 @@ |
2677 | 2742 | 'moodbar-success-subtitle' => 'Dela din redigeringsupplevelse så hjälper du oss att förbättra $1 .', |
2678 | 2743 | 'moodbar-error-subtitle' => 'Något gick fel! Prova att ge din feedback senare.', |
2679 | 2744 | 'right-moodbar-view' => 'Visa och exportera MoodBar feedback', |
| 2745 | + 'right-moodbar-admin' => 'Ändra synlighet på feedback instrumentpanelen', |
2680 | 2746 | 'moodbar-admin-title' => 'MoodBar feedback', |
2681 | 2747 | 'moodbar-admin-intro' => 'Den här sidan låter dig se feedback som har skickats in med MoodBar.', |
2682 | 2748 | 'moodbar-admin-empty' => 'Inga resultat', |
— | — | @@ -2694,15 +2760,43 @@ |
2695 | 2761 | 'moodbar-header-user-editcount' => 'Användarens antal redigeringar', |
2696 | 2762 | 'moodbar-header-namespace' => 'Namnrymd', |
2697 | 2763 | 'moodbar-header-own-talk' => 'Egen diskussionssida', |
| 2764 | + 'moodbar-feedback-title' => 'Feedback instrumentpanelen', |
| 2765 | + 'moodbar-feedback-filters' => 'Filter', |
| 2766 | + 'moodbar-feedback-filters-type' => 'Humör:', |
| 2767 | + 'moodbar-feedback-filters-type-happy' => 'Glad', |
| 2768 | + 'moodbar-feedback-filters-type-confused' => 'Förvirrad', |
| 2769 | + 'moodbar-feedback-filters-type-sad' => 'Ledsen', |
2698 | 2770 | 'moodbar-feedback-filters-username' => 'Användarnamn', |
| 2771 | + 'moodbar-feedback-filters-button' => 'Filtrera', |
| 2772 | + 'moodbar-feedback-whatis' => 'Vad är det här för funktion?', |
| 2773 | + 'moodbar-feedback-permalink' => 'Länka hit', |
| 2774 | + 'moodbar-feedback-noresults' => 'Det finns inga kommentarer som matchar ditt filter.', |
| 2775 | + 'moodbar-feedback-more' => 'Mer', |
| 2776 | + 'moodbar-feedback-nomore' => 'Det finns inga mer resultat att visa.', |
2699 | 2777 | 'moodbar-feedback-newer' => 'Nyare', |
2700 | 2778 | 'moodbar-feedback-older' => 'Äldre', |
| 2779 | + 'moodbar-feedback-ajaxerror' => 'Ett fel uppstod vid hämtandet av fler resultat.', |
| 2780 | + 'moodbar-user-hidden' => '(Användare dold)', |
| 2781 | + 'moodbar-comment-hidden' => '(Feedback dold genom administrativa åtgärder)', |
| 2782 | + 'moodbar-feedback-show' => 'Visa dold feedback', |
| 2783 | + 'moodbar-feedback-hide' => 'dölja feedback', |
| 2784 | + 'moodbar-hidden-footer' => 'Dold Feedback$1', |
| 2785 | + 'moodbar-feedback-restore' => 'återställa dold feedback', |
| 2786 | + 'moodbar-action-item' => 'Feedback objekt:', |
| 2787 | + 'moodbar-hide-header' => 'Dölj detta objekt från vyn', |
| 2788 | + 'moodbar-restore-header' => 'Återställa detta objekts synlighet', |
| 2789 | + 'moodbar-invalid-item' => 'Systemet kunde inte hitta korrekt feedbackobjekt.', |
| 2790 | + 'moodbar-feedback-action-error' => 'Ett fel inträffade när åtgärden utfördes.', |
2701 | 2791 | 'moodbar-type-happy' => 'Glad', |
2702 | 2792 | 'moodbar-type-sad' => 'Ledsen', |
2703 | 2793 | 'moodbar-type-confused' => 'Förvirrad', |
2704 | 2794 | 'moodbar-user-anonymized' => 'Anonymiserad', |
2705 | 2795 | 'moodbar-user-ip' => 'IP-adress', |
2706 | 2796 | 'moodbar-user-user' => 'Registrerad användare', |
| 2797 | + 'moodbar-log-name' => 'Feedback log', |
| 2798 | + 'moodbar-log-header' => 'Detta är loggen av åtgärder som vidtas på de feedback objekt som finns förtecknade på [[Special:FeedbackDashboard|feedback instrumentpanelen]].', |
| 2799 | + 'moodbar-log-hide' => 'dolde [[$1]]', |
| 2800 | + 'moodbar-log-restore' => 'återställde synlighet för [[$1]]', |
2707 | 2801 | ); |
2708 | 2802 | |
2709 | 2803 | /** Telugu (తెలుగు) |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -22,11 +22,11 @@ |
23 | 23 | </div>\ |
24 | 24 | <div class="mw-moodBar-form">\ |
25 | 25 | <div class="mw-moodBar-formTitle">\ |
26 | | - <span class="mw-moodBar-formNote"><html:msg key="moodbar-form-note" /></span>\ |
| 26 | + <span class="mw-moodBar-formNote"><span id="mw-moodBar-charCount"></span><html:msg key="moodbar-form-note-dynamic" /></span>\ |
27 | 27 | <html:msg key="moodbar-form-title" />\ |
28 | 28 | </div>\ |
29 | 29 | <div class="mw-moodBar-formInputs">\ |
30 | | - <textarea rows="3" maxlength="140" class="mw-moodBar-formInput" /></textarea>\ |
| 30 | + <textarea rows="3" maxlength="140" id="mw-moodBar-feedbackInput" class="mw-moodBar-formInput" /></textarea>\ |
31 | 31 | <div class="mw-moodBar-privacy"></div>\ |
32 | 32 | <input type="button" class="mw-moodBar-formSubmit" disabled="disabled" />\ |
33 | 33 | </div>\ |
— | — | @@ -207,6 +207,22 @@ |
208 | 208 | } |
209 | 209 | ) |
210 | 210 | .end() |
| 211 | + // set up character count |
| 212 | + .find( '.mw-moodBar-formNote' ) |
| 213 | + .html( |
| 214 | + function() { |
| 215 | + var message, counterElement; |
| 216 | + message = mw.msg( 'moodbar-form-note-dynamic' ); |
| 217 | + counterElement = mw.html.element( 'span', { |
| 218 | + 'id': 'mw-moodBar-charCount', |
| 219 | + } ); |
| 220 | + return mw.html.escape( message ) |
| 221 | + .replace( /\$1/, counterElement ); |
| 222 | + } |
| 223 | + ) |
| 224 | + .end() |
| 225 | + |
| 226 | + |
211 | 227 | // Submit |
212 | 228 | .find( '.mw-moodBar-formSubmit' ) |
213 | 229 | .val( mw.msg( 'moodbar-form-submit' ) ) |
— | — | @@ -216,6 +232,11 @@ |
217 | 233 | $.moodBar.submit( mb.feedbackItem ); |
218 | 234 | } ) |
219 | 235 | .end(); |
| 236 | + |
| 237 | + // Set up character counter |
| 238 | + // This is probably not the right way to do this. |
| 239 | + $( '#mw-moodBar-feedbackInput' ).NobleCount('#mw-moodBar-charCount', {max_chars:140}); |
| 240 | + |
220 | 241 | }, |
221 | 242 | |
222 | 243 | core: function() { |
— | — | @@ -249,7 +270,7 @@ |
250 | 271 | |
251 | 272 | mb.ui.overlay.width(newWidth); |
252 | 273 | mb.ui.overlay.hide(); |
253 | | - |
| 274 | + |
254 | 275 | // Bind triger |
255 | 276 | mb.ui.trigger.click( mb.event.trigger ); |
256 | 277 | }, |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/images/icon-speechbubble-blue.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/images/icon-speechbubble-blue.png |
___________________________________________________________________ |
Added: svn:mime-type |
257 | 278 | + image/png |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.css |
— | — | @@ -12,4 +12,8 @@ |
13 | 13 | white-space: nowrap; |
14 | 14 | line-height: 1.125em; |
15 | 15 | text-transform: none; |
| 16 | + /* @embed */ |
| 17 | + background: url(images/icon-speechbubble-blue.png); |
| 18 | + background-repeat: no-repeat; |
| 19 | + padding-left: 18px; |
16 | 20 | } |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.NobleCount/jquery.NobleCount.js |
— | — | @@ -0,0 +1,480 @@ |
| 2 | +/****************************************************************************************************** |
| 3 | + |
| 4 | + jQuery.NobleCount |
| 5 | + |
| 6 | + Author Jeremy Horn |
| 7 | + Version 1.0 |
| 8 | + Date: 3/21/2010 |
| 9 | + |
| 10 | + Copyright (c) 2010 Jeremy Horn- jeremydhorn(at)gmail(dot)c0m | http://tpgblog.com |
| 11 | + Dual licensed under MIT and GPL. |
| 12 | + |
| 13 | + DESCRIPTION |
| 14 | + NobleCount... for a more 'proper' count of the characters remaining. |
| 15 | + |
| 16 | + NobleCount is a customizable jQuery plugin for a more the improved counting of the remaining |
| 17 | + characters, and resulting behaviors, of a text entry object, e.g. input textfield, textarea. |
| 18 | + |
| 19 | + As text is entered into the target text area an object for the purposes of tracking |
| 20 | + the total number of characters remaining, defined as the maximum number of characters |
| 21 | + minus the current total number of characters within the text entry object, and storing |
| 22 | + that information visually and/or within the DOM as an HTML 5 compliant data-* attribute. |
| 23 | + |
| 24 | + Events and CSS Class alterations, if defined, are triggered based on current user |
| 25 | + interaction with the target text entry object as well as the current state (positive or |
| 26 | + negative) of the character remaining value. |
| 27 | + |
| 28 | + NobleCount supports pre-existing text within the text object. |
| 29 | + NobleCount supports jQuery chaining. |
| 30 | + |
| 31 | + Within NobleCount context... |
| 32 | + NEGATIVE is defined as Integers < 0 |
| 33 | + POSITIVE is defined as Integers >= 0 [on_positive will fire when char_rem == 0] |
| 34 | + |
| 35 | + BY DEFAULT |
| 36 | + - maximum characters EQUAL 140 characters |
| 37 | + - no events defined |
| 38 | + - no class changes defined |
| 39 | + - no DOM attributes are created/altered |
| 40 | + - user permitted to type past the maximum number of characters limit, resulting in |
| 41 | + negative number of characters remaining |
| 42 | + |
| 43 | + IMPLEMENTATION |
| 44 | + |
| 45 | + $('#textarea1').NobleCount('#characters_remaining1'); |
| 46 | + $('#textfield2').NobleCount('#characters_remaining2', { / * OPTIONS * / }); |
| 47 | + |
| 48 | + COMPATIBILITY |
| 49 | + |
| 50 | + Tested in FF3.5, IE7 |
| 51 | + With jQuery 1.3.x, 1.4.x |
| 52 | + |
| 53 | + METHOD(S) |
| 54 | + To properly intialize, both the text entry object and the object that will store the |
| 55 | + total number of characters remaining must exist and be passed to NobleCount. |
| 56 | + |
| 57 | + $(TEXT_ENTRY_OBJECT).NobleCount(CHARACTERS_REMAINING_OBJECT); |
| 58 | + |
| 59 | + Any callback functions assigned to any of the availale events are passed the following |
| 60 | + parameters: t_obj, char_area, c_settings, char_rem |
| 61 | + |
| 62 | + t_obj text entry object |
| 63 | + |
| 64 | + char_area selection of the characters remaining object |
| 65 | + |
| 66 | + c_settings result of the options passed into NobleCount at time of |
| 67 | + initialization merged with the default options |
| 68 | + |
| 69 | + ** this is a GREAT way to pass in and remember other state |
| 70 | + information that will be needed upon the triggering of |
| 71 | + NobleCount events ** |
| 72 | + |
| 73 | + char_rem integer representation of the total number of characters |
| 74 | + remaining resulting from the calculated difference between |
| 75 | + the target maximum number of characters and the current |
| 76 | + number of characters currently within t_obj |
| 77 | + |
| 78 | + Both TEXT_ENTRY_OBJECT and CHARACTERS_REMAINING_OBJECT must be specified and valid. |
| 79 | + |
| 80 | + Upon successful initialization, all appropriate events and classes are applied to |
| 81 | + the CHARACTERS_REMAINING_OBJECT, including the storage (if not disabled) visually |
| 82 | + or only in the DOM (if enabled) of the integer representing the number of characters |
| 83 | + remaining. |
| 84 | + |
| 85 | + The target maximum number of characters (max_chars) are determined by the following |
| 86 | + precedence rules.... |
| 87 | + |
| 88 | + if max_chars passed via constructor |
| 89 | + max_chars = max_chars passed |
| 90 | + else if number exists within characters_remaining object and number > 0 |
| 91 | + max_chars = number within the text() of characters_remaining object |
| 92 | + else use the NobleCount's default max_chars |
| 93 | + |
| 94 | + CUSTOMIZATION |
| 95 | + |
| 96 | + NobleCount(c_obj, <OPTIONS>) |
| 97 | + e.g. $(t_obj).NobleCount(c_obj, {max_chars:100px}); |
| 98 | + |
| 99 | + |
| 100 | + on_negative class (STRING) or FUNCTION that is applied/called |
| 101 | + when characters remaining is negative IF DEFINED |
| 102 | + |
| 103 | + on_positive class (STRING) or FUNCTION that is applied/called |
| 104 | + when characters remaining is positive IF DEFINED |
| 105 | + |
| 106 | + on_update FUNCTION that is called when characters remaining changes |
| 107 | + |
| 108 | + max_chars target maximum number of characters |
| 109 | + |
| 110 | + block_negative if TRUE, then all attempts are made to block entering |
| 111 | + more than max_characters; not effective against user |
| 112 | + pasting in blocks of text that exceed the max_chars value |
| 113 | + otherwise, text area will let individual entering the text |
| 114 | + to exceed max_chars limit (characters remaining becomes |
| 115 | + negative) |
| 116 | + |
| 117 | + cloak: false, if TRUE, then no visual updates of characters remaining |
| 118 | + object (c_obj) will occur; this does not have any effect |
| 119 | + on the char_rem value returned via any event callbacks |
| 120 | + otherwise, the text within c_obj is constantly updated to |
| 121 | + represent the total number of characters remaining until |
| 122 | + the max_chars limit has been reached |
| 123 | + |
| 124 | + in_dom: false if TRUE and cloak is ALSO TRUE, then the number of characters |
| 125 | + remaining are stored as the attribute of c_obj |
| 126 | + named 'data-noblecount' |
| 127 | + |
| 128 | + !NOTE: if enabled, due to constant updating of a DOM element |
| 129 | + attribute user experience can appear sluggish while |
| 130 | + the individual is modifying the text entry object (t_obj) |
| 131 | + |
| 132 | + |
| 133 | + EXAMPLE OPTIONS = |
| 134 | + { |
| 135 | + on_negative: 'go_red', |
| 136 | + on_positive: 'go_green', |
| 137 | + max_chars: 25, |
| 138 | + on_update: function(t_obj, char_area, c_settings, char_rem){ |
| 139 | + if ((char_rem % 10) == 0) { |
| 140 | + char_area.css('font-weight', 'bold'); |
| 141 | + char_area.css('font-size', '300%'); |
| 142 | + } else { |
| 143 | + char_area.css('font-weight', 'normal'); |
| 144 | + char_area.css('font-size', '100%'); |
| 145 | + } |
| 146 | + } |
| 147 | + }; |
| 148 | + |
| 149 | + MORE |
| 150 | + |
| 151 | + For more details about NobleCount, its implementation, usage, and examples, go to: |
| 152 | + http://tpgblog.com/noblecount/ |
| 153 | + |
| 154 | +******************************************************************************************************/ |
| 155 | + |
| 156 | +(function($) { |
| 157 | + |
| 158 | + /********************************************************************************** |
| 159 | + |
| 160 | + FUNCTION |
| 161 | + NobleCount |
| 162 | + |
| 163 | + DESCRIPTION |
| 164 | + NobleCount method constructor |
| 165 | + |
| 166 | + allows for customization of maximum length and related update/length |
| 167 | + behaviors |
| 168 | + |
| 169 | + e.g. $(text_obj).NobleCount(characters_remaining_obj); |
| 170 | + |
| 171 | + REQUIRED: c_obj |
| 172 | + OPTIONAL: options |
| 173 | + |
| 174 | + **********************************************************************************/ |
| 175 | + |
| 176 | + $.fn.NobleCount = function(c_obj, options) { |
| 177 | + var c_settings; |
| 178 | + var mc_passed = false; |
| 179 | + |
| 180 | + // if c_obj is not specified, then nothing to do here |
| 181 | + if (typeof c_obj == 'string') { |
| 182 | + // check for new & valid options |
| 183 | + c_settings = $.extend({}, $.fn.NobleCount.settings, options); |
| 184 | + |
| 185 | + // was max_chars passed via options parameter? |
| 186 | + if (typeof options != 'undefined') { |
| 187 | + mc_passed = ((typeof options.max_chars == 'number') ? true : false); |
| 188 | + } |
| 189 | + |
| 190 | + // process all provided objects |
| 191 | + return this.each(function(){ |
| 192 | + var $this = $(this); |
| 193 | + |
| 194 | + // attach events to c_obj |
| 195 | + attach_nobility($this, c_obj, c_settings, mc_passed); |
| 196 | + }); |
| 197 | + } |
| 198 | + |
| 199 | + return this; |
| 200 | + }; |
| 201 | + |
| 202 | + |
| 203 | + /********************************************************************************** |
| 204 | + |
| 205 | + FUNCTION |
| 206 | + NobleCount.settings |
| 207 | + |
| 208 | + DESCRIPTION |
| 209 | + publically accessible data stucture containing the max_chars and |
| 210 | + event handling specifications for NobleCount |
| 211 | + |
| 212 | + can be directly accessed by '$.fn.NobleCount.settings = ... ;' |
| 213 | + |
| 214 | + **********************************************************************************/ |
| 215 | + $.fn.NobleCount.settings = { |
| 216 | + |
| 217 | + on_negative: null, // class (STRING) or FUNCTION that is applied/called |
| 218 | + // when characters remaining is negative |
| 219 | + on_positive: null, // class (STRING) or FUNCTION that is applied/called |
| 220 | + // when characters remaining is positive |
| 221 | + on_update: null, // FUNCTION that is called when characters remaining |
| 222 | + // changes |
| 223 | + max_chars: 140, // maximum number of characters |
| 224 | + block_negative: false, // if true, then all attempts are made to block entering |
| 225 | + // more than max_characters |
| 226 | + cloak: false, // if true, then no visual updates of characters |
| 227 | + // remaining (c_obj) occur |
| 228 | + in_dom: false // if true and cloak == true, then number of characters |
| 229 | + // remaining are stored as the attribute |
| 230 | + // 'data-noblecount' of c_obj |
| 231 | + |
| 232 | + }; |
| 233 | + |
| 234 | + |
| 235 | + ////////////////////////////////////////////////////////////////////////////////// |
| 236 | + |
| 237 | + // private functions and settings |
| 238 | + |
| 239 | + /********************************************************************************** |
| 240 | + |
| 241 | + FUNCTION |
| 242 | + attach_nobility |
| 243 | + |
| 244 | + DESCRIPTION |
| 245 | + performs all initialization routines and display initiation |
| 246 | + |
| 247 | + assigns both the keyup and keydown events to the target text entry |
| 248 | + object; both keyup and keydown are used to provide the smoothest |
| 249 | + user experience |
| 250 | + |
| 251 | + if max_chars_passed via constructor |
| 252 | + max_chars = max_chars_passed |
| 253 | + else if number exists within counting_object (and number > 0) |
| 254 | + max_chars = counting_object.number |
| 255 | + else use default max_chars |
| 256 | + |
| 257 | + PRE |
| 258 | + t_obj and c_obj EXIST |
| 259 | + c_settings and mc_passed initialized |
| 260 | + |
| 261 | + POST |
| 262 | + maximum number of characters for t_obj calculated and stored in max_char |
| 263 | + key events attached to t_obj |
| 264 | + |
| 265 | + **********************************************************************************/ |
| 266 | + |
| 267 | + function attach_nobility(t_obj, c_obj, c_settings, mc_passed){ |
| 268 | + var max_char = c_settings.max_chars; |
| 269 | + var char_area = $(c_obj); |
| 270 | + |
| 271 | + // first determine if max_char needs adjustment |
| 272 | + if (!mc_passed) { |
| 273 | + var tmp_num = char_area.text(); |
| 274 | + var isPosNumber = (/^[1-9]\d*$/).test(tmp_num); |
| 275 | + |
| 276 | + if (isPosNumber) { |
| 277 | + max_char = tmp_num; |
| 278 | + } |
| 279 | + } |
| 280 | + |
| 281 | + // initialize display of characters remaining |
| 282 | + // * note: initializing should not trigger on_update |
| 283 | + event_internals(t_obj, char_area, c_settings, max_char, true); |
| 284 | + |
| 285 | + // then attach the events -- seem to work better than keypress |
| 286 | + $(t_obj).keydown(function(e) { |
| 287 | + event_internals(t_obj, char_area, c_settings, max_char, false); |
| 288 | + |
| 289 | + // to block text entry, return false |
| 290 | + if (check_block_negative(e, t_obj, c_settings, max_char) == false) { |
| 291 | + return false; |
| 292 | + } |
| 293 | + }); |
| 294 | + |
| 295 | + $(t_obj).keyup(function(e) { |
| 296 | + event_internals(t_obj, char_area, c_settings, max_char, false); |
| 297 | + |
| 298 | + // to block text entry, return false |
| 299 | + if (check_block_negative(e, t_obj, c_settings, max_char) == false) { |
| 300 | + return false; |
| 301 | + } |
| 302 | + }); |
| 303 | + } |
| 304 | + |
| 305 | + |
| 306 | + /********************************************************************************** |
| 307 | + |
| 308 | + FUNCTION |
| 309 | + check_block_negative |
| 310 | + |
| 311 | + DESCRIPTION |
| 312 | + determines whether or not text entry within t_obj should be prevented |
| 313 | + |
| 314 | + PRE |
| 315 | + e EXISTS |
| 316 | + t_obj VALID |
| 317 | + c_settings and max_char initialized / calculated |
| 318 | + |
| 319 | + POST |
| 320 | + if t_obj text entry should be prevented FALSE is returned |
| 321 | + otherwise TRUE returned |
| 322 | + |
| 323 | + TODO |
| 324 | + improve selection detection and permissible behaviors experience |
| 325 | + ALSO |
| 326 | + doesnt CURRENTLY block from the pasting of large chunks of text that |
| 327 | + exceed max_char |
| 328 | + |
| 329 | + **********************************************************************************/ |
| 330 | + |
| 331 | + function check_block_negative(e, t_obj, c_settings, max_char){ |
| 332 | + if (c_settings.block_negative) { |
| 333 | + var char_code = e.which; |
| 334 | + var selected; |
| 335 | + |
| 336 | + // goofy handling required to work in both IE and FF |
| 337 | + if (typeof document.selection != 'undefined') { |
| 338 | + selected = (document.selection.createRange().text.length > 0); |
| 339 | + } else { |
| 340 | + selected = (t_obj[0].selectionStart != t_obj[0].selectionEnd); |
| 341 | + } |
| 342 | + |
| 343 | + //return false if can't write more |
| 344 | + if ((!((find_remaining(t_obj, max_char) < 1) && |
| 345 | + (char_code > 47 || char_code == 32 || char_code == 0 || char_code == 13) && |
| 346 | + !e.ctrlKey && |
| 347 | + !e.altKey && |
| 348 | + !selected)) == false) { |
| 349 | + |
| 350 | + // block text entry |
| 351 | + return false; |
| 352 | + } |
| 353 | + } |
| 354 | + |
| 355 | + // allow text entry |
| 356 | + return true; |
| 357 | + } |
| 358 | + |
| 359 | + |
| 360 | + /********************************************************************************** |
| 361 | + |
| 362 | + FUNCTION |
| 363 | + find_remaining |
| 364 | + |
| 365 | + DESCRIPTION |
| 366 | + determines of the number of characters permitted (max_char), the number of |
| 367 | + characters remaining until that limit has been reached |
| 368 | + |
| 369 | + PRE |
| 370 | + t_obj and max_char EXIST and are VALID |
| 371 | + |
| 372 | + POST |
| 373 | + returns integer of the difference between max_char and total number of |
| 374 | + characters within the text entry object (t_obj) |
| 375 | + |
| 376 | + **********************************************************************************/ |
| 377 | + |
| 378 | + function find_remaining(t_obj, max_char){ |
| 379 | + return max_char - ($(t_obj).val()).length; |
| 380 | + } |
| 381 | + |
| 382 | + |
| 383 | + /********************************************************************************** |
| 384 | + |
| 385 | + FUNCTION |
| 386 | + event_internals |
| 387 | + |
| 388 | + DESCRIPTION |
| 389 | + primarily used for the calculation of appropriate behavior resulting from |
| 390 | + any event attached to the text entry object (t_obj) |
| 391 | + |
| 392 | + whenever the char_rem and related display and/or DOM information needs |
| 393 | + updating this function is called |
| 394 | + |
| 395 | + if cloaking is being used, then no visual representation of the characters |
| 396 | + remaining, nor attempt by this plugin to change any of its visual |
| 397 | + characteristics will occur |
| 398 | + |
| 399 | + if cloaking and in_dom are both TRUE, then the number of characters |
| 400 | + remaining are stored within the HTML 5 compliant attribute of the |
| 401 | + character count remaining object (c_obj) labeled 'data-noblecount' |
| 402 | + |
| 403 | + PRE |
| 404 | + c_settings, init_disp initialized |
| 405 | + |
| 406 | + POST |
| 407 | + performs all updates to the DOM visual and otherwise required |
| 408 | + performs all relevant function calls |
| 409 | + |
| 410 | + **********************************************************************************/ |
| 411 | + |
| 412 | + function event_internals(t_obj, char_area, c_settings, max_char, init_disp) { |
| 413 | + var char_rem = find_remaining(t_obj, max_char); |
| 414 | + |
| 415 | + // is chararacters remaining positive or negative |
| 416 | + if (char_rem < 0) { |
| 417 | + toggle_states(c_settings.on_negative, c_settings.on_positive, t_obj, char_area, c_settings, char_rem); |
| 418 | + } else { |
| 419 | + toggle_states(c_settings.on_positive, c_settings.on_negative, t_obj, char_area, c_settings, char_rem); |
| 420 | + } |
| 421 | + |
| 422 | + // determine whether or not to update the text of the char_area (or c_obj) |
| 423 | + if (c_settings.cloak) { |
| 424 | + // this slows stuff down quite a bit; TODO: implement better method of publically accessible data storage |
| 425 | + if (c_settings.in_dom) { |
| 426 | + char_area.attr('data-noblecount', char_rem); |
| 427 | + } |
| 428 | + } else { |
| 429 | + // show the numbers of characters remaining |
| 430 | + char_area.text(char_rem); |
| 431 | + } |
| 432 | + |
| 433 | + // if event_internals isn't being called for initialization purposes and |
| 434 | + // on_update is a properly defined function then call it on this update |
| 435 | + if (!init_disp && jQuery.isFunction(c_settings.on_update)) { |
| 436 | + c_settings.on_update(t_obj, char_area, c_settings, char_rem); |
| 437 | + } |
| 438 | + } |
| 439 | + |
| 440 | + |
| 441 | + /********************************************************************************** |
| 442 | + |
| 443 | + FUNCTION |
| 444 | + toggle_states |
| 445 | + |
| 446 | + DESCRIPTION |
| 447 | + performs the toggling operations between the watched positive and negative |
| 448 | + characteristics |
| 449 | + |
| 450 | + first, enables/triggers/executes the toggle_on behavior/class |
| 451 | + second, disables the trigger_off class |
| 452 | + |
| 453 | + PRE |
| 454 | + toggle_on, toggle_off |
| 455 | + IF DEFINED, |
| 456 | + must be a string representation of a VALID class |
| 457 | + OR |
| 458 | + must be a VALID function |
| 459 | + |
| 460 | + POST |
| 461 | + toggle_on objects have been applied/executed |
| 462 | + toggle_off class has been removed (if it is a class) |
| 463 | + |
| 464 | + **********************************************************************************/ |
| 465 | + |
| 466 | + function toggle_states(toggle_on, toggle_off, t_obj, char_area, c_settings, char_rem){ |
| 467 | + if (toggle_on != null) { |
| 468 | + if (typeof toggle_on == 'string') { |
| 469 | + char_area.addClass(toggle_on); |
| 470 | + } else if (jQuery.isFunction(toggle_on)) { |
| 471 | + toggle_on(t_obj, char_area, c_settings, char_rem); |
| 472 | + } |
| 473 | + } |
| 474 | + |
| 475 | + if (toggle_off != null) { |
| 476 | + if (typeof toggle_off == 'string') { |
| 477 | + char_area.removeClass(toggle_off); |
| 478 | + } |
| 479 | + } |
| 480 | + } |
| 481 | +})(jQuery); |
Property changes on: branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.NobleCount/jquery.NobleCount.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 482 | + native |
Added: svn:executable |
2 | 483 | + * |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | |
41 | 41 | .fbd-filters-input { |
42 | 42 | margin: 0.25em 0 0.25em 0.75em; |
43 | | - width: 10em; |
| 43 | + width: 9em; |
44 | 44 | } |
45 | 45 | |
46 | 46 | #fbd-filters-types ul { |
— | — | @@ -228,6 +228,8 @@ |
229 | 229 | .fbd-item-hide { |
230 | 230 | float: right; |
231 | 231 | font-size: 0.8em; |
| 232 | + margin-left: 0.2em; |
| 233 | + margin-right: 0.2em; |
232 | 234 | } |
233 | 235 | |
234 | 236 | .fbd-item-restore { |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js |
— | — | @@ -35,7 +35,6 @@ |
36 | 36 | */ |
37 | 37 | function setCookies() { |
38 | 38 | $.cookie( 'moodbar-feedback-types', formState.types.join( '|' ), { 'path': '/', 'expires': 7 } ); |
39 | | - $.cookie( 'moodbar-feedback-username', formState.username, { 'path': '/', 'expires': 7 } ); |
40 | 39 | } |
41 | 40 | |
42 | 41 | /** |
— | — | @@ -45,15 +44,7 @@ |
46 | 45 | */ |
47 | 46 | function loadFromCookies() { |
48 | 47 | var cookieTypes = $.cookie( 'moodbar-feedback-types' ), |
49 | | - $username = $( '#fbd-filters-username' ), |
50 | 48 | changed = false; |
51 | | - if ( $username.val() == '' ) { |
52 | | - var cookieUsername = $.cookie( 'moodbar-feedback-username' ); |
53 | | - if ( cookieUsername != '' && cookieUsername !== null ) { |
54 | | - $username.val( cookieUsername ); |
55 | | - changed = true; |
56 | | - } |
57 | | - } |
58 | 49 | |
59 | 50 | if ( cookieTypes ) { |
60 | 51 | // Because calling .indexOf() on an array doesn't work in all browsers, |
— | — | @@ -333,12 +324,6 @@ |
334 | 325 | loadComments( 'filter' ); |
335 | 326 | } ); |
336 | 327 | |
337 | | - $( '.fbd-item-userLink' ).live( 'click', function( e ) { |
338 | | - e.preventDefault(); |
339 | | - $('#fbd-filters-username').val( $(this).text() ); |
340 | | - $('#fbd-filters').children('form').submit(); |
341 | | - } ); |
342 | | - |
343 | 328 | $( '#fbd-list-more' ).children( 'a' ).click( function( e ) { |
344 | 329 | e.preventDefault(); |
345 | 330 | // We don't call saveFormState() here because we want to use the state of the form |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.php |
— | — | @@ -92,6 +92,11 @@ |
93 | 93 | $wgResourceModules['ext.moodBar.init']['dependencies'][] = 'mediawiki.user'; |
94 | 94 | } |
95 | 95 | |
| 96 | + |
| 97 | +$wgResourceModules['jquery.NobleCount'] = $mbResourceTemplate + array( |
| 98 | + 'scripts' => 'jquery.NobleCount/jquery.NobleCount.js', |
| 99 | +); |
| 100 | + |
96 | 101 | $wgResourceModules['ext.moodBar.core'] = $mbResourceTemplate + array( |
97 | 102 | 'styles' => 'ext.moodBar/ext.moodBar.core.css', |
98 | 103 | 'scripts' => 'ext.moodBar/ext.moodBar.core.js', |
— | — | @@ -130,6 +135,7 @@ |
131 | 136 | 'mediawiki.util', |
132 | 137 | 'ext.moodBar.init', // just in case |
133 | 138 | 'jquery.localize', |
| 139 | + 'jquery.NobleCount', |
134 | 140 | 'jquery.moodBar', |
135 | 141 | ), |
136 | 142 | 'position' => 'bottom', |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -35,7 +35,9 @@ |
36 | 36 | 'articlefeedback-survey-title', |
37 | 37 | 'articlefeedback-survey-message-success', |
38 | 38 | 'articlefeedback-survey-message-error', |
39 | | - 'articlefeedback-survey-disclaimer' |
| 39 | + 'articlefeedback-survey-disclaimer', |
| 40 | + 'articlefeedback-survey-disclaimerlink', |
| 41 | + 'articlefeedback-privacyurl' |
40 | 42 | ), |
41 | 43 | 'dependencies' => array( |
42 | 44 | 'jquery.ui.dialog', |
— | — | @@ -72,7 +74,6 @@ |
73 | 75 | 'articlefeedback-form-panel-helpimprove-note', |
74 | 76 | 'articlefeedback-form-panel-helpimprove-email-placeholder', |
75 | 77 | 'articlefeedback-form-panel-helpimprove-privacy', |
76 | | - 'articlefeedback-form-panel-helpimprove-privacylink', |
77 | 78 | 'articlefeedback-form-panel-submit', |
78 | 79 | 'articlefeedback-form-panel-success', |
79 | 80 | 'articlefeedback-form-panel-pending', |
— | — | @@ -83,7 +84,7 @@ |
84 | 85 | 'articlefeedback-report-panel-description', |
85 | 86 | 'articlefeedback-report-empty', |
86 | 87 | 'articlefeedback-report-ratings', |
87 | | - 'parentheses', |
| 88 | + 'articlefeedback-privacyurl' |
88 | 89 | ), |
89 | 90 | 'dependencies' => array( |
90 | 91 | 'jquery.appear', |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -592,14 +592,14 @@ |
593 | 593 | .find( '.articleFeedback-helpimprove-note' ) |
594 | 594 | // Can't use .text() with mw.message(, /* $1 */ link).toString(), |
595 | 595 | // because 'link' should not be re-escaped (which would happen if done by mw.message) |
596 | | - .html( function(){ |
| 596 | + .html( function() { |
597 | 597 | var link = mw.html.element( |
598 | 598 | 'a', { |
599 | | - href: mw.util.wikiGetlink( mw.msg('articlefeedback-form-panel-helpimprove-privacylink') ) |
600 | | - }, mw.msg('articlefeedback-form-panel-helpimprove-privacy') |
| 599 | + href: mw.msg( 'articlefeedback-privacyurl' ) |
| 600 | + }, mw.msg( 'articlefeedback-form-panel-helpimprove-privacy' ) |
601 | 601 | ); |
602 | | - return mw.html.escape( mw.msg( 'articlefeedback-form-panel-helpimprove-note') ) |
603 | | - .replace( /\$1/, mw.message( 'parentheses', link ).toString() ); |
| 602 | + return mw.html.escape( mw.msg( 'articlefeedback-form-panel-helpimprove-note' ) ) |
| 603 | + .replace( /\$1/, link ); |
604 | 604 | }) |
605 | 605 | .end() |
606 | 606 | .find( '.articleFeedback-helpimprove-email' ) |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js |
— | — | @@ -116,7 +116,21 @@ |
117 | 117 | $form.find( '#prefswitch-survey-origin' ).text( mw.config.get( 'wgTitle' ) ); |
118 | 118 | |
119 | 119 | // Insert disclaimer message |
120 | | - $button.before( $( '<div>' ).addClass( 'articleFeedback-survey-disclaimer' ).text( mw.msg( 'articlefeedback-survey-disclaimer' ) ) ); |
| 120 | + $button.before( |
| 121 | + $( '<div>' ) |
| 122 | + .addClass( 'articleFeedback-survey-disclaimer' ) |
| 123 | + // Can't use .text() with mw.message(, /* $1 */ link).toString(), |
| 124 | + // because 'link' should not be re-escaped (which would happen if done by mw.message) |
| 125 | + .html( function() { |
| 126 | + var link = mw.html.element( |
| 127 | + 'a', { |
| 128 | + href: mw.msg( 'articlefeedback-privacyurl' ) |
| 129 | + }, mw.msg( 'articlefeedback-survey-disclaimerlink' ) |
| 130 | + ); |
| 131 | + return mw.html.escape( mw.msg( 'articlefeedback-survey-disclaimer' ) ) |
| 132 | + .replace( /\$1/, link ); |
| 133 | + }) |
| 134 | + ); |
121 | 135 | |
122 | 136 | // Take dialog out of loading state |
123 | 137 | $dialog.removeClass( 'loading' ); |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.css |
— | — | @@ -10,3 +10,7 @@ |
11 | 11 | font-weight: normal; /* Override bold */ |
12 | 12 | font-style: italic; |
13 | 13 | } |
| 14 | + |
| 15 | +.articleFeedback-survey-disclaimer a { |
| 16 | + color: #0645AD; /* Override blackish color set by JUI */ |
| 17 | +} |
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/ArticleFeedback.i18n.php |
— | — | @@ -26,7 +26,8 @@ |
27 | 27 | 'articlefeedback-survey-submit' => 'Submit', |
28 | 28 | 'articlefeedback-survey-title' => 'Please answer a few questions', |
29 | 29 | 'articlefeedback-survey-thanks' => 'Thanks for filling out the survey.', |
30 | | - 'articlefeedback-survey-disclaimer' => 'To help improve this feature, your feedback may be shared anonymously with the Wikipedia community.', |
| 30 | + 'articlefeedback-survey-disclaimer' => 'By submitting, you agree to transparency under these $1.', |
| 31 | + 'articlefeedback-survey-disclaimerlink' => 'terms', |
31 | 32 | /* ext.articleFeedback and jquery.articleFeedback */ |
32 | 33 | 'articlefeedback-error' => 'An error has occured. Please try again later.', |
33 | 34 | 'articlefeedback-form-switch-label' => 'Rate this page', |
— | — | @@ -40,10 +41,9 @@ |
41 | 42 | 'articlefeedback-form-panel-expertise-hobby' => 'It is a deep personal passion', |
42 | 43 | 'articlefeedback-form-panel-expertise-other' => 'The source of my knowledge is not listed here', |
43 | 44 | 'articlefeedback-form-panel-helpimprove' => 'I would like to help improve Wikipedia, send me an e-mail (optional)', |
44 | | - 'articlefeedback-form-panel-helpimprove-note' => 'We will send you a confirmation e-mail. We will not share your address with anyone. $1', |
| 45 | + 'articlefeedback-form-panel-helpimprove-note' => 'We will send you a confirmation e-mail. We will not share your e-mail address with outside parties as per our $1.', |
45 | 46 | 'articlefeedback-form-panel-helpimprove-email-placeholder' => 'email@example.org', // Optional |
46 | | - 'articlefeedback-form-panel-helpimprove-privacy' => 'Privacy policy', |
47 | | - 'articlefeedback-form-panel-helpimprove-privacylink' => 'Project:Privacy policy', |
| 47 | + 'articlefeedback-form-panel-helpimprove-privacy' => 'feedback privacy statement', |
48 | 48 | 'articlefeedback-form-panel-submit' => 'Submit ratings', |
49 | 49 | 'articlefeedback-form-panel-pending' => 'Your ratings have not been submitted yet', |
50 | 50 | 'articlefeedback-form-panel-success' => 'Saved successfully', |
— | — | @@ -98,6 +98,7 @@ |
99 | 99 | 'articlefeedback-survey-message-success' => 'Thanks for filling out the survey.', |
100 | 100 | 'articlefeedback-survey-message-error' => 'An error has occurred. |
101 | 101 | Please try again later.', |
| 102 | + 'articlefeedback-privacyurl' => 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement', |
102 | 103 | /* Special:ArticleFeedback */ |
103 | 104 | 'articleFeedback-table-caption-dailyhighsandlows' => 'Today\'s highs and lows', |
104 | 105 | 'articleFeedback-table-caption-dailyhighs' => 'Pages with highest ratings: $1', |
— | — | @@ -168,9 +169,10 @@ |
169 | 170 | {{Identical|Submit}}', |
170 | 171 | 'articlefeedback-survey-title' => 'This text appears in the title bar of the survey dialog.', |
171 | 172 | 'articlefeedback-survey-thanks' => 'This text appears when the user has successfully submitted the survey.', |
172 | | - 'articlefeedback-survey-disclaimer' => 'This text appears on the survey form below the comment field and above the submit button.', |
| 173 | + 'articlefeedback-survey-disclaimer' => 'This text appears on the survey form below the comment field and above the submit button. $1 is a link pointing to the privacy policy. The link text is in the articlefeedback-survey-disclaimerlink message.', |
173 | 174 | 'articlefeedback-form-panel-explanation-link' => 'Do not translate "Project:". Also translate the "ArticleFeedback" special page name at [[Special:AdvancedTranslate]].', |
174 | 175 | 'articlefeedback-form-panel-helpimprove-email-placeholder' => '{{Optional}}', |
| 176 | + 'articlefeedback-form-panel-helpimprove-note' => '$1 is a link pointing to the privacy policy. The link text is in the articlefeedback-form-panel-helpimprove-privacy message.', |
175 | 177 | 'articlefeedback-form-panel-helpimprove-privacy' => '{{Identical|Privacy}}', |
176 | 178 | 'articlefeedback-form-panel-helpimprove-privacylink' => 'Do not translate "Project:" |
177 | 179 | {{Identical|Privacypage}}', |
— | — | @@ -178,6 +180,7 @@ |
179 | 181 | 'articlefeedback-pitch-join-body' => 'Based on {{msg-mw|Articlefeedback-pitch-join-message}}.', |
180 | 182 | 'articlefeedback-pitch-join-login' => '{{Identical|Log in}}', |
181 | 183 | 'articleFeedback-table-heading-page' => '{{Identical|Page}}', |
| 184 | + 'articlefeedback-privacyurl' => 'This URL can be changed to point to a translated version of the page if it exists.', |
182 | 185 | 'articleFeedback-table-heading-average' => '{{Identical|Average}}', |
183 | 186 | 'articleFeedback-copy-above-highlow-tables' => 'The variable $1 will contain a full URL to a discussion page where the dashboard can be discussed - since the dashboard is powered by a special page, we can not rely on the built-in MediaWiki talk page.', |
184 | 187 | ); |
Index: branches/wmf/1.18wmf1/extensions/WikiLove/WikiLove.php |
— | — | @@ -143,6 +143,9 @@ |
144 | 144 | 'wikilove-commons-url', |
145 | 145 | 'wikilove-err-preview-api', |
146 | 146 | 'wikilove-err-send-api', |
| 147 | + 'wikilove-terms', |
| 148 | + 'wikilove-terms-link', |
| 149 | + 'wikilove-terms-url', |
147 | 150 | ), |
148 | 151 | 'dependencies' => array( |
149 | 152 | 'ext.wikiLove.defaultOptions', |
Index: branches/wmf/1.18wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css |
— | — | @@ -238,7 +238,7 @@ |
239 | 239 | /*#mw-wikilove-dialog*/ #mw-wikilove-add-details .mw-wikilove-note { |
240 | 240 | font-weight: light; |
241 | 241 | font-size: 0.9em; |
242 | | - color: #999; |
| 242 | + color: #888888; |
243 | 243 | } |
244 | 244 | |
245 | 245 | /*#mw-wikilove-dialog*/ #mw-wikilove-add-details textarea { |
— | — | @@ -325,6 +325,13 @@ |
326 | 326 | float: right; |
327 | 327 | } |
328 | 328 | |
| 329 | +#mw-wikilove-dialog #mw-wikilove-terms { |
| 330 | + margin-top: 0.5em; |
| 331 | + text-align: right; |
| 332 | + font-size: 0.9em; |
| 333 | + color: #888888; |
| 334 | +} |
| 335 | + |
329 | 336 | #mw-wikilove-dialog .mw-wikilove-spinner { |
330 | 337 | float: right; |
331 | 338 | margin-top: 0.9em; |
Index: branches/wmf/1.18wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
— | — | @@ -45,6 +45,21 @@ |
46 | 46 | $typeList.append( $( '<li tabindex="0"></li>' ).append( $button ) ); |
47 | 47 | } |
48 | 48 | |
| 49 | + var commonsLink = $( '<a>' ) |
| 50 | + .attr( 'href', mw.msg( 'wikilove-commons-url' ) ) |
| 51 | + .attr( 'target', '_blank' ) |
| 52 | + .text( mw.msg( 'wikilove-commons-link' ) ) |
| 53 | + .wrap( '<div>' ) // or .html() will only return the link text |
| 54 | + .parent() |
| 55 | + .html(); |
| 56 | + termsLink = $( '<a> ') |
| 57 | + .attr( 'href', mw.msg( 'wikilove-terms-url' ) ) |
| 58 | + .attr( 'target', '_blank' ) |
| 59 | + .text( mw.msg( 'wikilove-terms-link' ) ) |
| 60 | + .wrap( '<div>' ) |
| 61 | + .parent() |
| 62 | + .html(); |
| 63 | + |
49 | 64 | $dialog = $( '\ |
50 | 65 | <div id="mw-wikilove-dialog">\ |
51 | 66 | <div id="mw-wikilove-select-type">\ |
— | — | @@ -92,7 +107,7 @@ |
93 | 108 | <span class="mw-wikilove-note" id="mw-wikilove-image-note"><html:msg key="wikilove-image-example"/></span>\ |
94 | 109 | <input type="text" class="text" id="mw-wikilove-image"/>\ |
95 | 110 | <div id="mw-wikilove-commons-text">\ |
96 | | - ' + mw.msg( 'wikilove-commons-text', '<a href="' + mw.msg( 'wikilove-commons-url' ) + '" target="_blank">' + mw.msg( 'wikilove-commons-link' ) +'</a>' ) + '\ |
| 111 | + ' + mw.html.escape( mw.msg( 'wikilove-commons-text' ) ).replace( /\$1/, commonsLink ) + '\ |
97 | 112 | </div>\ |
98 | 113 | <label for="mw-wikilove-message" id="mw-wikilove-message-label"><html:msg key="wikilove-enter-message"/></label>\ |
99 | 114 | <span class="mw-wikilove-note" id="mw-wikilove-message-note"><html:msg key="wikilove-omit-sig"/></span>\ |
— | — | @@ -109,6 +124,9 @@ |
110 | 125 | <span class="mw-wikilove-number">3</span>\ |
111 | 126 | <h3><html:msg key="wikilove-preview"/></h3>\ |
112 | 127 | <div id="mw-wikilove-preview-area"></div>\ |
| 128 | + <div id="mw-wikilove-terms">\ |
| 129 | + ' + mw.html.escape( mw.msg( 'wikilove-terms' ) ).replace( /\$1/, termsLink ) + '\ |
| 130 | + </div>\ |
113 | 131 | <form id="mw-wikilove-send-form">\ |
114 | 132 | <button class="submit" id="mw-wikilove-button-send" type="submit"></button>\ |
115 | 133 | <div id="mw-wikilove-send-spinner" class="mw-wikilove-spinner"></div>\ |
Index: branches/wmf/1.18wmf1/extensions/WikiLove/WikiLove.i18n.php |
— | — | @@ -56,6 +56,9 @@ |
57 | 57 | 'wikilove-commons-text' => 'You can find images by browsing $1.', |
58 | 58 | 'wikilove-commons-link' => 'Wikimedia Commons', |
59 | 59 | 'wikilove-commons-url' => 'http://commons.wikimedia.org', |
| 60 | + 'wikilove-terms' => 'By submitting, you agree to transparency under these $1.', |
| 61 | + 'wikilove-terms-link' => 'terms', |
| 62 | + 'wikilove-terms-url' => 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement', |
60 | 63 | ); |
61 | 64 | |
62 | 65 | /** Message documentation (Message documentation) |
— | — | @@ -78,7 +81,7 @@ |
79 | 82 | 'wikilove-add-details' => '[[File:Wiki Love 003.png|thumb]]', |
80 | 83 | 'wikilove-image' => '[[File:Wiki Love 004.png|thumb]]', |
81 | 84 | 'wikilove-header' => '[[File:Wiki Love 003.png|thumb]] |
82 | | -Header is the subject of the added message (so perhaps subject is a better term..), i.e. what gets between == ... ==', |
| 85 | +Header is the subject of the added message (so perhaps subject is a better term..), i.e. what gets added between == ... ==', |
83 | 86 | 'wikilove-title' => '[[File:Wiki Love 004.png|thumb]] |
84 | 87 | Title is the title of the wikilove box (e.g. "Barnstar")', |
85 | 88 | 'wikilove-enter-message' => '[[File:Wiki Love 003.png|thumb]]', |
— | — | @@ -108,6 +111,10 @@ |
109 | 112 | 'wikilove-commons-text' => '[[File:Wiki Love 004.png|thumb]] |
110 | 113 | $1 gets replaced by a link with {{msg-mw|wikilove-commons-link}} ("Wikimedia Commons") as caption and {{msg-mw|wikilove-commons-url}} as URL.', |
111 | 114 | 'wikilove-commons-url' => 'This URL can be changed to point at a localised page on Wikimedia Commons.', |
| 115 | + 'wikilove-terms' => '[[File:Wiki_Love_003.png]] |
| 116 | +A notice that appears above the Send WikiLove button in small text. Try to keep this concise. $1 is replaced with the actual link.', |
| 117 | + 'wikilove-terms-link' => 'The text that links to the terms of service. Should not be capitalized.', |
| 118 | + 'wikilove-terms-url' => 'This URL can be changed to point to a translated version of the page if it exists.', |
112 | 119 | ); |
113 | 120 | |
114 | 121 | /** Afrikaans (Afrikaans) |