Commit Graph

595 Commits

Author SHA1 Message Date
Nikerabbit
b490829957 Merge "Compact links: Simply use the widget pattern instead of plugin" 2016-05-03 08:32:14 +00:00
Santhosh Thottingal
4150d24e67 Compact links: Simply use the widget pattern instead of plugin
We don't need plugin pattern here since it is not meant for a use
in multiple contexts. Code simplified.

Change-Id: Iee86069aaa82f5a9ab3a856c19360e9ea89211ad
2016-05-03 08:53:58 +05:30
jenkins-bot
897d4f7f72 Merge "Refactor font repo compiler so it can be reused" 2016-05-02 04:37:53 +00:00
Niklas Laxström
d2bb6e9010 Ensure ext.uls.mediawiki is loaded before use
Earlier patch loaded it too late, but it was loaded
anyway by something else.

Change-Id: Ib4cf6cd7339a5313961c84cd7904fc2ffc66a157
2016-04-22 10:56:48 +00:00
Niklas Laxström
c99a30bf80 Simplify code by using Object.keys
Guaranteed by es5-shim.

Change-Id: Ifd698dc03fd8e755e95ec6c4856ec3683cc3305d
2016-04-22 12:49:15 +02:00
Niklas Laxström
85f7ebdd4b Delay compact language links language selector creation until click
No point constructing the selector when it is used.

Task: T122341
Change-Id: I928f9041a95e2c48625dba6e11550ac6bbdcb7fd
2016-04-22 10:19:21 +00:00
Niklas Laxström
d2ef6405cb Use mw.msg rather than jquery.i18n
No need to use jquery.i18n here, and avoids going through html

Task: T122341
Change-Id: Ib04011b8c672cd50c02a73791257650fa3dfc1dd
2016-04-22 09:51:24 +00:00
Santhosh Thottingal
aca1545513 Compact links: The trigger kept pressed while the panel is open
Bug: T70078
Change-Id: Iaac9d7f2a5ec5da049b2b4c8e88a9f0bc2a91bda
2016-04-22 07:11:33 +02:00
Niklas Laxström
651f8bc1c3 Refactor font repo compiler so it can be reused
Includes changes to the generated repository file
because the script had not been run for last update.

Change-Id: I6b5d1ce980c6e5b42e36c0044729536b6b0ae4dc
2016-04-14 10:12:20 +02:00
Ed Sanders
3cfb0d67e5 Update linting tools, config, and fix subsequent failures
Change-Id: I41e080915441367b3a2ab2de7d7a096872a2f2e8
2016-04-13 17:13:06 +01:00
jenkins-bot
4c5263e3f0 Merge "Fix language undo tooltip not showing" 2016-04-12 11:28:26 +00:00
Santhosh Thottingal
7d90ecef1d Use localstorage instead of cookie for previous language autonym
Change-Id: I1025a8bbb9fad0cfd326547a09c982925a55e55d
2016-04-12 09:40:50 +02:00
Santhosh Thottingal
a29db92746 Remove the years old cookie to localstorage migration code
Change-Id: Icf82e040b7e3f015cb4cbb9b9c7ed4dee240f017
2016-04-12 06:59:12 +00:00
Santhosh Thottingal
64eab95b94 Remove browser checks and use MediaWiki browser policy
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
2016-04-12 12:12:35 +05:30
Niklas Laxström
c0fe2d1a54 Fix language undo tooltip not showing
Test plan:
* Remove localstorage and cookies for a site
* Go the the site
* Change language and observe the undo tooltip

Change-Id: Ibecb5ea1cd537b2f019e7a9aa67ffac1a4e0923d
2016-04-12 08:22:27 +02:00
Santhosh Thottingal
3e58259ca7 Clean up ULS localstorage preference saving system
These changes affect anonymous users:
* Old code to restore preferences from jStorage removed
* No cookie used anymore

Bug: T100639
Change-Id: I3cfec447703d9c67cd2310ec4acc5692ad76be8e
2016-04-11 14:45:39 +02:00
Santhosh Thottingal
a3c63f1efc Update ULS settings UI style to mediawiki.ui style
The ext.uls.buttons style can be removed but Translate extension use that.
Once it is separated we can remove it from ULS.

Testplan:
Use ULS settings and notice the style difference of buttons, checkboxes
and radio buttons. No functionality should be affected and UI should not
be broken in any ways.

This was once attempted in Id186ece6513f154e0388bc4170c21bdabb59038a
but we had to revert because of incompleteness

