* Don't require a jQuery element with a specific attribute
to record thanks. Instead pass in the thanked ID directly.
* In Flow, don't override the cookieName static property,
instead pass it in as an argument.
Change the static property (effectively a global) prevents
us from having multiple types of thanks on the same page.
Change-Id: Ia569f8636f070f2af69f89d7da66c9a6f9821d24
The thanks icon had styling issues as it didn't use the mobile
icon and button fundamental components.
The icon should also be inside the button, the element should not
be both a button and an icon.
Bug: T229440
Change-Id: I0136466fe1452f904961b89ae7677fc1a511adab
Minerva now provides default styling for these links.
Also removing 'grunt-stylelint' package as there are no
CSS/LESS files in this extension any more.
Bug: T232102
Change-Id: I4e8b44d3159ab4a87103fa8471c7b1b145ac6016
Users that have already been thanked have the link "thank" replaced
with the message "thanked".
This allows skins e.g. Minerva to style this differently from the rest
of the content.
Change-Id: Iacf7d840cf088afdad6d93ace0f69bf225e05cfa
* Capitalise "cancel"
* Link is inline block with margin from text so that
it can spill down to new line on small resolutions
Change-Id: Id7ceaa85ce88e7eef7cada88596781ca5f7755df
When the thanks button is clicked a thanks will be
queued, that the user can cancel by clicking "cancel"
before the action is completed.
This should help the majority of users experiencing
accidental thanks.
Bug: T63737
Change-Id: I807f729c1b1a9e9b5952685bb18f540f81d70f47
Instead use mediawiki.ui and ResourceLoaderImageModule
Other changes:
* Add gender support to thanks-button-thanked
Depends-On: I0745e112d11026ed59d8daca990b313305cd094a
Bug: T198151
Change-Id: I82ae596330aff8387653c65a6bab5ff729641a80
This adds support for thanking for log entries. It gets the log
ID from and attribute on the thank link (which does not yet have
this; that will come in T187485), and sets the source to be 'log'
if it's being called from Special:Log (this can be extended in
the future if we want to thank for log entries from elsewhere).
Bug: T186921
Change-Id: Ifdb458b873ed4f1e6e64760658d2293aba1e02b3
It was already being used when changing a "thank" link to a "thanked"
message because the user just clicked it and thanked that person, but
not when updating links on page load for things the user had already
thanked previously.
Bug: T190563
Change-Id: I4c5758ef446aa2712ae27a1c784555cbf23806f9
Many log entries are associated to (exactly one) revision,
and for these (only, and only where the log type is
whitelisted) we add a thank-link that behaves exactly
as the thank-link on diff and history pages.
Bug: T189752
Change-Id: I5f4e84c65d4fe2d95b20cdb3c3f9522ad3e5f422
Due to confusion between $thankLinks (plural)
and $thankLink (singular), clicking any thank link
was sending thank for the first thankable revision
on the page.
Introduced in I9097bd976f8da1632577a3f4438b9f1186baca88
Bug: T187757
Change-Id: I7993531206c46657908a66d73369928ccf5dc677
* Explicit return null instead of no return.
* Document right @return type.
* Avoid else paths by using early return.
Change-Id: I24c434ebb57188346ad7cd722f08390ba6da2c34
That way we don't have to do an API request to get the gender,
and we'll also be able to use gender-sensitive messages in the
confirmation step.
Bug: T159302
Change-Id: I9097bd976f8da1632577a3f4438b9f1186baca88
Removing csslint rather than replacing it with stylelint as there
are no CSS or LESS files in this repo.
Also bumping banana and jsonlint to latest.
Change-Id: I9ffce273f63b061e07c3fa90ab4e82b5e551aa92
Rather than using mobile.startup, switch
to using mediawiki.notification which is more
lightweight and does same thing.
Bug: T155801
Change-Id: I23d75272602766e24e8b01410f4a88609eda6dee
Thanks listens to a hook fired by Revision Slider on diff reload
(added in I02a8736d00e6560d0807888c957b0e9aa3e80bb8).
Bug: T142636
Change-Id: I0e6c0072a9fe46c02b8ccbe528a9b87f0381bd65
"edit" type tokens have been deprecated in favour of the
more generic "csrf" type tokens.
This has been causing warnings since: 65077ede90
See also https://www.mediawiki.org/wiki/API:Tokens
Bug: T134532
Change-Id: I3ce3c1e6a40f8a21c931c77314021e2ae94e5fb7