Commit Graph

726 Commits

Author SHA1 Message Date
Fomafix
7c9e64a48a Remove support for MediaWiki version 1.26
Change-Id: I9ad5e87fa335b2b94840c3b3da4e921a41c71d9c
2017-09-24 21:53:26 +02:00
Isarra
86c636fd0a Fix directionality of ULS CLL and languageselect callouts
when appearing on right side of screen

Languageselect was mostly fixed in 354378, but I forgot the
settings ones, so the triangle just disappears when
switching dialogs currently. This follows up on that and
properly fixes it.

Sidebar callouts now appear toward content regardless of
where they're appearing from, or the language
directionality. Triangles are now consistently alligned to
the top of the callout (same position in languageselect and
compact language links) to avoid issues with it appearing
over a scrollbar.

Sideways callout triangles (carets) are consolidated into a
single rendering approach and mixin across compact language
links and toolbox language selector.

Bug: T161586
Change-Id: I7717e26525ac527ede486796f49083ed40ee7d4f
2017-08-10 23:48:34 -04:00
Bartosz Dziewoński
fa0ad11222 Fix positioning of the language change popup when sidebar is on the right
This fixes the same issue as 1d395d4966,
but for the little language change popup (shown after you change the
language) instead of the main interface.

Change-Id: I28d3e8baeebf4619f4f810869c8a2a3fb60496d9
2017-08-10 18:32:12 -04:00
Amire80
757d28b114 Show languages from the Babel box on the user page
Bug: T135371
Change-Id: Ieeaf446326be93a779df3e6bd7a8dca899950a6c
2017-05-30 17:25:23 +03:00
Bartosz Dziewoński
1777dc329b Fix callout positioning logic
Follow-up to 1d395d4966. We were
measuring the wrong $window, which happened to work right most
of the time but wasn't correct.

Change-Id: I50f91623b304f43be58ebac844d507757f56db45
2017-05-20 11:08:30 +02:00
Isarra
1d395d4966 Determine callout directionality based on position as opposed to language
For interlanguage toggle, interlanguage position is no longer assumed to be a
left sidebar, and is determined on the fly in order to appear correctly
regardless of where it is, and not go off the side of the page. This works
across most skins, and regardless of language directionality.

Does not necessarily resolve issues with interlanguage links appearing in the
middle of the page (header/footer), or the callout just plain not fitting for
other reasons (mobile devices).

bug: T161586
Change-Id: Icd55498a945e12c0ff79ba891c094d60ce791115
2017-05-19 04:55:24 +00:00
jenkins-bot
499c459c5d Merge "Fix tooltip positioning in older MediaWiki versions" 2017-04-28 09:00:03 +00:00
Niklas Laxström
4f65980301 Fix tooltip positioning in older MediaWiki versions
Bug: T164052
Change-Id: I931dff9d027bf8d8b54ed87816e2cb23c8a25f00
2017-04-28 08:30:40 +00:00
Kartik Mistry
eb8eed98e9 Add Sundanese font
Bug: T162221
Change-Id: Iabf1a22838bd4375be9c8ed3aabad9205523ef8e
2017-04-19 08:42:19 +00:00
Fomafix
bd9a734fb3 Prettify JSON in ext.uls.webfonts.repository.js
Use a prettifyed JSON with tabs for indenting. In non-debug mode the
whitespaces get removed by the minimizer.

Change-Id: I17f4ebabccdada3c2ad45a7e0119a4f246de0ebb
2017-04-16 23:06:07 +02:00
Bartosz Dziewoński
66c66f6a28 Better language change tooltip positioning in 'interlanguage' mode
Bug: T161203
Change-Id: I1c5afd64295033e2fbb0aa07601af50da8e06266
2017-04-04 17:42:49 +02:00
Bartosz Dziewoński
1414157338 Fix language change tooltip positioning
Use OOjs UI PopupWidget's new built-in positioning to position
the popup relative to the ULS trigger.

Bug: T161203
Change-Id: I3af45e2e3dbaea5f2e6435dd919a8bc7374e486e
2017-04-04 01:38:28 +02:00
Amire80
dcd53534f6 Comment spelling correction
Change-Id: I247644c71f981d7d57304468cab31b4e3057bb81
2017-03-11 16:24:35 +02:00
Huji Lee
c29cdb6d41 ULS link text is rendered connected to the word before it
Bug: T152460
Change-Id: Ibbd726a1c41bde9575ac0d432bdd6b62e6c419a0
2017-02-11 03:04:53 +00:00
jenkins-bot
7ac4ec9f19 Merge "Use an empty array instead of the uls-p-lang-dummy list item (JS)" 2017-02-06 04:56:15 +00:00
Fomafix
3ec9a325a4 Use module 'mediawiki.storage' from core to access localStorage
This change requires MediaWiki version 1.26 and removes support for lower
versions.

