Commit Graph

147 Commits

Author SHA1 Message Date
Amir E. Aharoni
a3bca89a42 Implement language-selection-method event
Change-Id: If2d207f8a221c8f2a560b1399ad69a3032b2064b
2013-08-20 05:16:35 +00:00
Amir E. Aharoni
0f34b4d934 Fixing "Common language" functionality
If was broken in
Icda498f676d1d3ddaefad75fd9212150f6966666

Bug: 53035
Change-Id: Ida29364073b07b985050565cacc6634c134f8d6c
2013-08-19 16:34:43 +03:00
Santhosh Thottingal
7649b47f5c Followup I59dfcfb25c, language change work with out event logging
In I59dfcfb25c, for logging events when page is navigating away, we
used callbacks with mw.hook. That is wrong approach. If event logging
is disabled those callbacks will never called: it broke language change
and all use cases which navigates away from current page.

Event logging should not interfere with any ULS functionality. If ULS
functionality depends on callbacks from event logging, it is wrong.

In this patch, we give a small time window to make sure event logging is
fired, but we won't wait for its success or failure.

If eventlogging is disabled, this time window does not exist.

Change-Id: I0b7d9d8b9d1d01b99422010596ebfa80b2589d04
2013-08-19 10:13:56 +00:00
Santhosh Thottingal
117cc5bf46 eventlogger module for ULS
Separating event logging out of ULS functionality. Event logging
is now loosely coupled with ULS. ULS core modules can emit an event
whenever EventLogging is required. The eventlogger module will act
on the event if configured.

Change-Id: I59dfcfb25c1acb85376b56239f2355ee7c4aff1e
2013-08-15 17:08:15 +03:00
jenkins-bot
d0b9d2717f Merge "Log settings-open event" 2013-08-14 09:36:57 +00:00
Siebrand Mazeland
e75b174b10 Make return values consistent
Tipsy does not expect a return value.

Change-Id: I9172dfe18ee1dc6d7773ce861a8a8b52638bc7b6
2013-08-05 17:20:10 +00:00
Niklas Laxström
df18f0a5ff Log settings-open event
Change-Id: I55fb9e4b8b6b210003f6bbad07486e1c2a8cba4f
2013-08-05 15:19:57 +08:00
Niklas Laxström
0af4375e7c Fix spelling mistake in variable name
Change-Id: I791555dc4a04beb6109e212314f8f4747fc8b6d9
2013-08-05 04:04:19 +00:00
Niklas Laxström
e8479a070d Log ui-lang-revert
Change-Id: Ic48dbd7a9d4d43812f437e3c9f17d1ee208166e8
2013-08-02 13:14:27 +00:00
Santhosh Thottingal
d92c75518b Delay loading of language settings javascript
Load them when language settings is opened using cog or ULS icon click

Change-Id: I472497c549bff0fd578156fa0113dae2d6a7a7fb
2013-07-26 15:55:07 +03:00
Santhosh Thottingal
81586572ab Lazy initialization of language settings and ULS from interface triggers
1. For interlanguage position, initialize language settings on first
click on cog
2. For personal toolbar position, initialie ULS on first click of
ULS trigger

Change-Id: Icda498f676d1d3ddaefad75fd9212150f6966666
2013-07-25 12:10:46 +05:30
Santhosh Thottingal
472432517a Lazy initilization of language settings from ULS
For personal toolbar position, initialize langauge settings only
after user clicks on the settings links

Bug: 48211

Change-Id: Ib3e2372e982de890db614a81c06fbbe170ce0d01
2013-07-25 12:10:38 +05:30
Siebrand Mazeland
160ee87f15 Pass integer instead of string
Change-Id: I8b831108d6f40a2e764fbbd46f4241530d7f6153
2013-07-08 14:32:25 +02:00
jenkins-bot
2fdf4bffb3 Merge "Accessibility attributes for ULS trigger" 2013-07-08 07:41:59 +00:00
Santhosh Thottingal
d217a2fe73 Make anything with class 'uls-settings-trigger' work like ULS trigger
Usecase:

Reading problems? click [here]. That [here] can be a ULS trigger to open
language settings.

