Commit graph

44 commits

Author SHA1 Message Date
Kunal Mehta 88e344de1b Make sure error code is always passed to 'thanks-error-undefined'
Bug: T130880
Change-Id: I3c6d8d7592b867a3457283e321940895e3c08ba5
2016-03-29 15:12:57 -07:00
Kunal Mehta 93c7a1048e Include error code in API failure message
Otherwise the error reports we get are completely useless.

Bug: T78697
Change-Id: Ic0244e2e947256c411c889a8850c8f18ee3658a4
2016-03-04 11:33:27 -08:00
Stephane Bisson 1888227212 Fix Flow thank of post with descendents
Bug: T125168
Change-Id: Ic9d8c04549a174ad5f6a426e872fd7bc219b755d
2016-01-29 14:28:20 -05:00
Glaisher 703642e40e Hide thanks button for botedits if bots are not allowed to receive thanks in mobile as well
Also only load 'ext.thanks.mobilediff' module if the recipient is not an IP.

Bug: T118686
Change-Id: I096d3b05a46590db426ae038f17f6e180fa5bf37
2015-11-24 22:47:56 +05:00
Stephane Bisson 7a987af51c Add jquery.findWithParent to Thanks
Thanks has an implicit dependency on jquery.findWithParent.
It often fails because it is not yet loaded.
Adding it locally so it is self-contained. It is not
Flow's responsibility to provide such low-level utilities
to other extensions.

Bug: T116146
Change-Id: Id74e77b5fb81d5da8cb6dd97fd1b90e5d974ae82
2015-10-27 13:17:54 -04:00
Florian aad7e245fa Use the new module name for eventlogging module
The old name was deprecated in I07b4366.

Bug: T113289
Change-Id: Ie53dcd6e4031727ca75c90fa84176f552bc5cc73
2015-09-28 08:29:56 +00:00
Alangi Derick 899fec3566 Hygiene: Call to deprecated toast module updated
The toast module is now accessed via mobile.toast/toast

Change-Id: I9e6e016bff171e8a8dbceb548b15a1fd7214f288
2015-09-25 18:28:40 +00:00
Kunal Mehta c4cf317241 Use mw.Api#postWithToken for mobilediff
Change-Id: I6821a9af1e05963364c768e2a39a84ae25883b64
2015-06-17 01:25:15 +00:00
Kunal Mehta 514e9d4c7f Call mw.Api() constructor properly
Change-Id: I56b3c6e17a509056a5ed5ceb5b4dcb376cdec0c3
2015-06-15 19:58:07 -07:00
Moriel Schottlender 0a5664ce5e Check the thanked user's gender for Thanks messages
Retrieve gender data for the thanked user for i18n message parsing
with the correct {{GENDER...}} data.

Bug: T96527
Change-Id: I14c831be51482682f2b628a15c79341a4f372c16
2015-05-04 17:16:09 -07:00
Roan Kattouw 805fefd198 Actually pass jscs
Removed exemptions from .jscsrc and fixed the code so jscs still passes.

Kept the exemption for disallowDanglingUnderscores because
of the naming convention for private functions in this repo.

Change-Id: I860f73394a2b92a411fe682abbb2ab0b5e1325f9
2015-05-04 12:13:43 -07:00
Matthew Flaschen b7cefb78ae Add custom title text for Yes and No Thank confirmations
Bug: T89572
Change-Id: I54bfaf7852182c2b22bd897fe55480c2b0e7f1ab
2015-02-17 21:55:36 -05:00
Matthew Flaschen 84f1234e09 Use jQuery prop instead of attr for whether btn is disabled
Bug: T85511
Change-Id: I7f7a434bc62065d872e24472c65eade649249f9b
2015-01-30 10:12:52 -08:00
jdlrobson e02c334880 Add tests for rendering of thanks button on mobile diff page
This has broken many times and I want this test to ensure its protection
in future.

Bug: T86687
Change-Id: Iea01c5c7c1ba00de47182521eeba86c8aef03522
2015-01-28 12:48:08 -08:00
Florianschmidtwelzow 7a3d154447 Mobile: Conform to new LoggingSchema
MobileFrontend recently introduced a new loggingSchema structure. Match
here, too.

