Commit graph

49 commits

Author SHA1 Message Date
Erik Bernhardson 8ee843fab5 Hygiene: Dont quote object property keys
Change-Id: I93d669a26f85b4eb5c5e0e06e314b89894f12385
2014-09-12 16:00:07 -07:00
jdlrobson 4ff74ddd50 Hygiene: Alter how initialisation of the overlay works
Restructure code so MobileFrontend can make use of it
Kill ext.echo.desktop

Change-Id: I984373ba54206d447c54a435dbf60e8f6e814be1
2014-09-12 22:49:51 +00:00
bsitu d9f697414f mw.echo.overlay.updateCount() no longer exists
If you have an unread notifications not in the initial
load of special page, clicking load more would throw
an error

Bug: 69714
Change-Id: I9af588780b2ab8481ba252ddc21bad0601de7a0b
2014-09-05 21:37:12 +00:00
Erik Bernhardson f5985169cc Allow .mw-echo-title-heading outside special page
This class was only being applied to notification output
on special pages and not in the overlay, move it so it can.

Additionally:
* bolds .mw-echo-title-heading same as the anchors it works with
* clean up a repeated rule against `.mw-echo-title a`

Change-Id: I579252399b39746f5aa2cfc51b5cd3b9b8b2cdb0
2014-09-04 18:59:30 -07:00
jdlrobson 5ff3189146 Prevent horizontal scroll bars in Firefox
Use inline block and width to force truncation of the flow topics

Bug: 69563
Change-Id: I62fc95a58dbdf0f21e36e67e1941e4e35585e2d2
2014-08-14 13:21:49 -07:00
bsitu 7f4f6c5228 Truncate text in Echo notifications
Automatically truncate text with ellipsis on single lines of title

Change-Id: I0ef9eeb9f9d3403f79ee9960b075fb7062150a1d
2014-08-12 23:53:52 +00:00
jdlrobson 430628ccc1 Hygiene: Port all Echo css to less.
No changes.
Makes styling code more readable.

Change-Id: Ie45f2cd3671bee5b88ba92ca2946d6e77cd59508
2014-08-04 11:43:27 -07:00
Legoktm a09d4cbaf5 Revert "New hooks for external integration to notification intiialization"
No usecase has been provided, and additionally the hooks
are not documented. Bartosz also points out that
mw.hook calls are asynchronous and memorized.

This reverts commit 9d3561afaf.

Change-Id: If735b46996fab3def835a54223412ef6d3105395
2014-07-26 01:05:35 +00:00
Erik Bernhardson 9d3561afaf New hooks for external integration to notification intiialization
Adds two new hooks to allow extensions to tie into the notification
loading process.  Between these two hooks and the new isInitialized()
method any extension can run code whenever a notification is displayed.

Change-Id: If351835be5f65ca098e2d235ea8c8e4dc40ae2b4
2014-07-21 16:08:56 -07:00
Thiemo Mättig e205992d0b Remove unused code and fix missing/broken documentation
General code cleanup as reported by the PHPStorm static code
analysis. I hope it's not a problem that I made a lot of very
different (but all very tiny) changes in a single patch. If you
want to merge this but you think it's better to split it into
several patches first, please tell me.

Change-Id: I2e2c4bb47f8d20e038d28e236e2ff813b30504af
2014-06-04 04:54:00 +00:00
bsitu 3b3ed1e3bc Fix some notification badge related issue
* 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
2013-10-02 11:25:05 -07:00
kaldari 08fc83b6de Cleaning up Echo 'base' module.
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
2013-09-23 11:29:49 -07:00
bsitu 2b57fbd3c2 Split the Echo API into their own write/read APIs
Change-Id: I0ab85c91c6fbe17e9a1c7dc9e504980f629a5065
2013-09-18 14:28:41 -07:00
bsitu 06e7317472 Archive page and overlay should respect ?uselang=xxx
In addition, any message used in the email should be
sent in the user's language.

Bug: 52992
Change-Id: I3585f28d4ec97b86a467958bdfd603791f293d52
2013-09-09 13:44:05 -07:00
jenkins-bot 5899f3d4f1 Merge "ext.echo.special: Cross-skin adjustments" 2013-09-04 16:22:47 +00:00
MatmaRex dd87542a40 ext.echo.special: Cross-skin adjustments
Out of the default MW skins these only seem to affect CologneBlue.

* Reset padding and list-style-image on ul#mw-echo-special-container
  ourselves, do not rely on the skin doing it
* Use transparent background on .mw-echo-notification (and
  semi-transparent black on hover) instead of solid white and
  light grey to accomodate colored skin backgrounds