Bug: T52599
Bug: T127020
Change-Id: Ibbb2068b5036537f298fad6c49169a5b986304d5
2016-04-07 12:06:29 +00:00
jenkins-bot
ce6f8734a9 Merge "Correct the position the arrow of selector and add shadow" 2016-04-06 12:16:28 +00:00
Federico Leva
6ffd42c07a Resolve language code redirects before using them in ULS
Interlanguage lists can contain language codes that are redirects
in language data of ULS.
For example, sr is a redirect to sr-cyrl.

So, if sr is passes as one of the language to ULS, its region, script
grouping is failing and the end result will be missing them in the ULS
language list. This should be properly fixed in jquery.uls library.
Tracked at https://github.com/wikimedia/jquery.uls/issues/207

In this patch we are following a simple approach of passing the language
codes to ULS as redirect resolved.

Bug: T100002
Bug: T131005
Bug: T126909
Bug: T123834
Change-Id: I8b89edb60b4d2c6f2b25c8589569f748c5523722
2016-04-06 10:42:43 +02:00
Santhosh Thottingal
d5f6930cb4 Correct the position the arrow of selector and add shadow
The pointer arrow of the ULS was not aligned with the 'x more' trigger
and it missed shadow. This commit fixes it.

Notably, we replace the old arrow with a box rotated 45 degree so that
we can apply the shadow very easily.

Bug: T130633
Change-Id: I4d36f3ee9fcfea932e10208518a03e7b246a7abe
2016-04-06 09:43:39 +02:00
Santhosh Thottingal
d728d8c8a7 Remove logging the language selection method
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
2016-04-06 09:59:12 +05:30
Niklas Laxström
9ea6f8d6ba Add a warning about T130390
Change-Id: I872d1dc0ec8d0827c3f56aeb1474f4596e08532d
2016-03-24 11:14:17 +01:00
Siebrand Mazeland
6a2b2e0bba Update test files
- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.

Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
2016-02-18 18:51:37 +00:00
Fomafix
cd58ac2f18 Use mw.Api.plugin.options to set user options
This requires MediaWiki version 1.25+.

Change-Id: I3a76b0b4ec403b3acdc29e64b0c750a3b57e252a
2016-02-15 14:13:13 +00:00
Fomafix
c329f1473d Use spaces inside of brackets in JavaScript
* For consistency
* For MediaWiki coding conventions

Change-Id: I625a8ce0119b1490073f048e1b8ad4e90762d6e2
2016-02-15 13:31:45 +00:00
Fomafix
63bc85649a Ensure module 'jquery.tipsy' is loaded before using
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
2016-02-15 13:03:52 +00:00
Fomafix
bd44ae4888 Use .prop() instead of .attr()/.removeAttr() to set boolean attributes
Change-Id: I4988316b202c19f851f2c05e3d07acc8c5ea38cf
2016-02-08 18:38:15 +00:00
Justin Du
0dea64ea86 Remove getCustomPrinter from ULS extension
Bug: T91457
Change-Id: I0cff2c687a40a4af3b0202255f59f4f37ea41788
2016-01-22 11:27:53 -06:00
Timo Tijhof
862fafb9ab Various performance fixes for CompactInterlanguageList
T122341:
* Move hideOriginal() call to right before render() to reduce repaint flash.
* Use plain css() instead of show() and hide().
* Use native getAttribute() instead of jQuery().attr.

Other minor clean up:
* Fix jsduck syntax.
* Consistently use 'location' instead of 'window.location'
  (mostly the case already except for one).

Bug: T122341
Change-Id: Ief76fe7c0fb2bfca3468361ebab14c1dfb1df4c2
2016-01-04 07:19:38 -08:00
Reedy
7c5336df8a Update OpenDyslexic from 2.1.0+git060dc841 to 2.1.0+git03aa683
Change-Id: Ide39c565d03fac70805ada3399c6010e17540fe4
2015-12-05 20:24:34 +05:30
Reedy
d533dc0c13 Fix syntax error in Akkadian font.ini.
~ in a string must be quoted in an ini file