Bug: T153635
Change-Id: Ia74e16cb08e8cb1f15196a98329e2994b0283edb
2017-01-20 17:19:46 +01:00
Fomafix
47cfd9c1ae Replace $( document ).ready(...) by $(...)
In jQuery 3 $(document).ready(...) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: I1a9f578d8cf8fa2d9dd38a1b2d3a0b3c32914b74
2017-01-06 14:10:55 +01:00
Fomafix
f6023ec051 Use an empty array instead of the uls-p-lang-dummy list item (JS)
This change is the JavaScript part of change
I54a18f5bd85a8261a25e1160dda7a33fbdf3dd7b.

This change should get deployed when the HTML caches of change
I54a18f5bd85a8261a25e1160dda7a33fbdf3dd7b has expired.

Change-Id: Id7f429d9d1217316341102e27389711525f17b2d
2017-01-04 14:24:02 +01:00
jenkins-bot
3befb0d269 Merge "build: Replace jscs+jshint with eslint" 2016-11-10 05:06:17 +00:00
Ed Sanders
811944c49a build: Replace jscs+jshint with eslint
Change-Id: I7f114267fbb4efd62a9162758445cff4fb3c0973
2016-11-09 15:57:38 +00:00
jenkins-bot
02b1e6fa99 Merge "Use mw.msg() for parameter substitution" 2016-11-07 15:52:52 +00:00
Amire80
22c721dd1b Bidi-isolate input method name in the input method selector
Without this isolation the input method name can be shown
incorrectly when its direction is different from the direction
of the "How to use" element.

This only breaks on Firefox; Chrome somehow shows it correctly
without isolation, but isolation makes sense in any case.

Change-Id: I3c906f4fdd259b94f909b36bab91474cae2971af
2016-11-07 08:27:04 +00:00
Fomafix
58777c4e37 Use mw.msg() for parameter substitution
mw.msg() has already a parameter substitution of $1.
A separate .replace( '$1', ... ) is not necessary.

Change-Id: Ie77bddc4dfb60df36211ce821c1a6f7223cde706
2016-11-06 15:45:50 +01:00
Amire80
4bd38a0fcf Query only for <a> elements that are interlanguage links targets
Depends on the core change in 1.28, which adds the
interlanguage-link-target class to the <a> elements:
I06c80945af785477be52096022c8493e7f82c298

Includes backwards compatibility code so that ULS compact links
would be usable on core versions that don't have this change.

Bug: T135378
Change-Id: I2909ce31e19087358d194e0e108e1ba038e7273e
Depends-On: I06c80945af785477be52096022c8493e7f82c298
2016-11-01 12:59:35 +00:00
Volker E
41f5ce254e Replace deprecated .mw-ui-constructive with .mw-ui-progressive
Bug: T146923
Change-Id: I5d4b5e9fa41ef7657442b734702b3ea21d90c66a
2016-09-29 15:59:32 -07:00
Amire80
908161f0c1 Add hooks fired when finished processing compact language links
Bug: T145755
Change-Id: I921191c2cd32d55161b32bad2b2e0d98228cf230
2016-09-27 13:34:02 +00:00
Timo Tijhof
1240a62ca0 geoclient: Update localStorage comment
Follows-up 4cd1def.

localStorage is available by all supported browsers as of MediaWiki 1.25.
As of MediaWiki 1.27, this is also enforced by an explicit feature test
in startup.js.

Change-Id: I12b577919579f498e294376f748715b868f21869
2016-09-15 14:17:20 -07:00
Niklas Laxström
41f9a6f994 Undo tooltip: position when shown, not when created
Especially on Special:CX, where page layout changes soon after load
(for example scrollbars get added when more content loads), the tooltip
would be positioned incorrectly. Now it is more likely to be positioned
correctly, and will get re-positioned again if it is shown again after
being hidden.

Bug: T145483
Change-Id: I527fc62b196e55101950cffcc6ec43926f63aa4a
2016-09-15 08:06:40 +00:00
Niklas Laxström
a94ffa4b21 Do not use tipsy class with new popup
The tipsy class has CSS styling from the tipsy module which do
not work with the OO.ui.PopupWidget. If the tipsy module gets
loaded for some other reason, the display will be slightly broken.
Fixed by renaming the class.

Bug: T96648
Change-Id: Ib0e11098506560f4de1c6402b8c980ad3ebc3879
2016-08-31 10:21:36 +02:00
Fomafix
8778051f8f Remove unused variable loginUri
The variable loginUri was added in 422371f6 but never used.

Change-Id: I85aaa6aa524dbe0a02129696f1bff46fb410fbe5
2016-08-30 12:18:45 +02:00
jenkins-bot
58b31d7078 Merge "ext.uls.compactlinks: consistently normalize language codes" 2016-08-25 09:50:25 +00:00
Niklas Laxström
2144019c50 ext.uls.compactlinks: consistently normalize language codes
Create a function for this purpose and use it everywhere where
language code is read from an attribute.

Bug: T143867
Change-Id: I01b6f04dd9185a9f4ab565e96ca5a6a34e4ea14a
2016-08-25 08:22:17 +00:00
Niklas Laxström
4cd1def0f3 Switch default ULS geoip provider
Current provider is going away. Switching to another free provider.
Implemented caching with a cookie for speed and to avoid generating
unnecessary load on the service.

