This provides an alternative mechanism to
I0518ecdf402ebf5eb6bad2c430f6462322c0d8e1 for loading the compact
language link module. Instead of relying on the client, the HTML
is inspected.
Bug: T264824
Change-Id: I977a998388b3e70f7fe4d97fa05be3c1ac1bf676
Example usage:
Iabd4688c6081b4de391b9655b92a16f3a414e018
We will skip loading the compact link if we don't need
to compact the languages.
Note special handling is known for Timeless which stops
propagation of events. This will be fixed in Timeless at a
later date.
Bug: T264824
Change-Id: I0518ecdf402ebf5eb6bad2c430f6462322c0d8e1
This should avoid problems with elements that are not real
interlanguage links, which may be added by other code,
for example user scripts.
Bug: T267887
Change-Id: I3f9c618b417363f667a31e9dad335c1aec15b055
Return an empty array if there are no languages in territory.
Addresses T265158.
Updating to
9a1f5c0e5a
Bug: T265158
Change-Id: I36f69a2007791a4469eff6415eedbaecc3f60f70
Return an empty array if there are no previous IMEs
in preferences.
Addresses bug T262865.
Updating to
77bd142ad4
Bug: T262865
Change-Id: Ifce6707914be0033239bc88ce0dc869ba8626e2c
https://github.com/wikimedia/jquery.uls/commit/967eec093edb153f4fdd0e5e4
Updates:
1) Always send event when triggering onSelect
The $.uls function in jquery.uls.core in createLanguageFilter passes the
onSelect function to the $.fn.languagefilter so the onSelect there should be
made compatible.
2) Removal of png images no longer needed for old browsers.
Bug: T261973
Change-Id: Ie316cc627178dde15d22607b2099d0da96dd6fda
This refactor will allow us to separate these two functions so that
the modernized version of Vector can avoid loading the compact
language list.
Changes:
* `options` is now optional to the CompactInterlanguageList constructor
The max value is already defined in
CompactInterlanguageList.prototype.init
* this.interlanguageList is now initialized inside the constructor
Previously calling CompactInterlanguageList.prototype.createSelector
or getCompactList before calling init would throw an exception.
This will be important in I0518ecdf402ebf5eb6bad2c430f6462322c0d8e1 when
the responsibilities of wiring up the button and compacting the languages
is separated.
Bug: T264824
Change-Id: I9606df30a050d0cdaf7add2deff849cd5b895bab
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected
Change-Id: Ie51d2cbd02d94196ef523b55b7beb84ff893d331
Active state is already covered with `mw-ui-button`. Color needs to
become darker for better contrast ratio when button is toggled.
Change-Id: If888a862c0b642aaa200e8207f3804f76f05b8b0
Also amending `color` & `padding` to be closer to button standard appearance and
increase `margin-bottom` to make “Edit links” link not stick to button.
Bug: T170137
Change-Id: Iabb6abfdb8fa69c9f2634b190cb5fa6c005eb17c
This module is just an alias at this point. It's only consumer
is taken care of in the depends on.
Depends-On: I7c362ad391b076d3c4214c7b01fca7bbaaa320b9
Change-Id: I842c1ba10b24967a3888107806788f7e7844339b
Introduced in I740600d18859422b2f98a5ef92d0321f6e9615a2.
We need to prevent the default action (navigating a link) so that
our custom code has a chance to run. Before it was synchronous so
it called location.href before default action had a chance to execute.
When it was made asynchronous, the default action got executed before
our custom code.
Change-Id: I292f99aa5f5ff536d8197174c317018462685866
Introduced in I740600d18859422b2f98a5ef92d0321f6e9615a2.
When onSelect was called for the new language, it set dirty to true.
Then the, now delayed, render function reset the dirty status to false.
There is no need to set dirty to false on render, so moved it to the
constructor.
Change-Id: Ibfa23f545c9d358e7e03fb299c238182ea449d7c