Commit Graph

25 Commits

Author SHA1 Message Date
Niklas Laxström
85f7ebdd4b Delay compact language links language selector creation until click
No point constructing the selector when it is used.

Task: T122341
Change-Id: I928f9041a95e2c48625dba6e11550ac6bbdcb7fd
2016-04-22 10:19:21 +00:00
Niklas Laxström
d2ef6405cb Use mw.msg rather than jquery.i18n
No need to use jquery.i18n here, and avoids going through html

Task: T122341
Change-Id: Ib04011b8c672cd50c02a73791257650fa3dfc1dd
2016-04-22 09:51:24 +00:00
Santhosh Thottingal
aca1545513 Compact links: The trigger kept pressed while the panel is open
Bug: T70078
Change-Id: Iaac9d7f2a5ec5da049b2b4c8e88a9f0bc2a91bda
2016-04-22 07:11:33 +02:00
jenkins-bot
ce6f8734a9 Merge "Correct the position the arrow of selector and add shadow" 2016-04-06 12:16:28 +00:00
Federico Leva
6ffd42c07a Resolve language code redirects before using them in ULS
Interlanguage lists can contain language codes that are redirects
in language data of ULS.
For example, sr is a redirect to sr-cyrl.

So, if sr is passes as one of the language to ULS, its region, script
grouping is failing and the end result will be missing them in the ULS
language list. This should be properly fixed in jquery.uls library.
Tracked at https://github.com/wikimedia/jquery.uls/issues/207

In this patch we are following a simple approach of passing the language
codes to ULS as redirect resolved.

Bug: T100002
Bug: T131005
Bug: T126909
Bug: T123834
Change-Id: I8b89edb60b4d2c6f2b25c8589569f748c5523722
2016-04-06 10:42:43 +02:00
Santhosh Thottingal
d5f6930cb4 Correct the position the arrow of selector and add shadow
The pointer arrow of the ULS was not aligned with the 'x more' trigger
and it missed shadow. This commit fixes it.

Notably, we replace the old arrow with a box rotated 45 degree so that
we can apply the shadow very easily.

Bug: T130633
Change-Id: I4d36f3ee9fcfea932e10208518a03e7b246a7abe
2016-04-06 09:43:39 +02:00
Siebrand Mazeland
6a2b2e0bba Update test files
- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.

Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
2016-02-18 18:51:37 +00:00
Timo Tijhof
862fafb9ab Various performance fixes for CompactInterlanguageList
T122341:
* Move hideOriginal() call to right before render() to reduce repaint flash.
* Use plain css() instead of show() and hide().
* Use native getAttribute() instead of jQuery().attr.

Other minor clean up:
* Fix jsduck syntax.
* Consistently use 'location' instead of 'window.location'
  (mostly the case already except for one).

Bug: T122341
Change-Id: Ief76fe7c0fb2bfca3468361ebab14c1dfb1df4c2
2016-01-04 07:19:38 -08:00
Fomafix
0833c990e7 Apply coding conventions for JavaScript
Change-Id: Id158ac08d32cc7421e47ae6abdd2bd80879f04d9
2015-02-07 19:34:21 +00:00
Niharika Kohli
bdb7b9c3d3 Compact Links: Redesign the more languages button
Change-Id: Ie4d1cb5bf89ac47bac141b0f5a83452cfa9a0783
2014-12-01 14:32:31 +05:30
eranroz
7865a65bb0 Compact links: Set href for langugage links in ULS panel
Based on jquery.uls upstream version 982e2c32e7b3
https://github.com/wikimedia/jquery.uls/commit/982e2c32e7b3

Bug: 64797
Change-Id: Ia8b2ad22913693d2f88693091d288ca74d7d8c87
2014-09-25 13:40:41 +05:30
Derk-Jan Hartman
1b81fa1e49 Compactlinks: Use an actual button to build a button
Bug: 68075

Change-Id: Id9c72975df7b3dc9a38aca2a9d6165275bb39731
2014-08-23 14:30:19 +00:00
Federico Leva
b8517a2a1d Replace #p-lang-list for monobook as well
Followup to I154919a54b032dd481fe080204a2a16819d85140

Change-Id: Ibbfccfe2300f10808a45ee2bb1ecb45dcf3eb079
2014-06-12 13:42:30 +00:00
Nemo bis
625334fe63 Always display assistant languages where available
Assistant languages are chosen by users in a wiki with
Translate extension. If assistant languages are defined,
use that also for predicting the languages in compact list.

Bug: 62342
Change-Id: I25f42f3802e80baf5d4724ba6e42e00b8be2349e
2014-05-27 04:03:50 +00:00
Amir E. Aharoni
50f6bdce29 Replace #p-lang-list with #p-lang .body ul
The #p-lang-list id was removed from core (I028880cfa),
and this broke the compact links beta feature.
This commit replaces it with a different selector.

Change-Id: I154919a54b032dd481fe080204a2a16819d85140
2014-05-22 13:17:15 +00:00
Nemo bis
131ca48d0b Misc typofixes
Change-Id: I0da399382082ad0d197f48641050b6813e3bdc6e
2014-05-11 15:52:13 +02:00
Amir E. Aharoni
7c5b750700 Localize the number in the "more languages" message
Change-Id: I11c88423b048f31c8a6fc9be1af63e32835717b4
2014-04-06 20:17:08 +05:30
Amir E. Aharoni
2ac455bd2a RTL positioning for compact interlanguage links
Bug: 62981
Change-Id: If68975431eb58a7fcafcb7fec9f8a95f5e09ad80
2014-04-06 19:48:56 +05:30
Amir E. Aharoni
d4c2053fc0 Whitespace and comments cleanup
Change-Id: Ic1f3d3acbb8d6473d6cc5c2d04f3689dca49f911
2014-04-04 18:52:50 +03:00
Niharika Kohli
28d5d8da03 Unhide a language instead of adding it
Solves a few bugs. Displays language titles and quality indicators
are not lost.

Bug: 62376

Change-Id: I0d597eec3b70bb33c96086eefe14edcd92029aaa
2014-04-01 10:42:31 +00:00
Santhosh Thottingal
92652c11b1 Reorganize the compact links code, make it a jquery plugin
No change in functionality. Refactored the code a lot and made it as
a jquery plugin, similar to the other components of ULS

Change-Id: I69199ba37b13ec7fd4a9b7b8eba5b3aa28f0edb5
2014-03-29 10:02:55 +05:30
Santhosh Thottingal
ce383b803e Push selected language to previous languages list
Bug: 62692
Change-Id: I3b40ed1038cec0b34d3b0fbefcae4d4ae650ce36
2014-03-24 12:51:03 +05:30
Niharika Kohli
1031c11521 Rename variables for better comprehension
Change-Id: Ifa8da084a93e85201564bae3aa71b0c3c899894b
2014-03-21 08:36:46 +00:00
Niharika Kohli
964349dd70 Remove redundant code and improve accuracy
Change-Id: I00c6953a041b38c68b658377516a82e8aa9cdb6c
2014-03-19 14:26:51 +00:00
Niharika Kohli
5ca0d5d400 Compacting the interlanguage links with the ULS
Displays a shorter version of the language list with the languages that are more relevant to you.
More info at https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links

Due to a problem with duplicate patchsets we had to create a new one. 
The history and info on code and security revisions is available at
https://gerrit.wikimedia.org/r/#/c/104793/

Change-Id: I109bfb10f6181b6408aab170db5e8ca32493d657
2014-03-04 09:41:47 +00:00