* Scoll to currently highlighted item if its not visible.
* Fix navigation when list is filtered
* Add support for selecting highlighted item by pressing enter
The regions displayed on ULS depend on the showRegions parameter
passed to uls.lcd plugin. If a new language and region have
been added to the language data, the region for it will not be
available to showRegion because it's static.
Bug: T187553
sortByScriptGroup and getLanguagesByScriptGroup are updated from language-data.
(jquery.uls.data.utils should be merged to language-data.)
This resolves downstream bug
https://phabricator.wikimedia.org/T189090
* 20px spacing above and below the "No results found" message.
* 12px spacing above and below the search indications ("You can search by...")
* Adjusting the text color to use Base20 (#54595D)
* Adjust the background to use the same background color as the area above it (#FCFCFC).
* Add a top border in Base80 (#EAECF0) to separate both areas.
See https://phabricator.wikimedia.org/T175235
* Documentation updates
* Do not group search results by region
* Disable grouping by script when region grouping is disabled
* Add docs, clarify names per code review
* Fix bool -> boolean for consistency
* Custom no-results message support
* Refactoring and clean up for LanguageCategoryDisplay class
* Document the options for LanguageCategoryDisplay class
* Reduce the spreading of no results handler code
* Add an option to accept no results template
* Remove unwanted, unused constructor too
* Use CSS to hide or show the no-results view
* Remove the unwanted noresults method in jquery.uls.core, directly
call the same method of lcd.
* Add an example
* Support a function returning jquery element as the no-result handler
It is a bad practice to assign id attributes when there is no guarantee
about the uniqueness of element. ULS should function even if there are
more than one instance of it is present in a page.
* Use eslint and stylelint, fix all errors
* Remove jshint, jsbeautify
* Use Object.keys directly since that is available in all major browsers
* Fixes for eslint, stylelint errors
* stylelint is not included in grunt test yet because jquery.uls.mobile.css
has so many !important and need to figure out whether they are really needed
* Drop the ugly height: 100% hack and do it properly and remove TODO
* after( $suggestions.show() ) seems to not work as expected in recent
jQuery versions. Changed it to manipulate the presence of 'hide'
class properly.
* Consistency fix in a comment
* Fixed a bug where creating multiple ULS instances would break the
"no search results" functionality. This is because we were appending
a jQuery element wrapped in a $(). This is obviously a no-op and a
regression when the template actually was a string and not jQuery.
Fixed by using clone() on it.
https://phabricator.wikimedia.org/T175233
The translatable message uls-search-help was available in
the i18n files, but it was not actually used in the code,
so it was always shown in English.
This patch adds it to the JS code.
Tweak specificty of the rule that hides bullets so that it is easy
to override.
Move dir and lang attributes from <li> to <a> so that the bullets
appear on the correct side for reverse directionality scripts.
Change-Id: Ic0d0c5220b0b374c2a3a19023c40d81f3e20007c
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
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
* 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