Commit Graph
100 Commits
Author SHA1 Message Date
Santhosh ThottingalandNiklas Laxström 990c5402f4 Use sed and a template for generating jquery.uls.data.js
Drop browserify.
2021-03-18 18:56:17 +02:00
Santhosh ThottingalandNiklas Laxström f8ed687422 Remove png icons and use svg icons
Since svg support was poor, we had used a fallback approach.
But browsers support svg these days.
2020-09-29 17:31:18 +03:00
Santhosh Thottingal a911e46bd4 Fix the path to language-data.json in @wikimedia/language-data
It was moved to data folder in recent commit:
https://github.com/wikimedia/language-data/commit/09ab6024fe5200460cdec9a3f01c5098b49390de
2020-04-02 12:24:00 +05:30
Santhosh Thottingal 619646082c Installing browserify should not update package.json
npm changed their behavior of 'npm install'. See
https://github.com/npm/npm/issues/17010

use --no-save option to avoid package.json changes
2019-08-29 16:16:07 +05:30
Santhosh ThottingalandNiklas Laxström 4ba3b6b1bc Update jquery.uls.data with latest language-data
*  Add proper BCP 47 names for various languages by cscott
2019-01-18 17:40:02 +02:00
Santhosh Thottingal 1f900843fe i18n for the noResultsTemplate
See https://phabricator.wikimedia.org/T187390
2018-02-16 09:34:54 +05:30
Santhosh Thottingal c2eb7a7850 Use Array.prototype.indexOf instead of $.inArray
All our supported browsers now have this ES5 method.
2018-02-08 17:23:12 +05:30
Santhosh Thottingal d3921afeac Change the language icon color to gray and optimize
Changed the color to #54595d
2018-02-05 14:49:51 +05:30
Santhosh ThottingalandKartik Mistry 3161b34b2b language-data update: Add Western Armenian to known languages 2018-02-02 11:55:54 +05:30
Santhosh Thottingal 081310b45e Style adjustments for no-results
* 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
2018-01-30 12:52:47 +05:30
Santhosh ThottingalandNiklas Laxström d122f371e3 Update documentation for no-results template (#289) 2018-01-16 16:10:53 +02:00
Santhosh ThottingalandNiklas Laxström 2aa43148bb Custom no-results message support (#286)
* 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
2018-01-12 16:05:11 +02:00
Santhosh ThottingalandNiklas Laxström d3ff6f09f2 Upgrade jquery in the example to 3.2.1 2018-01-10 15:58:50 +02:00
Santhosh ThottingalandNiklas Laxström 37c9d66a2b Use .siblings to locate the suggestions, clear elements for efficiency (#285) 2018-01-10 09:13:56 +02:00
Santhosh ThottingalandNiklas Laxström bccf103900 Removing assigned ids to elements that are not guaranteed to be unique (#284)
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.
2018-01-09 09:47:47 +02:00
Santhosh Thottingal f46aad0a01 Use .on('event', handler) pattern instead of .event(handler) 2018-01-08 12:22:02 +05:30
Santhosh Thottingal e67e1e42ee Simplify key press event handlers
Remove eventSupported checks and just rely on jquery.keydown
2018-01-05 15:00:31 +05:30
Santhosh ThottingalandNiklas Laxström 2a77df6c41 Use eslint and stylelint, fix all errors (#282)
* 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
2018-01-04 15:58:35 +02:00
Santhosh Thottingal 63e1b06514 Update language data
* Make Spanish available under the Oceania region
* Add the Kumyk language
2017-12-07 16:05:33 +05:30
Santhosh Thottingal 0da69818b9 Remove autonym font and example based on it 2017-11-29 16:36:47 +05:30
Santhosh ThottingalandGitHub 3a453ad545 Merge pull request #276 from wikimedia/search
Improve search code
2017-11-29 15:51:16 +05:30
Santhosh Thottingal 74a4426778 Remove all tests that are already covered by language-data 2017-10-11 16:04:09 +05:30
Santhosh ThottingalandGitHub 34df56f650 Merge pull request #272 from wikimedia/fix-no-search-results
Improve how "no search results" is handled
2017-09-11 11:32:46 +05:30
Santhosh Thottingal 6d6a1326b5 Use wikimedia/language-data node module for data
Now that we have this node module, let us use that as upstream
for data
2017-08-28 17:46:09 +05:30
Santhosh ThottingalandGitHub e30fe3f22b Merge pull request #265 from amire80/unique-autonyms
Make all autonyms unique and add a test for this
2017-06-13 10:26:30 +05:30
Santhosh ThottingalandGitHub 8ecf01eafa Merge pull request #245 from amire80/lki
Remove the left-to-right mark from the lki autonym
2016-12-05 10:28:36 +05:30
Santhosh ThottingalandGitHub c732844efc Merge pull request #243 from amire80/uls-search-help
Using the message uls-search-help in the code
2016-12-02 10:02:09 +05:30
Santhosh ThottingalandGitHub 9ae0561eb4 Merge pull request #242 from amire80/sty
Add Siberian Tatar (sty) to langdb
2016-11-28 14:38:16 +05:30
Santhosh ThottingalandGitHub 8e82cfd515 Merge pull request #236 from wikimedia/styling
Update lcd styling
2016-08-29 15:14:48 +05:30
Santhosh Thottingal bb4d96c33a List the languages in Worldwide in their respective regions too
Fix for https://phabricator.wikimedia.org/T137868
This was a wrong solution for https://phabricator.wikimedia.org/T41921

Change-Id: Ib920e75fca71716d14aecd25c163f0c1e8e63270
2016-07-20 09:55:24 +05:30
Santhosh ThottingalandGitHub fa67b1904c Merge pull request #232 from wikimedia/terms
Rename common languages to suggested languages
2016-07-13 14:44:18 +05:30
Santhosh ThottingalandGitHub ffa067084f Merge pull request #230 from Nikerabbit/fax
Add fax
2016-06-22 17:50:43 +05:30
Santhosh Thottingal ae9dda23b7 Merge branch 'nikerabbit-badges' 2016-06-09 15:08:28 +05:30
Santhosh Thottingal 18e4cd1959 Merge pull request #227 from wikimedia/Nikerabbit-patch-2
Avoid scrollbars in RTL
2016-06-08 15:32:32 +05:30
Santhosh Thottingal 20eea5de9f Merge pull request #225 from wikimedia/nikerabbit-langdbterritories
Improve our languages spoken by territory data
2016-06-02 09:15:53 +05:30
Santhosh Thottingal 0a06f4e986 Avoid calling searchAPI more than once
The calling code should not be in loop

Change-Id: Ib8433115bf9bf18827ad13bcfb3299a846ae98b3
2016-05-25 16:39:17 +05:30
Santhosh Thottingal 0d558ef7d5 Merge pull request #223 from wikimedia/Nikerabbit-patch-1
Some styling tweaks to search bar
2016-05-25 10:24:48 +05:30
Santhosh Thottingal ed2427ba2d Remove regionfilter related utility methods
Change-Id: I1ab96280fa71cac3745eb7e7210b15a1e5bc78f8
2016-05-17 15:25:53 +05:30
Santhosh Thottingal 9a8dc303a7 Update example files by removing js/css files not existing
Change-Id: I150a7c6c41fa65fd299b5838c8b80c810a0bb1cd
2016-05-11 12:02:07 +05:30
Santhosh Thottingal e9c0f3e4db Show "You may be interested in" section when no results found
This was broken long time back

Change-Id: I15f715067d82fb61959763824183a6813536e94e
2016-05-09 17:09:06 +05:30
Santhosh Thottingal 11b87cb5be Remove the regionfilter module
It has lot of redundant and unused code used when we had the map.
Removing it. No change in functionality is expected

Change-Id: I278ef63b7756b5061c0b6638ba4e7b7deebf5a0d
2016-05-09 17:03:37 +05:30
Santhosh Thottingal 29f28a1f50 Clean up code formatting, add .jsbeautifyrc
Change-Id: Iafcc8084d87d8f2323d97bb4446e031951820d41
2016-05-09 16:41:31 +05:30
Santhosh Thottingal 35cd1b5736 Remove unwanted comma
Change-Id: I9c09ef9cf25949b37035c58f7c8550e30fa3442b
2016-05-09 16:32:12 +05:30
Santhosh Thottingal 0cc7f2f54b Call onCancel from hide
See issue #215

The cancel, hide methods are still confusing, may be in some other patch
we need clean up this. A grep shows ULS use onCancel only with compact
language links.

Change-Id: I0e08d169952945237efce9108d51cb68c4a29ad5
2016-05-02 17:27:18 +05:30
Santhosh Thottingal ff8051a5c6 Update the screenshot 2016-04-22 11:17:55 +05:30
Santhosh Thottingal d61eb1ffd4 Merge pull request #216 from wikimedia/drop-compact
Remove compact mode
2016-04-22 11:12:07 +05:30
Santhosh Thottingal 5ceba61905 Merge pull request #217 from wikimedia/icon
Update search icon
2016-04-21 17:12:13 +05:30
Santhosh Thottingal 5568fb491c Merge pull request #212 from wikimedia/heatter
Some cleanup to the language filter
2016-04-11 11:27:36 +05:30
Santhosh Thottingal bf0c555b8c Remove unwanted script related code in search method
Fixes issue #209

Change-Id: I33345fe553abcc9bfd6288fe579878a2cf307e8f
2016-04-06 16:38:44 +05:30
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 2e16e9b701 Remove the reference to map block
Change-Id: I141d468d352176f000a750d40b54b4dbf799ba05
2016-04-06 10:23:38 +05:30
Santhosh Thottingal 7780bfb17a Add left and right padding for search header of compact ULS
See https://phabricator.wikimedia.org/T130633

Change-Id: I59a632c312682a92cf8341dec9de2779a81bb298
2016-04-05 10:15:27 +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
Santhosh Thottingal f2a27323b6 Merge pull request #205 from atlight/patch-1
Fix the cancel event function to prevent erroneous close
2016-01-02 10:09:06 +05:30
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
Santhosh Thottingal 5dbb9d0111 Merge pull request #185 from robin0van0der0v/patch-2
Fixes unit test by adding "tzl".
2015-04-20 19:21:08 +05:30
Santhosh Thottingal 71f61eaa0e Merge pull request #184 from robin0van0der0v/patch-1
Added Talossan [ISO 639-3:tzl] to langdb and updated jquery.uls.data
2015-04-20 16:25:42 +05:30
Santhosh Thottingal 09883174f4 Merge pull request #182 from Mjbmr/patch-1
Fixes for some languages
2015-04-08 20:08:05 +05:30
Santhosh Thottingal 345097a8bd Merge pull request #181 from amire80/no-common
Show the Common language section only if the list is long enough
2015-04-08 16:42:01 +05:30
Santhosh Thottingal ef6f73bb06 Merge pull request #179 from thiemowmde/patch-1
Make magnifying glass icon clickable
2015-01-30 07:40:11 -08:00
Santhosh Thottingal 0a627fb531 Merge pull request #177 from prtksxna/dom
Construct DOM using jQuery instead of an HTML String
2015-01-26 21:02:26 -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 63a0af6142 Merge branch 'santhoshtr-uls-remove-map' 2014-12-22 14:54:16 +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
Santhosh Thottingal 94e867f62e Merge pull request #173 from amire80/columns-number
A more explicit support for valid columns number
2014-12-15 15:27:26 +05:30
Santhosh Thottingal 08044f8aef Merge pull request #168 from amire80/columns
Allow sending the number of lcd columns as a parameter
2014-12-04 14:31:26 +05:30
Santhosh Thottingal 03a1baa4ed Merge pull request #167 from amire80/aeb-autonym
Update the Arabic script autonym for aeb
2014-11-26 16:27:07 +05:30
Santhosh Thottingal d1e0b30e5f Fix broken tests while adding more languages
Change-Id: I8c180e96bc2fb40582e0fedfd9c8eab430961c59
2014-11-17 10:32:24 +05:30
Santhosh Thottingal 3a7840f937 Merge pull request #165 from amire80/langdbjson
Add languages to langdb: Bari, Dinka, Songhay
2014-11-17 09:47:02 +05:30
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
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
Santhosh Thottingal 18f11eda58 Merge pull request #154 from kartikm/jqueryname
Use jquery instead of deprecated jQuery in package.json
2014-07-27 20:15:19 +05:30
Santhosh Thottingal 9f9366e29b Merge pull request #155 from kartikm/travis
Fix .travis.yml
2014-06-10 15:02:42 +05:30
Santhosh Thottingal abc82945c1 Bring back the clear icon for clearing the search
Caused by a class rename

Change-Id: If4fa0bc14ca890e43182993f8bdd5ddb9de62417
2014-06-03 09:28:43 +05:30
Santhosh Thottingal fef552d97b Merge branch 'master' of https://github.com/nemobis/jquery.uls into nemobis-master
Change-Id: I27589e099cf9841194c92228b8d91cee33937390
2014-06-02 10:03:31 +05:30
Santhosh Thottingal 36478fa55a Fix css class names in the template
Somehow missed in previous merges

Change-Id: I700f53b6d9d78f7b5db88d880c151139bfb7e4dc
2014-05-22 09:33:12 +05:30
Santhosh Thottingal afb99eb09d Merge branch 'edg2s-css' 2014-05-18 14:14:15 +05:30
Santhosh Thottingal b3c5c44efa Merge branch 'css' of github.com:edg2s/jquery.uls into edg2s-css
Change-Id: I04d52aa78bb99762dbc1982f8b1515e9cb9d7e67
2014-05-18 14:08:09 +05:30
Santhosh Thottingal e59b5233b1 Merge pull request #150 from thiemowmde/master
Hide misplaced borders in the compact design
2014-05-18 10:44:12 +05:30
Santhosh Thottingal 7d38ed9bde Merge branch 'master' of github.com:wikimedia/jquery.uls 2014-05-18 10:21:39 +05:30
Santhosh Thottingal 9599ed7d26 Fix the jQuery migration warnings
Remove the spaces in the beginning of html template strings.
$( html ) require html to start with  '<'

See https://bugzilla.wikimedia.org/show_bug.cgi?id=65400

Change-Id: I93eaf41390ab72fcae1b8d4015585bc4f82e6f8a
2014-05-18 10:20:07 +05:30
Santhosh Thottingal cc37ec225d Upgrade to jQuery 1.11.1
Change-Id: I3eaf9c56fe18bad51ce22b1292d6d7308ec20690
2014-05-18 10:18:30 +05:30
Santhosh Thottingal d352b73c37 Merge pull request #145 from edg2s/patch-3
Consistently use this when scope allows it
2014-04-29 09:16:10 +05:30
Santhosh Thottingal c7c938cf4c Merge pull request #143 from edg2s/patch-1
Always close with 'cancel' method
2014-04-26 16:59:26 +05:30
Santhosh Thottingal 04d11ea53f Remove the unused option menu
Fixes issue #140

Change-Id: Idc04a45b97837c5f9bd1f975b6668b6539df0752
2014-04-26 16:57:23 +05:30
Santhosh Thottingal 426ccf0131 Merge pull request #138 from kartikm/qunit-path-fix
Fix the path to qunit.js and qunit.css
2014-04-23 12:25:55 +05:30
Santhosh Thottingal abff2c4555 Merge pull request #139 from Nikerabbit/lud
Add Ludian
2014-04-13 09:28:19 +05:30
Santhosh Thottingal 4ec71d0d44 Merge pull request #137 from Nikerabbit/cssfix
Remove prefixed border-radius rules
2014-03-23 09:58:14 +05:30
Santhosh Thottingal 000727d935 Merge branch 'master' of github.com:jcrowgey/jquery.uls into jcrowgey-master
Change-Id: If567281d5eebbbcd47ecf48788a7385ad8e01463
2014-03-09 09:52:28 +05:30
Santhosh Thottingal 859bccd589 Test: Add lut to the list of languages in AM region
Change-Id: Ic21bf47945e5501880bc221b47d128f6bd0fbbf6
2014-03-03 15:09:45 +05:30
Santhosh Thottingal fd81a809a7 Merge branch 'master' of github.com:wikimedia/jquery.uls
Change-Id: I8270730779a194796ded1c1c82fe48686866c075
2014-03-03 15:07:06 +05:30
Santhosh Thottingal 43abc4ed73 Merge pull request #127 from kartikm/master
Add rwr and ota to the languages supported by ULS
2014-02-05 00:01:24 -08:00
Santhosh Thottingal e912191845 Merge pull request #125 from Nikerabbit/linear-gradient
Drop -moz-linear-gradient for images
2014-01-24 07:40:03 -08:00
Santhosh Thottingal 53b745ae54 Merge pull request #124 from atdt/master
Apply /* @embed */ pragma to all images, not just the topmost in each block
2014-01-20 11:03:45 -08:00