Change-Id: I1561f8b782037bfdb418f33097fc8b4c519ef393
2013-07-08 13:05:44 +05:30
Santhosh Thottingal
1445d02e6e Accessibility attributes for ULS trigger
Bug: 50575
Change-Id: I07a6fa740e6dcdcb0fd4ae8832ba0ad6fd875170
2013-07-08 07:30:04 +00:00
jenkins-bot
2ea66a84a1 Merge "Use /** for method documentation blocks" 2013-07-06 12:22:35 +00:00
Amir E. Aharoni
6fdc9241e6 Fix indentation and tweak comments a bit
Bug: 50859
Change-Id: Ic827e200674fb72b8b88e362bab30662cc13e304
2013-07-06 14:00:35 +03:00
Niklas Laxström
c51384e4e1 Use /** for method documentation blocks
Change-Id: I6c7a8b7c2e2e861120caa1f1b5ff9b0dc7537737
2013-07-06 10:33:12 +00:00
Santhosh Thottingal
8ddff0b2fc Use single entry point mw.uls.init for all ULS ui initialization
Change-Id: I485ea27deebb530eb89e4b0935eda01a5276f884
2013-07-04 17:05:10 +00:00
Amir E. Aharoni
900f5240bd Calculate the position of the menu near the cog properly
Instead of magic numbers, use a proper calculation according
to the elements' positions.

Bug: 49471
Change-Id: I9093b2c684f557e9e562762b7ef25ced37b8848b
2013-07-04 12:36:47 +00:00
Amir E. Aharoni
b5dd51a1f3 Make Display settings the default view for the cog Language settings
Without this change, clicking the cog near the interlanguage
links can show Input settings first, and the design says that
Display settings must be shown first.

Change-Id: Ieb2dcd7efb5c1a5e1320a271ec7c7ae69d071bae
2013-06-15 08:21:29 -07:00
Santhosh Thottingal
658d97de36 Make the link to undo language change usable
Fix bug: Link to revert to the earlier display language inside the tooltip cannot
be clicked. It was hiding on mouse over.

Bug: 49556
Change-Id: If536142fd61aa191601262dbfec6de960c167081
2013-06-14 11:53:01 +05:30
Santhosh Thottingal
d8a8542c19 Use Tipsy on "Language settings" tooltip
Bug: 47977
Change-Id: Ic50d1be0256170872c7674745d5b2feaefb44095
2013-06-12 14:32:09 +05:30
Santhosh Thottingal
e9ab300889 Fix: ULS popup moves to sidebar if opened from ime menu
Issues fixed:
Incorrect position of ULS when accessed from more languages button
of input/display settings, when language settings opened from ime
menu.

Arrow(callout) appearing for ULS when opened from more languages
button of input/display settings, when language settings opened from ime
menu.

Used a class 'callout' to mark whether windows need callout arrow or not.

Bug: 49060
Change-Id: Ic4c0a1e386918494a0d006a02dd0cf93ef269163
2013-06-07 14:26:46 +00:00
Santhosh Thottingal
18fe9e8b86 Fix: Uncaught TypeError: Cannot read property 'shown' of undefined
Bug: 49103
Change-Id: Iecaa078835777625eca5d35dbb6ece19de1e8b29
2013-06-04 17:25:16 +05:30
jenkins-bot
56d719ec50 Merge "Make sure languages section is visible when adding ULS cog icon" 2013-06-03 09:01:06 +00:00
Santhosh Thottingal
d1988bb3c7 Blacklist old browsers
Blacklist browsers not supporting boxModel

Change-Id: I19bd7e3dbaec2454d8512e5d6f394c21fb6ce5cd
2013-06-03 08:51:04 +03:00
Santhosh Thottingal
2a6cb597f5 Position the language settings in RTL with interlanguage position
The left position of the window was wrong.

Change-Id: I3353d930cb8251021f206ed5f1a0821d17059fe8
2013-06-03 05:44:55 +00:00
Santhosh Thottingal
11fc0347ea Make sure languages section is visible when adding ULS cog icon
Make sure element #p-lang shown.
Bug: 49005

Change-Id: I4cc238f87fdce0c5813b82516599ba3c0d3bf44c
2013-05-31 11:04:16 +05:30
jenkins-bot
e7b010c917 Merge "Don't show anonymous users tipsy with setlang" 2013-05-28 13:43:37 +00:00
Amir E. Aharoni
30aaafcaaa Don't show anonymous users tipsy with setlang
Bug: 47970
Change-Id: Ib7744b2d5f826ed781fff8359b5a4482b0bda522
2013-05-28 06:14:55 +00:00
Santhosh Thottingal
8b46d34004 Allow ULS language settings accessed from user preference screen.
Adds a link in 'personal/i18n' section of user preferences

Bug: 47240
Change-Id: I04d1ea7d36db45f9a0af04e11dade9ae0b524e8e
2013-05-27 16:33:40 +03:00
Santhosh Thottingal
8655504371 Refactor interface integration code
Reduce document.ready code by moving functions outside and grouping
tooltip related code to a function.

Also remove window and document from wrapper anon function since
browser: true is defined in .jshintrc

Bug: 48156
Change-Id: I7228285cdcb33b915e96e7e2c59e4dbc90f5fc96
2013-05-27 12:35:49 +00:00
Santhosh Thottingal
bb3e72f5a0 Simplify the language settings display
Directly show language settings instead of showing ULS language selector
and then simulating click on language settings

Change-Id: Iafb15ac9a7140fcce9e71ed933be6c55be81dc7e
2013-05-20 10:21:38 +05:30
Amir E. Aharoni
07465bf20c Set the position of display settings to match ULS
Bug: 47822
Change-Id: I7b04a831b2c5d7932564a3cdde94be0e233f7a7b
2013-05-16 09:48:44 +00:00
jenkins-bot
254a61182e Merge "Fixes for empty interlanguage links list" 2013-05-07 12:56:55 +00:00
Amir E. Aharoni
d124a118a3 Force anonymous mode also in when the ULS is not shown in the sidebar
Change-Id: Ie82cfa06d32eb45f0c91e01135cff0bd481682b9
2013-05-07 11:50:49 +03:00
Amir E. Aharoni
448340b9da Fixes for empty interlanguage links list
* Change the title near the icon to 'Language'.
* Remove the empty box in the Monobook skin.

Bug: 47972
Bug: 47967
Change-Id: Ie6930509ed7f200cf0bffda91b8d9fd58f1bed8b
2013-05-06 16:47:03 +03:00
Amir E. Aharoni
03546744ba Changes to show the display settings in the sidebar
* Add a caret for the ULS in the sidebar.
* Adjust the panel's position.
* Immediately show the Display settings instead of the language list.

Also added documentation.

Change-Id: I6635092e9e020cb1f5b51f437abde4e81c31ae48
2013-05-02 07:51:49 +03:00
Niklas Laxström
065948182c Fix tipsy behaviour
* Make it visible in interlanguage position
* Do not get stuck in no-tooltip state if previous lang is invalid

Change-Id: Iaf5727a8a729579c2a0c79d0e0dc49d58bbf66ea
2013-04-29 13:07:31 +00:00
Siebrand Mazeland
b1aed294c0 Fix JSHint issues
Change-Id: I0d63ec803f9cc8719f5275717b788812149a94c5
2013-04-29 10:05:02 +02:00
jenkins-bot
f56bab62e6 Merge "Don't show tipsy for an unknown language" 2013-04-26 09:38:19 +00:00
Amir E. Aharoni
6168c77924 Don't show tipsy for an unknown language
Includes an update from upstream.

Bug: 46841
Change-Id: I5a221037af72319f2220bb54230a9549046b6024
2013-04-25 19:21:38 +03:00
Amir E. Aharoni
0d5a4780e2 Scroll the ULS panel into view automatically
Change-Id: I9c46fcaaa13de62147ca0a8151e4e8706a6b09ee
2013-04-25 16:30:10 +03:00
Amir E. Aharoni
f4f332a459 Add the sidebar ULS cog icon and $wgULSPosition variable
Change-Id: I6acf1e21316a41ab8fcb4fd65e065be68693430f
2013-04-23 14:53:58 +02:00
Santhosh Thottingal
453912fdf2 Provide a base ULS RL module and seperate UI language selection
ULS is disabled for anonymous users on WMF projects. But to provide
rest of the features - apis, language database, language selection for
many use cases, we need to provide a minimal ULS. RL module
ext.uls.init does that job now.

For using ULS as interface language selection tool, new RL module
ext.uls.interface is introduced. That will add UI language selection,
webfonts, ime features, if enabled.

Change-Id: I796a7c9cce0de42bf8aa06b26e383e0075dbe1dd
2013-03-26 07:20:01 +00:00