Change-Id: I2c178627e4dbe889c4958afc41e4969aaa45a717
2013-08-04 14:56:32 +02:00
MatmaRex 02bf709c97 Do not offset the heading of Special:Notifications from the left
Bug: 52508
Change-Id: Ia9f5a82b1c297d0e1de09bf228a2bbadccb98739
2013-08-04 14:34:33 +02:00
MatmaRex c351851277 ext.echo.special: Move #firstHeading styling from JS to CSS
Also some code cleanup in the part about converting subtitle links
into header icons.

Change-Id: I25eacb9c512fd6883a65df3af97608749b53b228
2013-08-04 14:34:30 +02:00
bsitu f79c6a2e0f (bug 48568) Bust IE browser ajax cache + some API clenaup
Change-Id: Iaacdf41d85dc31a07d3d981086bcd919ba1a40e2
2013-07-18 10:31:23 -07:00
kaldari 8056c44d8d Making header widths consistant on archive page in Echo
Change-Id: Ie31f0fbf737e91d324996473b6e192bd91676ffb
2013-07-12 15:31:21 -07:00
Krenair ab592dad6f Cleanup JS
* Add missing spaces after 'function'
* Remove underscores from identifiers
* Don't use typeof for undefined with local variables and object properties
* API ok/err is deprecated since MediaWiki 1.20 (< 1.22-alpha), use .done and .fail

Change-Id: I5ca3403ee263a0c3e6709618e48e896340952337
2013-06-23 01:25:29 +01:00
bsitu 01e244c8a3 Remove quote around javascript object property name
Change-Id: I5cc7f4179066ab694a67d4c578ed4a562f533ade
2013-06-12 10:51:55 -07:00
kaldari 0558ab1571 Calling functions explicitly due to context
When I changed mw.echo.special.initialize to be called as a
callback from $( document ).ready(), rather than being called
explicitly from the closure, it changed the context, which got
assigned to _this. This broke some of the function calls.

Change-Id: I602a58a82ee91646901d0ab1c8b7bb4b22b3437a
2013-06-11 18:01:41 -07:00
kaldari 902ce9cc04 Don't run mw.echo.special.initialize until DOM is ready
To fix rare race condition in Safari

Change-Id: I2ae556ff6e44f291e761d2937203a3376f4a3177
2013-06-11 14:20:08 -07:00
bsitu 6ffc1cac4b Add clickthrough eventlogging to Echo
Change-Id: I3d05d1aeca92f9a0265a522cc5027ae18394c5b4
2013-06-11 10:46:41 -07:00
Derk-Jan Hartman c638d44190 Echo: Better support for non-default skins, as well as no Javascript
This provides some rudimentary styling support to make Echo usable
with the Modern skin.
It also fixes the Notifications special page so it is styled
correctly in Modern, CologneBlue, or with Javascript turned off.
Also some more tweaks for Monobook skin.
Retiring the 'feedback' link from the special page, per PM.

Bug: 47932
Change-Id: I633a93a78f5a78d0642a3a059fa6f7208f99cec4
2013-06-07 11:36:19 -07:00
bsitu a70208e8fe (bug 48054) Echo API should use a standard continue parameter
Change-Id: I1d5333db4a4d58a1ecfa8dfe562cda5a35093f8b
2013-05-03 18:15:46 -07:00
jenkins-bot 057e86286d Merge "Lots of UI changes per Vibha" 2013-04-18 04:49:48 +00:00
Siebrand Mazeland d440540cf8 Add .jshintrc
Per https://www.mediawiki.org/wiki/CC/JS#Linting. Update a few files to
bring the tests closer to passing.

Change-Id: I08b190e8b44dbdbeb56de5c380d0ed4a8394aca2
2013-04-18 00:36:08 +02:00
kaldari d6fa2b4851 Lots of UI changes per Vibha
Changing highlighting behavior for archive. Now unread notifications
are highlighted with bold text in the archive rather than with a
background color.

Bug: 47149
Change-Id: I03b2a2968db6d067041c2618c5b4f878d8dc548f
2013-04-15 16:39:01 -07:00
kaldari 74fdc01fe6 Adding Help link to Echo archive page
Also fixing feedback link for Safari and Chrome

Change-Id: Icc9f2c66f983e95c1564f6981e952d1d99160111
2013-04-15 16:27:27 -07:00
kaldari ac9425aa8f Mostly reverting change Ifb9a287e since it isn't rendering correctly
For Chrome and Safari

