Commit graph

3225 commits

Author SHA1 Message Date
Timo Tijhof
054b1c9e3c Wrap lines in <pre> and .mw-code by default
No longer create inline scrollbars and/or page-level scrollbarts
with the content escaping the skin container.

This used to be an option in SyntaxHighlighter Geshi (using enclose="div")
but it makes more sense to do by default.

Also move the 'direction' and 'unicode-bidi' rules that currently
live in SyntaxHighlighter extension. Make them the default instead.

Pre-wrap is supported by IE 8+, Firefox 3.5+, Chrome 1+, Opera 8+,
and Safari 3+.

Bug: T103780
Change-Id: Icd8b9bd56d6abc7b64c93e89541cf32c55cf7686
2015-06-25 05:51:33 +01:00
Ed Sanders
26edd30cc6 [BREAKING CHANGE] Merge in VE's link input functionality to title widget
Major changes:
* Supports page images and descriptions
* Uses prefix search

Change-Id: Ib463e60cad9651eb338701279f370711ade6030b
2015-06-24 16:22:32 -07:00
James D. Forrester
5ec77cb29b Update OOjs UI to v0.11.6
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.6/History.md

Change-Id: Iec7f1cf857f2ca76a5287306780f1e7e47b49987
2015-06-23 15:04:51 -07:00
jenkins-bot
87e78ac110 Merge "Set Southern Kurdish to use Kurdish ordered list style type" 2015-06-23 11:35:48 +00:00
Timo Tijhof
0b89dadc58 Hygiene: Use [i] instead of charAt(i) for string index access
Was mostly this way for IE6 compatibility which is no longer
relevant for our JavaScript runtime.

Change-Id: I7c441c7b40f40bb2974c4da5ea9f7a87119e7462
2015-06-23 00:34:24 +01:00
Ori Livneh
2f89482acb Fix undeclared dependency on jquery.mwExtension
Since jquery.mwExtension is deprecated, fix the undeclared dependency by making
the module not depend on $.ucFirst rather than by declaring the dependency.

Change-Id: I32b57662464e7dde0f61d6875196764fb61dcfba
2015-06-22 15:12:35 -07:00
jenkins-bot
1f54fccca8 Merge "Deprecate jquery.mwExtension" 2015-06-22 13:58:39 +00:00
mjbmr
f14356df5f Set Southern Kurdish to use Kurdish ordered list style type
* http://unicode.org/cldr/trac/ticket/8445

Follow-up to I9310a3b4a50c0b8ea6551d9f45e7a2e276a8a389

Change-Id: I6093494c4813b872323bb750cadfc024d6b5ed32
2015-06-22 12:31:13 +00:00
Timo Tijhof
4559185ae8 Remove use of $.escapeRE in favour of mw.RegExp.escape
Removes dependency on the generic jquery.mwExtension module I
wrote in 2011 which has rotten and contains largely unused utilities.

Change-Id: Id7025dc2be958840735f4a9a5b020bd876011740
2015-06-20 07:17:23 +01:00
Ori Livneh
b0ee0c01c2 Deprecate jquery.mwExtension
* Deprecating per Krinkle's comment on PS2 of Ie5f0e7d1c.
* No usage in NS_MEDIAWIKI on Wikimedia wikis after these two edits:
  - https://www.mediawiki.org/w/index.php?diff=prev&oldid=923287
  - https://www.mediawiki.org/w/index.php?diff=prev&oldid=923290

Change-Id: Ifb57ae9643bfc652c385b271a73f51577186f2d2
2015-06-20 07:10:05 +01:00
Timo Tijhof
8bee338d1c Introduce mediawiki.RegExp module
Simple module based on the $.escapeRE method of the old
"jquery.mwExtension" module.

Change-Id: I9e108a3f8c24d87bb239b63a14807a691c25aa3e
2015-06-20 07:10:00 +01:00
paladox
dca469bb87 Fix phpcs warnings
Bug: T102614
Change-Id: Iecea365f83bbb0c336b58f1cfdebfc9b1112087e
2015-06-18 20:13:37 +00:00
jenkins-bot
0538ebfd24 Merge "Fixed spacing" 2015-06-17 21:40:11 +00:00
umherirrender
d8821f2b0b Fixed spacing
- Removed space after casts
- Removed spaces in array index
- Added spaces around string concat
- Added space after words: switch, foreach
- else if -> elseif
- Removed parentheses around require_once, because it is not a function
- Added newline at end of file
- Removed double spaces
- Added spaces around operations
- Removed repeated newlines