Bug: T77929
Change-Id: Ie863937566fb894860d705f51a04ab30de76140d
2015-01-13 22:16:56 +00:00
Bahodir Mansurov 24b0963a90 Match changed MobileWebClickingSchema
Bug: T78360
Change-Id: Ic8dbef12a7fb51e807aff16c86c749c8a3c13837
2014-12-12 14:13:01 -05:00
Florianschmidtwelzow 54952e1b36 Match changed MobileWebClickingSchema
Follow up: I623fde482baaba753608160d486d79a313ee5825

Bug: T78360
Change-Id: I5ea1dcc10c2afba89dad062eb171e1e6a1b915fd
2014-12-12 06:59:01 +01:00
Matthias Mullie 9b7ef1c05b Use postWithToken
Change-Id: I46e27d34bff32b240dc19aa6ef6db1aeddbc3da3
2014-09-19 01:12:12 +00:00
Kunal Mehta 5df573582f Send thanks via POST on mobile too
Bug: 70503
Change-Id: I340665f2119427b96f1bdb78224df7af172b7526
2014-09-06 20:45:20 -07:00
Matthias Mullie 8618a95f79 Use postWithToken
Change-Id: I8d8949b66782af2956726b55db64b2dce97d5e4a
2014-09-01 14:27:10 +02:00
Kunal Mehta c1e4c568cc Use jquery.confirmable instead of jquery.ui.dialog
Change-Id: Id75fd57954edb9341d25ba754dd64279a28deb54
2014-08-31 07:14:35 -04:00
Kunal Mehta a53c7b3127 Use POST requests for action=thanks/flowthanks
This is now necessary after the tokens re-write in core.

Bug: 70138
Change-Id: Ide61f7b9e6d58cc53b04cdeef9d17f781ef25039
2014-08-28 13:10:38 -07:00
Erik Bernhardson ccdca0d0d7 Support updated flow frontend
* Flow no-longer allows arbitrary html insertion, so remove
* Update ext.thanks.flowthank.js to work with thank links generated
  directly by flow.

Change-Id: I8ae14352f1b177446f3696ffadd6921a5125238e
2014-07-15 15:07:33 -07:00
wctaiwan 0e0ef33ea3 Bind Flow Thank click detection to .flow-container
Single-topic views do not have a flow-topics wrapper, making Thanks broken
in those views.

