Commit Graph

285 Commits

Author SHA1 Message Date
Niklas Laxström
20d5e431a3 Some cleanup to the language filter
No longer using grid to position the icon, but nested divs instead.

Tweaked some padding etc. related cleanup.
2016-04-06 17:26:44 +03:00
Santhosh Thottingal
7b3cd3d885 Fix: search using API does not respect the passed language list
If there is a search api configured, ULS list all languages that
pass the search irrespective of whether a language is present in
options.languages

Change-Id: I0be80397bb5b4071bc7bc5e787fe107c98e3d912
2016-04-06 15:21:33 +05:30
Santhosh Thottingal
8b3d77dae1 Support language codes that are redirects
Addressing issue #207

Such language codes were not listed in ULS language list.

Root cause was $.uls.data.getLanguagesByScriptGroup was returning
a map of script groups, which contained only resolved language codes.
And later in append method of jquery.uls.lcd.js, there is a check if
that language code is part of languages list passed as option to uls()
call. This test fails and the language code does not get added to display.

Change-Id: Iec914a9694a46eef5750ef3af7346d66e052ab77
2016-04-05 09:17:09 +05:30
This, that and the other
f53de5469b Fix the cancel event function to prevent erroneous close
Changed the conditions for the cancel event function so that the ULS popup does not close when a descendant element of the trigger is clicked.

Was erroneously merged to gerrit as https://gerrit.wikimedia.org/r/#/c/261810/, I forgot that this was an upstream library.

https://phabricator.wikimedia.org/T122722
2016-01-02 02:25:23 +11:00
Santhosh Thottingal
d4de09ffb9 Improve the hide-show logic of ULS
* The events are suppressed on click of ULS trigger, it is an anti
  pattern. It can cause other overlay dialogs, if any, to stay with
  ULS and causes UI glitch. This patch just propagates the events and not
  eats up.
* The show method was hiding all other ULS dialoges open using a
  global $('.uls-menu').hide(). This is again not a good pattern.
  A plugin instance should not interfere with other instance's state.
  More over, calling jQuery hide() method on menu instead of plugin's
  hide method leaves the other plugin instance in a corrupted state.
  The plugin hide method does more things than just hiding the menu.
  It has a 'shown' book keeping property to update. This kind of
  corrupted state was causing bugs like https://phabricator.wikimedia.org/T114123
* While avoiding the above two antipatterns, the way ULS was hidden when
  clicked on any 'other' part of body was improved. It now uses event.target
  to correctly handle the 'click-outside-hide' logic

All these above changes does not change any existing UX.

Change-Id: I40b355115cbda54a68e8d58d3750fb9f1c3b6920
2015-10-06 10:35:05 +05:30
mjbmr
33c28416f5 Add Livvi-Karelian language 2015-08-27 06:38:20 +00:00
Amir E. Aharoni
b4f87fb011 Update Azerbaijani varieties in langdb
CLDR now uses only az-arab and az-latn,
so they must both appear in langdb.
2015-08-02 20:36:20 +03:00
mjbmr
e325783f12 Update Southern Luri name from MediaWiki 2015-08-02 15:08:01 +00:00
mjbmr
7541c3b4d7 Update various names from MediaWiki and translatewiki 2015-07-25 10:30:02 +00:00
Amir E. Aharoni
d81867a7fb Change the autonym of ady
Similar to https://gerrit.wikimedia.org/r/#/c/223783/

This was pointed out to me at translatewiki.net,
and I verified it in a dictionary.
2015-07-10 16:24:18 +03:00
Amir E. Aharoni
54ec06e40d Merge branch 'patch-1' of https://github.com/Mjbmr/jquery.uls into Mjbmr-patch-1 2015-07-10 16:18:45 +03:00
mjbmr
eccd3372ff Add Tunisian variants 2015-06-17 05:24:13 +00:00
mjbmr
542edd8c4a Fix Goan Konkani variants 2015-06-17 05:07:13 +00:00
mjbmr
ec0a1465e3 Fix the name of Central Kurdish 2015-06-01 14:46:32 +00:00
mjbmr
358d989e08 Fix the name of Bakhtiari language 2015-05-24 18:27:45 +00:00
mjbmr
1072e8fd9a Fix name of Northern Luri language 2015-05-11 17:36:45 +00:00
mjbmr
33250d4ebc Add name of South Azerbaijani (azb)
CLDR only uses Latn and Cyrl variant for Azerbaijani
South Azerbaijani uses azb and there is no az-arab
2015-05-08 06:05:34 +00:00
Robin van der Vliet
4ba7d0de68 Update jquery.uls.data.js 2015-04-19 16:53:09 +02:00
Santhosh Thottingal
09883174f4 Merge pull request #182 from Mjbmr/patch-1
Fixes for some languages
2015-04-08 20:08:05 +05:30
Mjbmr
a24f000a6e Fixes for some languages 2015-04-08 12:11:44 +00:00
Amir E. Aharoni
f724e4a289 Remove unnecessary semicolon 2015-04-08 09:41:17 +03:00
Amir E. Aharoni
eb4f8ff251 Make language count calculation only in core.js 2015-03-31 10:20:34 +03:00
Amir E. Aharoni
c81561b3fc Refactor the object keys counter function 2015-03-14 23:20:09 +02:00
Amir E. Aharoni
da9a849b42 Show the Common language section only if the list is long enough 2015-03-14 00:48:18 +02:00
Amir E. Aharoni
b6a30c3d44 Restore support for IE8
IE8 does not support Object.keys.

https://phabricator.wikimedia.org/T86516

