Commit Graph

28 Commits

Author SHA1 Message Date
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
d8fc3d4b9e Remove double scrollTop call 2014-01-06 13:30:53 +02:00
Amir E. Aharoni
2d93a37019 When clicking a region, scroll only the list and not the whole page
Downstream bug:
https://bugzilla.wikimedia.org/show_bug.cgi?id=59175
2014-01-06 11:45:29 +02:00
Santhosh Thottingal
1b5520432f Merge branch 'bug-39925' of github.com:MatmaRex/jquery.uls into MatmaRex-bug-39925 2013-10-11 20:45:36 +05:30
Siebrand Mazeland
658914a984 Update code formatting 2013-10-08 23:59:40 +02:00
MatmaRex
5c6c24d314 RegionSelector: Scroll to appropriate area instead of rebuilding the list
This has been suggested on bug 39925.
2013-07-09 17:07:02 +02:00
MatmaRex
c78371ff68 Use .detach() to keep jQuery events and data associated with elements
.remove() helpfully kills them all.
2013-06-27 16:35:02 +05:30
MatmaRex
148d43bf44 Restore the events jQuery helpfully removes 2013-06-27 16:34:49 +05:30
MatmaRex
8a1e3eb18e Remove lazyload functionality entirely
It was merely a stopgap solution to the problem of the dialog taking
forever to load. With that problem solved all of this awful code is no
longer needed.
2013-06-27 16:31:50 +05:30
MatmaRex
e1d65006dd RegionSelector: Avoid reflows when generating the list
Every time an item is added to the list - 387 times for me - we
shuffle elements around and add at least one new one. This causes
browsers to trigger style recalculation (to figure out which styles
apply to elements with such and such classes) and content reflows
(how the text and elements are wrapped to fit available width).

We can avoid this by simply detaching the parent element from the DOM
tree and attaching it back once we're done - this make it only trigger
one recalculation and one reflow.

In my profiling on Opera on a Thinkpad T60 (with lazy-loading
disabled), these two steps took respectively around 600ms and 400ms.
Now they're down to around 50ms each.
2013-06-27 16:28:04 +05:30
Amir E. Aharoni
62cab27eb2 Leave only one var statement per scope 2013-04-22 14:40:12 +03:00
Siebrand Mazeland
356a074fd6 Make code analyzer ignore the unused assignment
It is used, as the comment above explains.
2013-03-15 03:26:07 +01:00
Amir E. Aharoni
66a50931a5 Prevent appearance of redirects in the rendered list
utils.getLanguagesByScriptGroup() runs on the object's languages
property and not on all the langdb languages. This caused
the redirects to be counted as languages. I fixed this,
and added a test to prevent it.

Also update JS langdb, because it went out of sync in of
the previous commits.
2013-01-09 12:59:58 +02:00
Amir E. Aharoni
13473c9f7a Render every region only once
Fixes bug
https://bugzilla.wikimedia.org/show_bug.cgi?id=43568
2013-01-04 08:31:20 +02:00
Amir E. Aharoni
1f91a4c40c Whitespace 2013-01-02 18:28:14 +02:00
Santhosh Thottingal
8c54381e58 Change double quotes to single quotes
Change-Id: I4684a4bc4ac26fffba7310891106d254e893dd63
2012-12-24 16:29:14 +05:30
Amir E. Aharoni
7a04c3c6e0 Rename "that = this" to meaningful names 2012-11-29 10:40:24 +02:00
Santhosh Thottingal
dfe6fcbb13 Merge pull request #8 from amire80/2012/bug_39932/no_cyclical_region_click
Do nothing if the clicked region is already selected
2012-10-08 02:35:30 -07:00
Amir E. Aharoni
c40caf4a29 Update the remaining calls to deprecated functions 2012-10-08 08:27:50 +02:00
Amir E. Aharoni
faeac72491 .languagesByScript* -> .getLanguagesByScript* 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
7d48ec230b .regions -> .getRegions 2012-10-08 08:13:34 +02:00
Amir E. Aharoni
97194de047 Do nothing if the clicked region is already selected
Supposed to fix bug
https://bugzilla.wikimedia.org/show_bug.cgi?id=39932
2012-10-05 08:38:43 +02:00
Santhosh Thottingal
9d988dbafe Scroll improvements
* Load the next region when scroll reached half of the current
  region
* Fix the scroll sync with region highlight in both up and down
  scrolls
* Address Bug 39923 - Make scroll to next region more fluent
2012-09-23 21:35:37 -07:00
Santhosh Thottingal
c83baac893 Fix Bug 39930 - Common languages not always shown in the Worldwide region
Change-Id: I764af7ad88cf79e9e07b96f899f352ad3082df45
2012-09-06 14:15:05 +05:30
Santhosh Thottingal
298c91a68f Misc jshint fixes
* 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
2012-09-04 16:02:28 +05:30
Santhosh Thottingal
035cfb08c4 Lazy loading of regions
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
2012-08-30 14:26:57 +03:00
Santhosh Thottingal
c88b782371 Cache the region filter results
Change-Id: Ia303774d3c1171f3e8c1b3f7ca8b102c79e68300
2012-08-21 17:06:41 +05:30
Santhosh Thottingal
d72e97a065 Move regionfilter to a seperate javascript file
To lib/jquery.uls/src/jquery.uls.regionfilter.js

Change-Id: I5f4e424ff68d7a7ed6407f48ddf84cdadfe90a52
2012-08-21 16:20:03 +05:30