Bug: 63205
Change-Id: I19c7d2da2d409f8c0a270600b092d504255d4111
2014-06-05 14:00:00 +08:00
wctaiwan 078875980e Use .on() instead of .click() for Flow Thanks
This makes the Thank button function correctly for posts that are
dynamically loaded with JavaScript (from
http://stackoverflow.com/q/9344306)

Bug: 63205
Change-Id: If51e1801e633573c8f0814832e26d643e1237d53
2014-05-16 00:47:32 +00:00
jenkins-bot 45e38cadf8 Merge "Clone thanked label before inserting" 2014-04-07 19:27:21 +00:00
Benjamin Chen 18bbaf3bdd Clone thanked label before inserting
ThankedLabel is inserted before the Thank link that's being clicked.
The label needs to be cloned on each insertion so it is not removed
on subsequent $.insert().

Bug: 63506
Change-Id: I8327158880cba9a141a4d9977414022173c4c8ac
2014-04-04 03:05:21 +00:00
Benjamin Chen 36b839ead2 Add hover highlight to Thank link in Flow posts
Bug: 62556
Change-Id: I3adb60d5b1c75500f8276cda8b8eaa2646bb1565
2014-03-21 04:04:04 +08:00
wctaiwan 98726b568b Add "Thanks" for comments on Flow boards
bug: 61930
Change-Id: Id37a14e3c75c63419fc34e0b7c2e21f74b3fa875
Co-authored-by: Bencmq <bencmqwiki@gmail.com>
2014-03-14 11:03:11 +00:00
kaldari 22adcc3625 Add mw-ui-button styles since old button styles have been scrapped
Also adding a helpful comment.

Leaving existing mw-mf-action-button class for now since this
provides the float left. Eventually we should migrate the styles
in MobileFrontend to use mw-ui-button as well and reduce the
redundant styles that are set. See also:
Change I59e8441f4c4e1d33bff33afcab6c6670d7b99634

Bug: 61490
Change-Id: I7e14b8eb522d8d7443fa917d97cb91773c6410f0
2014-03-03 17:31:14 -08:00
kaldari cdc91d7f54 Story 1604: Remember mobile thanks
If the user has already been thanked, make the button greyed out
and display the text "Thanked" instead of "Thank".

Dependency: Ife9f456a7a9cf74b1b54fdc6128feb230fd6f671
Bug: 59828
Change-Id: Ifab78fe62910c9c3f2a927a6a4bbe28fb953b160
2014-01-15 17:36:53 -08:00
kaldari ea4646ae7f Regression: Update name of toast module so mobile thanks isn't broken.
Change-Id: I85d878d6b9452cbc3f21851f9bd63a4a1408cca1
2014-01-14 17:28:41 -08:00
Siebrand Mazeland 08f8d9ed44 Add GENDER support for 'thanks-error-ratelimited'
Spotted by Matma Rex and reported at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Thanks-error-ratelimited/en

Change-Id: Ib19f7297e6a99d89cc9465233d1604e55c330bfa
2013-10-07 17:17:18 +02:00
Siebrand Mazeland b3e97e76e7 Add GENDER support for 'thanks-button-thank'
Spotted by Asaifm at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Thanks-button-thank/ar

Change-Id: Iaeacd998344645557384e9c90c9cc48350abf9f0
2013-10-07 09:26:07 +00:00
kaldari bd5bdba07e Migrating Mobile thanks into Thanks extension
Also making thank button for mobile capitalized.

Also update for new clickTracking code.

Also promoting to stable.

Dependency: I56e2c5bc69f85e83ab3dfd9b9e617dbb98661870
Change-Id: Ifaf44fe8994a8085c30522292bba8b768da533db
2013-09-26 18:42:13 -07:00
Yuki Shira 77a0e2ea3a Fix confirmThanks() for Diff view
Change-Id: If762f7ee600ca3cb040ed4a1cf2875d01586ce90
2013-07-09 16:54:19 -07:00
MatmaRex 615ec96adf Quote 'class' in JS object literals
It's a reserved word, old IEs see this and bail. (Conforming browsers
correctly see it's an object key and parse the literal.)

Reported on the English Wikipedia's WP:VPT.

Change-Id: I7a032afc6d62d09a5ec32c7c8d0af5611665ea59
2013-06-13 18:11:14 +02:00
kaldari 68b1918231 Everyone hates Christmas so we're getting rid of it!
Removing red coloration for Cancel button - too garish according to
feedback.

Change-Id: I00beb9f59b931d1becf23cd5a3d62ea9ec98b9b8
2013-06-12 15:49:43 -07:00
kaldari aa2f23517b Adding optional confirmation process to Thanks workflow
If the new $wgThanksConfirmationRequired global variable is true,
require users to confirm that they want to send thanks.

Bug: 47658
Change-Id: I4663844a324a2797917b027ceb1c8c07b1e180d5
2013-06-10 12:05:09 -07:00
jenkins-bot f02745e2d5 Merge "Prevent short-term duplicate thanking" 2013-04-29 05:59:29 +00:00
ebernhardson a4cfb9ded6 Prevent short-term duplicate thanking
Thanked revision to be stored both server side in the session and client side
in a cookie.  Thanked revisions found in either storage solution will replace
their 'thank' link with the string 'thanked'.
Bug: 46690
Change-Id: I976cd8fbf00856c67b77daeb0d0a952efb371661
2013-04-28 22:58:28 -07:00
ebernhardson df908474b8 thanks-thanked message needs GENDER support
Bug: 46595
Change-Id: I7061403808d428ad244b75ebdcdb2dc900acd3bf
2013-04-26 10:48:42 -07:00
kaldari e3a4b724c1 Adding some comments for the API
Adding .jshintrc file

Change-Id: Ib15a3b3ce2c37933b62ccb112a38b1d61051ca16
2013-04-05 17:36:31 -07:00
Kaldari bc369fdf85 Initial version of Thanks extension
See https://www.mediawiki.org/wiki/Extension:Thanks

Change-Id: Ic037f1fcde0f7fa10848c2ed8e31291ad022027d
2013-03-21 11:33:50 -07:00