- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.
Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
Using try-catch block to handle common case of empty options isn't nice.
Avoid it be replacing options to valid JSON
Change-Id: I5b64f7f9a76a94d9c07face8059beab59d4aef93
Tests were failing for two reasons: wrong modules as dependencies of the
test module and test timing out due to incorrect usage of QUnit.asyncTest
and QUnit.start() and QUnit.Stop.
While at it, did some small cleanups and converted the number of
assertions to use non-deprecated QUnit.expect() instead.
Options are saved using postWithToken of mw.API. This also rises minimum
MediaWiki version to 1.22. This allowed removing hundred lines of code.
MLEB is already 1.22 and above.
Change-Id: I46a1674e4ede48a0e331c8d201d1d847db51d9dd
Preferences were saved using jStorage. The browsers which ULS supports now
have wide native support for local storage, so we removed jquery.jStorage
in I09b2bd52972.
The old local storage key was 'jStorage' as put by jquery.jStorage. We now
check if that key is present. If so we migrate the preferences and remove
the old key to save space. We are not aware of anything else using this
module.
Change-Id: I995a32c4cb7a3bc818fe255f92dbc972211cb112
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
This reverts commit 6ae0fe3e44.
The commit was duplicating the preferences in 2 places
making the syncing hard.
As per discussion with Pau, we will try alternate approach.
Bug: 48642
Change-Id: I5c97838ed875364dc35b66a3d6c33d9975b5107e
* Just use key,value system and drop the concept of groups
* Abstract the preferences for each type of systems(display, input)
to have meaningful APIs
Change-Id: I25423667adf6ca181a4027cdfc4ed378f36a94ba
* Fixed many white space issues- mainly whitespace missing before
function start paranthesis eg: function()
* Removed the deprecated live methods and replaced with on
* Added file documentation for ext.uls.geoclient
Change-Id: Ib2c8cfed1a6ff3859495e707680d5c19882a33e8
Renamed $.fn.uls.preferences to mw.uls.preferences since this is not a jquery
function, but a singleton object per page.
Change-Id: Ie6c37fb321685e927fa5197fa8a53f41bff656ef