Copying the patch from Gerrit:
https://gerrit.wikimedia.org/r/#/c/184316/
2015-02-26 10:46:35 +02:00
thiemowmde
5e1a17c78c Make magnifying glass icon clickable
This makes the magnifying glass icon (search.svg) clickable. Clicking focuses the input field next to the icon, which is the expected, helpful behaviour in my opinion. This is especially helpful with the "compact links" beta feature where the input box is completely invisible and the only remaining indicator that the user can type something is the blinking cursor. If the focus is lost for some reason, this patch allows the user to click the magnifying icon and re-focus the input field again.
2015-01-30 12:05:35 +01:00
Prateek Saxena
0973ddf299 Construct DOM using jQuery instead of an HTML String 2015-01-26 09:26:57 -08:00
Santhosh Thottingal
3469f31235 Remove a dangling comment line
Change-Id: I7106f64b553e167554424e9a3d8687d22d8e4f82
2014-12-23 15:23:45 +05:30
Santhosh Thottingal
10777bb25e Remove unused region filter reference
Change-Id: I130e03bb7ea8bf24e6681fdd8a329c25941ca035
2014-12-22 16:40:20 +05:30
Santhosh Thottingal
107621319d Reduce the title height by moving close button to same row
Change-Id: Id5af0c0bc5654f4ef7decf4712d8eb46ef70933c
2014-12-22 16:39:44 +05:30
Santhosh Thottingal
f417707d67 Remove the unused code to sync region highlight on scroll
Change-Id: Id779c25237584f90ab9132fe24f6cbade1b58da7
2014-12-22 16:38:03 +05:30
Santhosh Thottingal
499c30d0ea Merge branch 'uls-remove-map' of https://github.com/santhoshtr/jquery.uls into santhoshtr-uls-remove-map
Change-Id: Ie59e2a59225873b5cf432df526cbfc135e539d32
2014-12-22 14:51:46 +05:30
Santhosh Thottingal
b0d8d0ae6a Merge pull request #170 from amire80/auto-width
Select the menu width automatically
2014-12-22 11:16:53 +05:30
Amir E. Aharoni
f44302106b For narrow ULS show one column without separators 2014-12-22 11:09:48 +05:30
Amir E. Aharoni
6d72638d6f A more explicit support for valid columns number
Only 1, 2 or 4.
2014-12-15 11:27:44 +02:00
Amir E. Aharoni
f21f103de3 Simplify getMenuWidth() 2014-12-09 13:57:03 +02:00
Amir E. Aharoni
3c93da564c Select the menu width automatically
A follow-up to https://phabricator.wikimedia.org/T76196 .
2014-12-09 13:18:21 +02:00
Amir E. Aharoni
dd59d4d0c8 CSS tweaks for narrow ULS 2014-12-04 00:39:57 +02:00
Amir E. Aharoni
b55bc61dc7 Grid-compatible adjustable columns 2014-12-02 22:16:09 +02:00
Amir E. Aharoni
752a295ee2 Allow sending the number of lcd columns as a parameter
This is needed for https://phabricator.wikimedia.org/T76196
and may also nbe useful for many other features.
2014-12-02 13:23:22 +02:00
Amir E. Aharoni
c6e26c4a4c Update the Arabic script autonym for aeb
This is consistent with
https://gerrit.wikimedia.org/r/175972
2014-11-26 12:40:25 +02:00
Amir E. Aharoni
987acc1996 Change smn back to lowercase like other Sami languages 2014-11-25 21:18:42 +02:00
Amir E. Aharoni
8cdb2262f9 Update langdb JSON with the latest yaml changes 2014-11-16 17:44:50 +02:00
Niklas Laxström
982e2c32e7 Merge pull request #159 from santhoshtr/decorator
Add decorator option for language links
2014-09-25 10:30:15 +03:00
Santhosh Thottingal
022efabf38 Minor formatting changes
Change-Id: I3ffd7029165ff614c13000b333ed30d3874fba28
2014-09-23 16:16:44 +05:30
Santhosh Thottingal
a8afed3972 Update ULS data with latest supplementalData.xml from CLDR
Change-Id: I30d302374c784b7baeb99150a1c53d14bab4123c
2014-09-22 14:01:36 +05:30
Santhosh Thottingal
7346469e20 Add decorator option for language links
Callback function to be called when a language link is prepared
Can be used for custom decoration.
Arguments:
(a) the $language - the language link jQuery object
(b) languageCode

The function can do any styling, changing properites etc on the passed link.
See examples/decorator.html for example usage.

Change-Id: I5a67654440a07cf7dfac683e22dcb5000ded0bfe
2014-09-22 12:32:05 +05:30
Amir E. Aharoni
b345da64af Change the autonym for Algerian Arabic
The incubator at https://incubator.wikimedia.org/wiki/Wp/arq uses
the Arabic script and this name.
2014-08-07 12:23:13 +01:00
Santhosh Thottingal
c2b68e8cbc Remove the region selector feature
* Maps removed from UI
* From no-results UI, removed the links to navigate by clicking region names
* Removed the $.fn.regionSelctor plugin, Retained the RegionSelector class
* Removed all related css for the removed UI parts
* Reduced the padding for main ULS title so that the top header takes less height
* And a dozen of related changes

Change-Id: I8ac89ebe380047ca267e5c7720c2eaa3da080e9d
2014-07-27 20:29:01 +05:30
Amir E. Aharoni
78589aef15 Adding Rutul language
Requested in the Russian Wikipedia for the Rutul incubator.

https://ru.wikipedia.org/wiki/Обсуждение_проекта:Разделы_Википедии_на_региональных_языках_России
2014-06-16 15:06:39 +03:00