Utils refactoring
CSS lint
bug 39932: Clicking twice in a region moves the focus to the Worldwide region
Change-Id: I7853700a077db8de7dbe3c57fd71b829784f2fe6
* Correct the event propagation
* Narayam blue background prevents the autocomplete visible. Overriding
background color with transparent, but that does not look good. May be we
should consider this while designing jquery.ime
Change-Id: If8ea8c1f074cc20b743805953a3bd68da62cb55b
It was commented out in some previous commits.
Also correct the region code of America from NA to AM
Change-Id: I6cec2560393134de1190291e1f49bc0ac4280af0
This library is supposed to be hosted outside WMF gerrit. So adding a
build, test system.
* Add js lint and css lint
* minifier for css and js
* css lint does not pass now.
Change-Id: Iaadfad786f5de4b2ab95e24d3ea4f1d21952af75
* Move the invocation into the parens that contain the function.
* unescaped regex
* Do not wrap function literals in parens unless they are to be
immediately invoked.
Change-Id: Ib3360f88fb7674af0e857d8a84a91fdac1fd8487
This happens when you type language code and hit enter very fast, without
a pause. A matched language is not available when enter is hit, so it goes
noop.
Handled this special case by checking whether the input is a valid language
code and calling onselect on it.
Change-Id: Icaf809f8db8162264d990247a164449b02b2f418
* Refactor the code for frequent languages and introduce
mw.uls.getFrequentLanguageList
* Use it for showing previous languages in language settings
* Show the frequent/common language list in the language selector
opened from display settings.
Change-Id: Ic0f8ea6b9e9ba137b22649e8425fce8014ad456c
Small fix that make global scrolling to affect the ULS (using absolute positioning instead of fixed).
It solves the problem behind bug 39414 without the need for making the window draggable.
Change-Id: Icc3ca81c4b48040b38a5efb42422bdb53e0e2422
Also adds landing page feature. But candidate list is hardcoded
for now. Example html file updated.
show method of lcd renamed to render.
Introduced a trigger searchclear
Introduced mw.uls.changeLanguage, setPreviousLanguages
getPreviousLanguages and getBrowserLanguage methods
Region groups re-numbered - from [4, 1, 2, 3] to [1, 2, 3, 4].
Change-Id: Iac1edf628708e6f40e41578df70d40c42f15289a
A very simple mechanism for importing per-country language lists
from CLDR to ULS' langdb.
If I understand correctly, we only need languages spoken in a country
ordered by number of speakers. The CLDR data already has it and it should be
mostly useful.
Also added a utility function and a test.
Some tweaks to override the CLDR data are still needed:
* The data as it is omits some useful languages. For example, Amharic is not
listed in Eritrea.
* Some countries have a very large number of languages. Ideally it's right,
but is not practical currently, for example India with 75. Maybe
hand-picking or limiting the choice to top X languages can be useful,
but requires thought.
* Some language codes are standard, but different from Wikipedia practice,
for example "pa_Guru" (we just write "pa"). Maybe a mapping of codes
is needed.
Change-Id: I3c0cd5a9118997ba39a4f3695978e359f3de6956
* The jQuery selectors should be referring to the menu for the current
ULS instance rather than querying on the page. This allows multiple
instances of ULS present in the page
* Keep the HTML template with the plugin. No more HTML added from hooks.
* Updated the example based on above change.
* Updated the hooks code.
* Some more documentation.
Change-Id: I48e2e167bc2c09b8653a142c50317c22e8ba1362
Small adjustments on color to make it compliant with the Agora palette,
cross-browser gradient code added according to CSS WMF guidelines, and
adjustment of element sizes.
And whitespace and new line cleanups
Change-Id: I08890009eff9ed5edec77855467529eb07eaeb57