Bug: T102609
Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
2015-06-17 20:22:32 +00:00
Ori.livneh
66d5689583 Revert "StashEdit: Use postWithToken"
This reverts commit 155ad712c3.

Bug: T102863
Change-Id: Ia30b535a44a3aa4d6e79f14bbccb6f4a1b065aa2
2015-06-17 19:54:24 +00:00
James D. Forrester
eec796cb76 Update OOjs UI to v0.11.5
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.5/History.md

Change-Id: I98bcf928a922e03f7024edaacc9beac95f2b74cf
2015-06-16 18:12:12 -07:00
Timo Tijhof
bd745a7869 Move dependency on user.tokens from mediawiki.api.edit to mediawiki.api
The postWithToken() method used to be specific to the edit module.
However that logic was moved and refactored into getToken() and
postWithToken() a while back.

While waiting for user.tokens instead of making api requests for tokens
is worth it. The logic in mediawiki.api.js inspects mw.user.tokens
only at initial run time. So it must be on 'mediawiki.api'.

Anyhow, in practice it doesn't matter since the user.tokens is
embedded in the page. So there's no actual waiting of any kind.

Change-Id: I10fae93c8f1500b4aa752101256fbba94c2ae40d
2015-06-16 20:14:35 +01:00
jenkins-bot
6087e38722 Merge "Disable Preferences save button before setting change" 2015-06-14 20:51:15 +00:00
Timo Tijhof
7ee9830408 Update jQuery Client to v2.0.0
Project

* https://github.com/wikimedia/jquery-client

Release

* https://github.com/wikimedia/jquery-client/releases/tag/v2.0.0
* https://github.com/wikimedia/jquery-client/blob/v2.0.0/jquery.client.js

Breaking changes:

* Microsoft's new Edge browser is now identified as "edge" instead of "msie".

Change-Id: Id3df3e637cd9751a293ca655c51d39492d04d7f6
2015-06-14 03:19:29 +01:00
jenkins-bot
00050cbb4d Merge "Tablesorter: Replace wgContentLanguage by wgPageContentLanguage" 2015-06-13 17:14:31 +00:00
Fomafix
2602864712 Tablesorter: Replace wgContentLanguage by wgPageContentLanguage
wgContentLanguage contains the language code of whole project.
wgPageContentLanguage contains the language code of the content of the page.

For example https://translatewiki.net/wiki/Project:About/de?uselang=eo has
* wgContentLanguage en
* wgPageContentLanguage de
* wgUserLanguage eo

The tablesorter works on the content of the page.

Change-Id: I3e51d96c838a3a4f4562c1f27c360d515e4d8ca6
2015-06-13 19:00:48 +02:00
jenkins-bot
c811e2c8c9 Merge "StashEdit: Use postWithToken" 2015-06-12 23:50:57 +00:00
Bartosz Dziewoński
2c657ab839 mediawiki.widgets: Add missing dependency on mediawiki.Title, mediawiki.api
Used by mw.widgets.TitleInputWidget.

Change-Id: Ic47fb914c62c227f37c7eadb7bb6fbb846ebf3ad
2015-06-12 20:27:51 +02:00
Geoffrey Mon
b5d46d22b5 Disable Preferences save button before setting change
Disable the Special:Preferences 'Save' button if no
settings have been changed (uses keydown and mousedown
events as an alternative to change event, so is not perfect)
This prevents unnecessary saving when you can't remember
if you saved the settings or not.

Bug: T89457
Change-Id: I7c2e11302099280c561e435425b23afb9fb760b5
2015-06-12 18:00:00 +00:00
Derk-Jan Hartman
88c16d8092 Live preview: Don't show empty summary preview
Change-Id: I4334d02cb460fd0f995ba16f1170dd8500744692
2015-06-11 01:59:43 +02:00
Derk-Jan Hartman
155ad712c3 StashEdit: Use postWithToken
Because it does caching and retry for token problems by itself.

Change-Id: Ic4e24f6c805de243225a23a3c445f578ed2d14ad
2015-06-10 17:08:14 +02:00
Bartosz Dziewoński
964fc3246a Convert mediawiki.action.edit.collapsibleFooter and mediawiki.special.changeslist.legend to using mw.cookie
Remove redundant parameters, use sane defaults.

This changes the cookie name due to mw.cookie adding the standard
cookie prefix. This will cause existing values to be lost.