Bug: T143542
Change-Id: I191d69a6fb8abe9556f475dfef1368dc9f96b846
2016-08-24 15:55:00 +00:00
Amire80
0d1d9a4b6d Apply toLowerCase when reading featured articles
Consistently with getInterlanguageList(). Without this 'nds-NL'
will be handled incorrectly when the article in it is featured.

Bug: T143527
Change-Id: Ie7fe5a270cb3030899b6034512351d5d66d7be06
2016-08-21 22:47:27 +03:00
eranroz
abaddfaccd Earlier evaluation of compactlinks
* Prospectively load ext.uls.init
* Prospectively check if readyState is interactive
Bug: T136463
Change-Id: Ib36ef6a2b9955189acfbe06bd6b498a66014cf06
2016-08-19 11:10:27 +00:00
jdlrobson
9e0dcbde35 Enable UniversalLanguageSelector modules for mobile
Enable several of the ULS modules so they can be used in a mobile context,
in particular by the Translate Extension

Changes:
* Create a ext.uls.common module that can be loaded safely on mobile
* Only add the ext.uls.init entry point module on desktop (ensured by
the use of targets). On mobile it has no impact other than to increase
the amount of bytes shipped to users.
* Note various modules have not been enabled for mobile usage.

Bug: T102922
Change-Id: If2808886f0bfa153f5918e3c7536e88641028da9
2016-08-17 06:43:46 +00:00
jdlrobson
798874ffa0 Remove jquery.tipsy from UniversalLanguageSelector
This doesn't appear to be justified due to the one use case. This
will now be done via OOjs UI and given jquery.tipsy is deprecated
it is better to replace it (T117720).

Bug: T119417
Bug: T102922
Change-Id: I60cce248884308bf0728d153f6137a8d25e01300
2016-08-17 06:13:09 +00:00
jenkins-bot
78adcc5e20 Merge "LanguageSettings: Simplify positioning code" 2016-08-16 11:49:44 +00:00
jenkins-bot
c4e5dcc2fd Merge "DisplaySettings: disallow focus on tabgroup buttons" 2016-08-16 10:48:09 +00:00
jenkins-bot
f44d97230b Merge "LanguageSettings: Do not render modules twice on initialization" 2016-08-16 10:03:00 +00:00
Niklas Laxström
05e0b8c53e LanguageSettings: Simplify positioning code
* Remove scrolling from positioning code
* Make sure that any calculated default positions also apply to
* modules by updating this.top and this.left.

Bug: T143074
Change-Id: Iffc49674abcca8a8c4a600569a05db1314fae3f6
2016-08-16 06:28:43 +00:00
Niklas Laxström
d24472e962 Fix some comment typos
Change-Id: I338891147cb6aa8e6d88119eb61ea718edb93747
2016-08-15 09:55:02 +00:00
Niklas Laxström
5e7e8fe48e LanguageSettings: Do not render modules twice on initialization
Change-Id: I25d939ffcabde394bb7a496ee8bc5df9a87c2573
2016-08-15 09:48:00 +00:00
Niklas Laxström
f6da60cfab DisplaySettings: disallow focus on tabgroup buttons
Focus state looks bad in this context.

Change-Id: I3bc1cd63123711ded0652910ef4fa62f19c3bd12
2016-08-15 09:47:51 +00:00
Amire80
43f62e601c Add languages in which there is a featured article
Bug: T70071
Change-Id: I5ed2f1ece5b11b96ec6416bc1c6c2266ac6b4388
2016-08-04 19:42:46 +03:00
jenkins-bot
9c1decf616 Merge "CompactLinks: support sortPrepend from WikiBaseClient" 2016-08-02 05:14:55 +00:00
jenkins-bot
b8c79727d8 Merge "Show languages that appear in the page's text" 2016-08-01 06:31:24 +00:00
Santhosh Thottingal
df70f941b2 Show languages that appear in the page's text
This is just a simple search for elements with lang attribute.

This will be executed only when previous languages, geo-IP based languages,
browser, UI, content languages etc. are not filling the defined compact size.

Bug: T70077
Change-Id: I77d1efa5e29deeaaf595753fb5519c8b70c7f2b5
2016-07-28 17:32:10 +02:00
Kartik Mistry
d4ea8550fa Update Skeirs II font
This fixes display of Latin text in Gothic script.

Bug: T124785
Change-Id: Iaf2cc6b05591368356c241e7b65ce4a8e33c24e0
2016-07-28 15:32:27 +02:00
Niklas Laxström
217aefdb7a Move als->gsw override to ext.uls.init
So that it is loaded for compact language links. The ext.mediawiki.uls
module is starting to look very empty now can could be removed easily
in follow-up. ext.uls.init depends on jquery.uls.data so this is safe.

Bug: T139949
Change-Id: Icac10f073e122284723c48782c2a1cf7f10b45ec
2016-07-27 06:16:51 +00:00