Follows-up 383a818.
* There is no need for the additional element ("a") or
descendant ("#pt-mytalk") selector.
It isn't overrriding anything, only hardcodes details that make
it harder to maintain or extend this stylesheet. For example,
there is a gadget that makes user messages green instead of
orange, it now was required to hardcode the "#pt-mytalk a" part
of the selector eventhough those are subject to change.
Separation of concerns.
* Cache/reuse the jQuery object instead of executing the same
query to the document, again. It also avoids a potential bug
where the second query matches different elements (e.g. after
appending alertMessage, there could potentially be an additional
nested anchor link; there isn't now though, as the message is
plain text).
* Add comment about weird echoNewMsgAlertDisplayed variable.
Change-Id: I682182fe15a868969f25fa5bfe2412e2a6f3dddf
* In some languages like persian, the number 0 is represented as '.', we can't compare
'.' with either 0 or '0' to detect the no-notification status of the badge
* The markread API doesn't respect uselang param, it would return 0 instead of . in a url with uselang=fa
Note: we need to provide raw and formatted count in the API since client side javascript
doesn't provide fancy function like $wgLang->formatNum()
bug: 54575
Change-Id: I0a49828253ec346ed27c5b9a976f8bdff4e1fa90
bundleTitle['message'] defaults to empty string, it would never
be null, should just check if the string is empty
Change-Id: I6b9dd8b8a94fed114c0799004848daed472daf3a
BeforeEchoEventInsert can be used to abort or modify an
EchoEvent before it is created. If aborted, EchoEvent::create
will return false.
EchoEventInsertComplete can be used to run stuff once it's
been created.
Change-Id: I376708ac7aafc419bf87bceeff6de7de9bdc2f4e
mediawiki.api and mediawiki.Uri are desktop-only modules that are
not actually needed by ext.echo.base. Moving the dependency
declarations to more specific modules so that ext.echo.base is
usable by mobile notifications. ResourceLoader is smart enough to
not double-load them, so there should be no performance difference.
Also removing unused 'cancel' message.
Change-Id: I9fa8c4501e038ded9125c3b43e5207c355af2db9
Removing unused functions and declaring correct dependencies.
Targetting to desktop and mobile so it can be used by both.
Also removing dismiss-related code from the formatter.
Change-Id: Icccce64cfb3c564ab468a93ccdba9c5a61687fd5
Add a media query style for mobile device so the email doesn't generate
a horizontal bar. Gmail strips out all style, that means we can't apply
the mobile style to Gmail. Luckily, Gmail on mobile device browser
automatically fit into the entire mobile screen
bug: 53057
Change-Id: Ia4350669db2e81ee44d5b53d7cece6fcd8839e7a