Change-Id: I954a33a1a218d2b6f3996a78d9c244ca6b57042a
2013-04-11 13:02:06 -07:00
jenkins-bot b342f475fa Merge "(bug 46678) Adding feedback link. Temporarily removing Learn more link." 2013-04-11 17:27:07 +00:00
kaldari 7effc4808f (bug 46678) Adding feedback link. Temporarily removing Learn more link.
Change-Id: Ifb9a287e2dc11067efac48bdbf700fe7997d19f0
2013-04-11 10:23:47 -07:00
kaldari 4ee07f2a2e Making 'More...' link in archive more prominent per Vibha
Change-Id: Ibbed21c5efd7ce1f6893c92a7f98ba60a63e98ab
2013-04-09 15:52:35 -07:00
kaldari 5b10fdf14b A bunch of Echo style tweaks per Vibha
Change-Id: I1317b1dd670c8f7a33b62bb7d86a6d25d841c6a1
2013-03-26 18:03:46 -07:00
Bsitu 18f9b513d2 Merge "Fixing dismiss functionality for new checkmatrix system and categories" 2013-03-07 23:21:29 +00:00
Kaldari fcb5d99b37 Fixing dismiss functionality for new checkmatrix system and categories
Change-Id: I3b64c4853587d4d2d8f04fc97c9b3ddb15b520ed
2013-03-07 15:11:46 -08:00
Kaldari 1f88af134b Echo style tweaks per Vibha
Change-Id: I4111092e32213b50ccb0e8dee849a2edfb645827
2013-03-07 10:40:54 -08:00
Kaldari 16331eab92 Adding dismiss functionality to flyout overlay.
Change-Id: Ibfbdb2a9f170e1d9b30b50e8639aee25101e71d6
2013-02-14 11:01:03 -08:00
Kaldari af06e26de6 Adding dismiss functionality to special page
Includes new web preferences for Echo

Also adding ability to set dismissability per notification type

Still need to arrange subscription options into a friendly format

Still need to add dismiss functionality to flyout

Change-Id: I484a24b424e69be3640e63b76f82735edae6f13a
2013-02-12 11:33:50 -08:00
Kaldari 320d044b90 Adding More Info link to Special:Notifications
Also revising some of the formatting, per Vibha.

Change-Id: Id8415c898e81f98c3eb1599ef5980d74ba509081
2013-01-08 14:23:24 -08:00
Kaldari a5dbc1e000 Merge "(bug 43441) Show preferences icon on Special:Notifications without label except as title" 2013-01-02 05:49:36 +00:00
Krenair 7d13364507 (bug 43441) Show preferences icon on Special:Notifications without label except as title
Change-Id: I2bf4b5ba444157464c7c9070411b663485af8935
2013-01-01 21:48:44 -08:00
Kaldari 69e4d5f9a2 More formatting tweaks per Vibha
Change-Id: Id8c536fabe2151031eeafba697c16e0141710741
2013-01-01 01:28:11 +00:00
Krenair 66c93904f1 Try to fix jenkins lint tests
From
https://integration.mediawiki.org/ci/job/mwext-Echo-jslint/142/console
18:54:22 >> modules/overlay/ext.echo.overlay.js: line 56, col 49, ['list']
is better written in dot notation.
18:54:22 >> modules/overlay/ext.echo.overlay.js: line 37, col 44, 'window'
is not defined.
18:54:22 >> modules/overlay/ext.echo.overlay.js: line 127, col 21,
'window' is not defined.
18:54:22 >> modules/special/ext.echo.special.js: line 58, col 49, ['list']
is better written in dot notation.
18:54:22 >> modules/special/ext.echo.special.js: line 112, col 25, Bad
line breaking before '&&'.

Change-Id: I2676a3e07d9d5f7419dd9030dbf218b2c0094cf1
2012-12-27 22:06:20 +00:00
bsitu af8b434f11 Various fixes to the special page
1. EchoNotificationController::resetNotificationCount() does not reset count, it has misleading name (should fix the name in another patch)
2. Prevent multiple concurrent API calls resulting from multiple clicks on more link within very short amount of time

Change-Id: I4aeeadddd4fed833c2ae4308c1a0e94e6644f5e7
2012-12-14 17:52:04 -08:00
Kaldari 65255f7c6b Formatting for Special:Notifications
Change-Id: I891542bf8b6a883e7ff9f78d2b33ddd61c345aa7
2012-12-13 14:08:20 -08:00
bsitu ad14fdbc57 Modification to all notification page
patch set 1:
	* Consolidate notification retrieval in API and Special page
	* Add load more function to special page with records as old as 7 days ago
	* Add support for browsers with javascript disabled

patch set 2:
	* Remove trailing whitespaces

patch set 3:
	* Fix some i18n issue
	* Fix variable names and some exta whitespace
	* Load core css files on special page rendering

Change-Id: Ic69e430b5eb196e5223a2bb6b1d447ef257d559b
2012-12-10 13:51:26 -08:00