Bug: T67384
Change-Id: I00ba66b271cef4635ab4c31226c854583b8ba79e
2015-06-10 13:42:13 +02:00
jenkins-bot
ffd099acda Merge "mediawiki.jqueryMsg: Phase out redundant data module and minor clean up" 2015-06-10 09:35:50 +00:00
jenkins-bot
e069b79458 Merge "Convert mediawiki.toc and mediawiki.user to using mw.cookie" 2015-06-10 09:26:09 +00:00
Yaroslav Melnychuk
837cd3bed5 Convert mediawiki.toc and mediawiki.user to using mw.cookie
* Remove redundant 'path' parameter (handled by mw.cookie)
* Remove redundant 'expires' parameter (handled by mw.cookie)
* Return value for absent cookie is now reliably 'null'.

This changes the cookie name due to mw.cookie adding the standard
cookie prefix. This will cause existing values to be lost. Make
use of this oppertunity to rename some cookie names.

* mw_hidetoc -> {wikiprefix} hidetoc
* mediaWiki.user.sessionId -> {wikiprefix} mwuser-sessionId
* mediaWiki.user.bucket -> {wikiprefix} mwuser-bucket

This is a re-submission of a4d3d3b427, which was reverted due
to T101857. Commit amended to use "sessionId" instead of "session".

Bug: T67384
Change-Id: Ibe88778cf3b6db90b3875c89305ffba53ac84104
2015-06-10 11:11:01 +02:00
James D. Forrester
5cd0a43e55 Update OOjs UI to v0.11.4
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.4/History.md

Change-Id: Id329e753412b33d5b4cf55bfc04ee072843bacc0
2015-06-09 15:20:49 -07:00
Timo Tijhof
2dd9ec21dc mediawiki.jqueryMsg: Phase out redundant data module and minor clean up
Follows-up 4a3e50a54.

* Merge mediawiki.jqueryMsg.data and mediawiki.jqueryMsg modules.

  There's no need for this to be a separate module. The data is not for public consumption,
  it's provided to jqueryMsg only.

* Remove unused default-default values for 'allowedHtmlElements'.

* Remove conditionals around data providing at initial run-time. Instead, expose
  private method can call that. This way, we don't have two code paths claim
  ownership over the namespace. And it makes the module easier to test and re-use
  by not requiring the data to exist at first run time.

* Fix getDefinitionSummary() implementation to append data instead of setting
  arbitary keys in parent data. ResourceLoader documentation of getDefinitionSummary()
  has been updated to reflect this practice.

Change-Id: I40006d39514a997dce4930756a3dac84a0c9bb83
2015-06-09 19:14:20 +01:00
jenkins-bot
77c7330172 Merge "Revert "Implement MalformedTitleException for JS and use in constructor"" 2015-06-09 17:07:27 +00:00
paladox
50c6cd2458 Update sinon from 1.10.3 to 1.15.0
Project
* http://sinonjs.org/
* https://github.com/cjohansen/Sinon.JS

Source code
* http://sinonjs.org/releases/sinon-1.15.0.js

Changelog
* https://github.com/cjohansen/Sinon.JS/blob/v1.15.0/Changelog.txt

Notable changes:
* 1.15.0: Deprecate sinon.mock()
* 1.12.0: Fake timers are now extracted as lolex: http://github.com/sinonjs/lolex

Change-Id: Icca3eb7ef42c0a456fd309eb0ebc09a0518517bd
2015-06-09 00:18:47 +01:00
paladox
90864e542b Update json2 to revision 2015-05-03
Project link

* https://github.com/douglascrockford/JSON-js

File link

* https://github.com/douglascrockford/JSON-js/blob/c98948ae19/json2.js

Change-Id: Ifeb41140c13718162d1c0bd7a5a815acaf7bfd56
2015-06-07 12:39:55 +01:00
Timo Tijhof
c8b80b8518 Update es5-shim to v4.1.5
Project site

* https://github.com/es-shims/es5-shim

File source

* https://github.com/es-shims/es5-shim/tree/v4.1.5

Changelog

* https://github.com/es-shims/es5-shim/blob/v4.1.5/CHANGES

Change-Id: I21ecf04e7ba82d4bd726ce9b5e84eac1046914c0
2015-06-07 12:20:56 +01:00
Ori Livneh
6132865a06 mw.loader.store: decline to store items > 100 kB
If the length of the string representation of a module exceeds 100,000
characters, decline to store it in localStorage, due to bug T66721.
(While it is true that string length !== byte length, the skew introduced by
counting multi-byte characters as single bytes is not important enough to merit
the use of $.byteLength).