Change-Id: I92548cf5bc35259f6bcb37456967f480eac76bc8
2015-12-05 01:28:51 +00:00
Ori Livneh
02fe8719dc Only use jQuery.tipsy for undo popover
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
2015-11-11 13:46:35 -08:00
Fomafix
0d5c69f655 Do not use setlang to change user language
Requests using GET should only retrieve data and should have no other effect.
(https://en.wikipedia.org/wiki/HTTP_GET_request)

* Use API with POST to change the user interface language in user settings.
* When allowed by wgULSAnonCanChangeLanguage set cookie for anonymous user
  or when API fails.

This change uses mediawiki.cookie which requires MediaWiki 1.24+.

Bug: T46649
Change-Id: Iaf6fafbf200933dfc760be69d2adf5e5efcf8245
2015-09-08 20:21:05 +00:00
Ori Livneh
4088b14304 Fix-up for Ib98499040
Specify { path: '/' } so the cookie is actually removed.

Change-Id: Ia2902a2a4f01b8b5be635afd9d58cc5589623210
2015-09-02 12:36:31 -07:00
Ori Livneh
069fd2c454 Use localStorage to store previous languages, not cookies
Automatically migrates data from uls-previous-language cookie to localStorage.
See associated bug for rationale.

Bug: T110353
Change-Id: Ib98499040b9edf4a1f1d9e3afd7661fc2d1f7fea
2015-09-01 10:38:53 -07:00
eranroz
301520f3fd Avoid (safe) exception by using empty options
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
2015-07-16 13:16:45 +03:00
Kartik Mistry
c3f3f496f6 Add Gothic font
Bug: T52901
Change-Id: I85d35d813b0d0515ff86d05cad93fb42558ac195
2015-07-10 23:44:07 +05:30
Kartik Mistry
2eba0d09d7 Update ext.uls.webfonts.repository.js
This was probably wasn't done in commit be3f8f14

Change-Id: I37ccb8ccd1a1b4ea9f523d9f5ad93ea26a709636
2015-06-15 15:41:00 +05:30
Santhosh Thottingal
91eff55c8c Revert "Update inputs to use mw-ui styles"
This reverts commit 30d26a4fd2.

Some issues in this patch were identified, see T52599.

Reverting so that MLEB can be released and issues fixed and
tested properly after the release.

Change-Id: I35c1eb2db5ead8ca75dc2724997d789c83c69b6d
2015-03-30 07:20:23 +00:00
Niklas Laxström
d574548d41 Refactor showULSTooltip
Makes the code easier to understand and fixes T52743

Bug: T52743
Change-Id: If508f26b5133284f3059b50d420066a8b4fefb07
2015-03-27 15:02:09 +00:00
jenkins-bot
db44516b27 Merge "When changing language first time, language code was shown" 2015-03-27 08:37:45 +00:00
Niklas Laxström
9bc291522b When changing language first time, language code was shown
Now it shows the language autonym as expected

Change-Id: I1f2c3bca2b5582b917d65533b08545d1332782ab
2015-03-27 14:03:52 +05:30
jenkins-bot
411bb1e0aa Merge "Clunky workaround for putting link into escaped message" 2015-03-27 08:23:58 +00:00
Niklas Laxström
231ab2dca0 Clunky workaround for putting link into escaped message
Not escaping the message trips up my unescaped message checker

Change-Id: I7e4de4c5b9008988f9d3eedd83c825b3a050849b
2015-03-26 13:26:41 +01:00
Santhosh Thottingal
faa1d2412c Fix javascript error in inputsettings module
Change-Id: I77262c98a4a2efb91785b19bc1c306e3f2f16954
Followup: Id186ece6513f154
2015-03-23 17:11:17 +05:30
Evan McIntire
30d26a4fd2 Update inputs to use mw-ui styles
Replaces many of the styles with the new standard ones in mw-ui, which is
present in v1.22 of Mediawiki, the current lowest supported version of
ULS.

Might require a follow-up to reduce the amount of redundant CSS present

Bug: T52599
Change-Id: Id186ece6513f154e0388bc4170c21bdabb59038a
2015-03-19 08:51:31 +00:00
Ori Livneh
57b617f775 Don't force #p-lang to show using jQuery.fn.show
It's a performance anti-pattern; see
<https://github.com/jquery/jquery.com/issues/88#issuecomment-72400007>

Change-Id: If6e521c27975f7d64932268fde5778aa63fd08ee
2015-03-07 18:31:04 -08:00
Fomafix
69475f0308 Prevent predefined object methods to be interpreted as valid language
Change-Id: I97bb0f8eef6a9361118527cecb4680aeac51b7e1
2015-02-14 12:08:07 +00:00
Fomafix
0833c990e7 Apply coding conventions for JavaScript
Change-Id: Id158ac08d32cc7421e47ae6abdd2bd80879f04d9
2015-02-07 19:34:21 +00:00
Divya
ee94df2890 Margin below disable input tools button
Fixed bottom rule to extend within dialog

Bug: T1169
Change-Id: If15c52e2c06c2c267f6599bd40e147e095896e80
2015-01-08 12:24:00 -05:00