The main goal here is to reduce complexity. For example, the method to
remove a parameter from the current URL is never used with another
parameter. The complexity is not needed.
This is inspired by the changes I have seen in Icaf086f.
Change-Id: If22c25e84f50ac380320cd581690835ddb70f01d
Add two new options for ext.uls.dialog - afterOpen and afterClose.
These are callback function which will be triggered after the dialog
opens or closes.
Using the afterClose callback in ext.uls.setlang to remove the
setlang parameter from the URL if the dialog is closed without
pressing any button. This might happen if the user closes the dialog
by pressing Esc, or by clicking on the overlay.
Also see: Ie3215d12d9c77f15597495e21610707b272eeee9
In addition, renamed all occurrence of setlang to setLang.
Bug: T63115
Change-Id: Icaf086f947b1d91bf7ad5b36f126da0be1fc7747
Support has been added for:
* Esc: Closes the dialog
* Tab: Ensures that tabbing keeps focus on the focusable elements
in the dialog. If no overlay is not present, the focus is
allowed to flow normally.
This should not happen but if NO focusable elements are found and
overlay is displayed, focus is locked on the overlay.
Also add description and other license information for uls.dialog
& uls.setlang files.
Bug: T63115
Change-Id: Ie3215d12d9c77f15597495e21610707b272eeee9
This change allows to use the ULS language changer without getting a
dialog for restoring the old language.
This change requires that the module is also loaded in this case.
Change-Id: Ie5169e986d0362034ede122b0bc29ce7a4aa481e
This removes the URL with the URL parameter setlang from the history.
A click on history back doesn't show the URL parameter setlang anymore.
Change-Id: I0ea8c4508bedd9758a1cebbe8ecb2a7113bf8538
setlang will now display a dialog to confirm with the user that
they would like to change their interface language. The preferred
language will only be updated if the user confirms.
The dialog will be displayed if the setlang parameter is present in
the query string and,
* A user is logged in, and their preferred language is not the same
as the one passed via setlang.
* For an anonymous user if the wgULSAnonCanChangeLanguage is true,
and the current interface language is not the same as the one
passed via setlang.
Bug: T63115
Change-Id: I882297d99a594fd82fd0aec3b4664e8bfd1eac3a