Based on my analysis, the modules that would be ineligible for caching in local
storage under the new schema are:

- ext.visualEditor.core (624 kB)
- oojs-ui (179 kB)
- oojs-ui.styles.icons (132 kB)

To fix this bug, it is not enough to not store new items; we must also ensure
that any old values cached prior to the introduction of a limit are purged. So
update mw.loader.store#prune to do that, too.

Bug: T66721
Change-Id: Ie45467fc0b2db7cc283f30626af7d587da24bd90
2015-06-04 17:34:26 -07:00
Sn1per
1a80532083 Revert "Implement MalformedTitleException for JS and use in constructor"
This reverts commit 52bc467b31.

Change-Id: I4ccd057559251317134da36d75fa8532ede4c51b
2015-06-04 21:45:07 +00:00
jenkins-bot
112892455f Merge "Revert "Add 'mediawiki.skinning.logo' module"" 2015-06-04 16:16:59 +00:00
Krinkle
cc64702527 Revert "Add 'mediawiki.skinning.logo' module"
This is redundant and creates more modules than necessary.

The use case of not wanting to load "mediawiki.skinning.interface"
in a custom skin is invalid. For this exact purpose we already created
the ResourceLoaderSkinModule class which is generic and re-usable.

Skins can add that class name to their stylesheet file module to
append the logo styles. This way involves no extra modules. Not in
core, and not in any skin.

This reverts commit 43346e1527.

Change-Id: I2b0a1d5ed72f2d5338ad26af6e04227bec45dcc1
2015-06-04 15:00:02 +00:00
Baha Man
541dbaf567 mediawiki.searchSuggest: Add track event on search form submission
Only fired from the skin-provided search box currently.

Bug: T97310
Change-Id: Iaccacdabca427afe1c1d5c42ae6d18d19a70543b
2015-06-04 11:45:50 +00:00
Bartosz Dziewoński
47b21ba884 Explicitly define module position for mediawiki.htmlform.ooui.styles
It was written before the warnings were added, but merged afterwards,
so this got missed, or something like that.

Change-Id: If2d7d3c41568ae7005dc99101dc6ba8fc038d4a8
2015-06-03 20:26:06 +02:00
jdlrobson
f63e30ae50 mediawiki.template: Mustache should return jQuery object instead of array
This is consistent with Flow and Hogan in Mobile.

Change-Id: If5c9e08ade185ebdb42a292f87d7506a68528c88
2015-06-03 02:09:08 +00:00
jenkins-bot
6ffdc1cdca Merge "OOUI theme support" 2015-06-02 17:28:09 +00:00
jenkins-bot
187369a0cd Merge "mediawiki.ui: checkbox: Render "on top of" the label" 2015-06-02 04:51:44 +00:00
Florian
f73e021e18 Remove legacy vertical-align from select fields
They shouldn't be aligned at the top by default.

Bug: T98493
Change-Id: I17b0825079ff28dfc9ea2c1ec24018073aec3794
2015-06-01 20:01:38 +02:00
jenkins-bot
9e4bb78836 Merge "Add 'mediawiki.skinning.logo' module" 2015-06-01 17:16:54 +00:00
jenkins-bot
b745eaa260 Merge "Tweak 'position' of 'mediawiki.skinning.*' modules" 2015-06-01 11:13:07 +00:00
Bartosz Dziewoński
1fc57830e2 OOUI theme support
* Split off OOjs UI's module definitions to a separate file from
  Resources.php.
* Extend ResourceLoaderImageModule to support per-skin images and
  variants.
* Allow skins to specify their preferred OOjs UI theme using new
  skin registry attribute 'SkinOOUIThemes'. The default remains the
  'mediawiki' theme, 'apex' can also be chosen now.
* Implement custom ResourceLoaderOOUIImageModule which implements some
  special sauce required to shoehorn OOjs UI image set definitions into
  ResourceLoaderImageModule with skin-specific styles support.

Bug: T100895
Change-Id: I3fbacbce95126a4cc29221352f3ef846f41e7b1b
2015-05-31 22:55:13 +00:00
jenkins-bot
8de4d505a4 Merge "Remove mw-ui-icon*:after" 2015-05-31 21:48:31 +00:00