Now that Compact Language Links also started to add to this list, ULS would
show incorrect language change tooltip notifications. ULS interface language
selection will still keep updating the list of previously selected languages.
Refactored the code a bit: 1) created minimal Store that wraps around plain
localStorage, since mediawiki.storage cannot be used yet. 2) Inlined the
userHasChangedLanguage function to new initTooltip function. 3) Split parts
of the huge initInterface to new initTooltip and initIme functions for
increased readability. 4) Solved a TODO for moving language change recording
out of the tooltip showing code.
Change-Id: If8478a59168d89264f4d46938ac865c0c9a04f25
This is already expected by the callers. Added addPreviousLanguage
to make updating the list easier.
Change-Id: Ie4f888235ea4de4a2ce6bf5a9f24955e423e8c48
jquery.uls.compact module is kept for now as some other
extensions depend on it. But it does not do anything
anymore.
There are some styles which should be in jquery.uls
upstream, but given the current state that is easiest
done in a follow-up later.
The main change is that language selection is now
compact by default: no heading etc.
Includes style changes for the dialogs, and especially
for the new position of the callout caret.
Bug: T85519
Change-Id: Iade8005439b4f58ab241752f69a5365d8bb88d2c
We had a browser check to blacklist all browsers older than IE 8
IE <= 7
But that is no longer required since JS support is not there for such
browsers as per https://www.mediawiki.org/wiki/Compatibility#Modern
We can support all modern browsers listed there and we don't need
additional blacklisting now. From 1.27 onwards, there is no JS loaded
for IE 8 too. So we can just use MW browser support policy.
In this commit, the code to do brower checks removed and simplified
the initialization code. Still I am not happy with the interface module,
that need further refactoring.
Change-Id: I655826c55fb2c7c5c88f16368110142d64a96eec
Test plan:
* Remove localstorage and cookies for a site
* Go the the site
* Change language and observe the undo tooltip
Change-Id: Ibecb5ea1cd537b2f019e7a9aa67ffac1a4e0923d
Removed the code to log whether map(removed long time back), search,
common languages used for selecting the language.
This logs were introduced to measure and adapt UI effectiveness.
No longer needed now.
Change-Id: I83bdd250cb6474da4fbf22aed2011071b9f9eba4
- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.
Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
Move the showTipsy calls into the callback.
Move the declaration of the functions hideTipsy and showTipsy before the
new call position.
Also change the order of the declaration of the functions hideTipsy and
showTipsy to avoid a forward reference in showTipsy. Spotted by JSLint.
Bug: T118507
Change-Id: I338a78cde249405459be14948b78cf59d715145a
Per discussion on Gerrit about previous patch-sets in this change, only use
jQuery.tipsy for the undo popover. This means that in the common case (i.e.,
the user has not just changed languages), the ULS tooltip will be system native
tooltip.
Change-Id: I9206a79d59687930c26b7ef86d29bfba050691fe
jquery.uls renamed settings-block class to uls-settings-block.
Similarly icon-close to uls-icon-close
Change-Id: I39005ef2425c01b8623bf9df6d75c1e27f1c5bda
Files:
* Consistently have one (1) new line at EOF
(.gitignore, *.css, *.sh)
JSHint:
* Separate the common (general Wikimedia code conventions) from
the local more stricter rules (nice work!).
Maintenance:
* Use simplified $IP definition where getenv is only called once.
Based on http://git.io/ve-mw-36fc3b59-makeStaticLoader
JavaScript:
* Use the same closure in all files:
- No need for "undefined".
- One linebreak between license header and start of closure
(sometimes there were 1 or 2 empty lines).
- ext.uls.ime.js: No need for "document" (redundant in general,
but especially as it wasn't used anywhere in this file).
- Use "$, mw" for all ext.* modules (one of them used "mw, $").
Change-Id: Iba5dab14bbc3fbfc9f8fe96dd2d95529587a69aa
Load tooltip at 700ms on page load to give enough time for collapsible
navigation to finish altering sidebar layout.
Bug: 51170
Change-Id: I8c7666a51ffe68007c4aadb4e72aa668d0fe6164
Turns out the messages for language selector were not loading
in Special:MainPage. This fixes that as well as cleaning up the
dependencies.
Change-Id: Ice8dcf1b2e878a0fe3cd0e002a9b1cff2f1901dd
Use RL for trigger tooltip messages to avoid using jquery.i18n just
to display the triggers. Reordered dependencies so that messages
are loaded for the setting panels and ime menu.
Change-Id: Ic9518f7b63699542deb02a413e03c28344c99fa4
Was happening mostly on Firefox when ULS was in personal
position and you were logged out and allowed to change language.
Loading grid here already prevents graphical glitch and delaying
the click seems to prevent scrolling to wrong position.
Bug: 56937
Change-Id: Ie9acaa5a46fd903221d30c94dbc26a83355cdb64
In the "interlanguage" position ULS is shown after 2 clicks,
so don't load it initially.
In the "personal" position ULS is shown immediately after
the language icon click, so load it, but conditionally.
The new RL module ext.uls.mediawiki is added for setting
jquery.uls defaults in a way that will lazy-load the language names.
Change-Id: Ic33ef034c794a523b5403867196c6098a58eb5b1
* Do not load anything unless input field is focused
* Split the setup function to smaller functions
* Introduce $wgULSImeSelectors to allow configuration and avoid
duplication of selectors in two places.
Change-Id: If5a476e66681dde9f0b72f619d35ddf6255246ac
In I59dfcfb25c, for logging events when page is navigating away, we
used callbacks with mw.hook. That is wrong approach. If event logging
is disabled those callbacks will never called: it broke language change
and all use cases which navigates away from current page.
Event logging should not interfere with any ULS functionality. If ULS
functionality depends on callbacks from event logging, it is wrong.
In this patch, we give a small time window to make sure event logging is
fired, but we won't wait for its success or failure.
If eventlogging is disabled, this time window does not exist.
Change-Id: I0b7d9d8b9d1d01b99422010596ebfa80b2589d04
Separating event logging out of ULS functionality. Event logging
is now loosely coupled with ULS. ULS core modules can emit an event
whenever EventLogging is required. The eventlogger module will act
on the event if configured.
Change-Id: I59dfcfb25c1acb85376b56239f2355ee7c4aff1e
1. For interlanguage position, initialize language settings on first
click on cog
2. For personal toolbar position, initialie ULS on first click of
ULS trigger
Change-Id: Icda498f676d1d3ddaefad75fd9212150f6966666
For personal toolbar position, initialize langauge settings only
after user clicks on the settings links
Bug: 48211
Change-Id: Ib3e2372e982de890db614a81c06fbbe170ce0d01