Benefits:
* Full per-language icons support. Icons that differ for each language
(such as the 'Bold' icon) will now always display correctly
according to user interface language, even on old browsers.
* MediaWiki UI icons support. When the 'mediawiki.ui.icon' module is
loaded, you can use syntaxes such as below to display any OOUI icons
(from the packs that were loaded) without involving OOUI itself.
<div class="mw-ui-icon mw-ui-icon-before mw-ui-icon-check">OK</div>
<div class="mw-ui-icon mw-ui-icon-after mw-ui-icon-check">OK</div>
<div class="mw-ui-icon mw-ui-icon-element mw-ui-icon-check">OK</div>
Summary of changes:
* Resources.php:
* Remove icons CSS files. Include image data JSON files instead.
* Split the images from 'oojs-ui.styles' module to separate ones.
* OutputPage: Update enableOOUI() method for newly split modules.
* ResourceLoaderImageModule: Make it possible to load image data from
a JSON file.
* update-oojs-ui.sh: Copy source files rather than distribution for
icon packs.
This is not an improvement when it comes to code quality, though :(
Issues include some nasty code duplication, using "source code" (image
definitions) from OOUI rather than just distribution files, and hacky
methods to load image data from JSON files live.
Bug: T92551
Change-Id: Id369ecaec7048dcf68ba1e4df748362760533782
mediawiki.jqueryMsg.js:1144 was blowing up on Node.TEXT_NODE
because window.Node is undefined in IE8. The exception was ignored
and this was causing a message containing {{PLURAL...}} or
{{GENDER...}} to be rendered as is.
Bug: T87118
Change-Id: I8c5c2ae74b68eeabd93bb5b81a3061bcb31f6549
There is a new special page, Special:EditTags, which is very similar to
Special:RevisionDelete in a lot of ways. In fact, the SpecialEditTags class
started off as a copy-paste of SpecialRevisiondelete.
You invoke this special page by going to an article history page, checking
some revisions, and clicking "Edit tags of selected revisions". Then you
pick the modifications you want to make and click "Apply". Very much like
the revision deletion workflow.
I had to restructure some of the Action routing code, which was only
designed to handle revision deletion. Also removing some code from
SpecialRevisiondelete which didn't work as advertised in the first place,
and definitely doesn't work now.
Change-Id: I7d3ef927b5686f6211bc5817776286ead19d916b
The core implementation will only support wikitext.
Flow will add its own implementation, and it can be used for any talk
page system identifiable by content model.
Bug: T91805
Change-Id: Ic69acafb24aa737536fe3a074e1958690732f0a7
Adds a global error handler that sends errors to mw.track as
an errorLogging.windowOnerror event.
Bug: T88874
Change-Id: Ic091c9f93c59bda47bda2cfd609c64cd1d014b39
Using a ResourceLoader module to send the data to the client
For I3fafc561
Message changes:
wikieditor-toolbar-characters-page-.* -> special-characters-group-
wikieditor-toolbar-characters-(endash|emdash|minus) -> special-characters-title-
Bug: T91608
Change-Id: If9c5cdbe077e8796e1ebae99f759331251b5c4b1
Reproduce the new section behavior for the full submit preview.
Diffing will require a bit more additional work in Api.
Bug: T84877
Change-Id: Iec71fdc7ba09f91683214f3d65472ea2f72a06b1
Set the new global JavaScript variable 'wgEditMessage' with the name of the message.
Document this global JavaScript variable in
https://www.mediawiki.org/wiki/Manual:Interface/JavaScript#mw.config
after merge.
Bug: T88117
Change-Id: Ida5c1d470908cefd16925bd5455758d25db02113
Implemented mw.Api#saveOptions to save user preferences.
If necessary, the options will be saved using several parallel API
requests. Only one promise is returned that resolves when all requests
are complete.
If a value of `null` is provided, the given option will be to reset to
the default value.
Any warnings returned by the API, including warnings about invalid
option names or values, are currently ignored. This basically means
that all requests will succeed (barring networks problems, internal
server errors and such).
Change-Id: Ia015898ca910923e00bc53f099b4e5631d6ad45c
See I674bf7f6c1b21ffc9870aa84382479af5f966561 for an example in the
PdfHandler extension.
Bug: T89765
Change-Id: I3c4b7af7284b5e16e458dd72de789e74db489895
Follows-up 6c7480e5f0, d2a6a73d2.
The should stop the § character from being indexed by Google et al.
Bug: T18691
Bug: T93000
Change-Id: Ie9e334e973e3ded270f1897a2c3816d9df739fc0
The jQuery Client library is no longer mastered in MediaWiki, and is
instead a proper, published library, which is now tagged as v1.0.0.
Change-Id: Idd19d738b392a5f742fef6f98c885e8c391a5cbf
Follows-up 2ea420eed8. Without this, the startUp() is never called,
and mw.config remains undefined which caused some of the examples
to no longer work properly.
Also move onerror handler to first <script> (follows-up a64a07d).
Exceptions from other code (eg. startup or mediawiki modules),
were not being caught.
Also include 'error' in the line being logged from onerror.
Change-Id: I3956da40b0bd862acab6d4552932aa609c17d569
All the chosen targets are translatable public domain help pages
on MediaWiki.org. Mostly special pages and actions for privileged
users for now.
Adapted from the Translate extension, credit to Niklas Laxström
(TranslateUtils::addSpecialHelpLink).
Depends on 6f5b29ff4e, whose commit
message has a typo addIndicator() instead of setIndicator().
Bug: T45591
Change-Id: I2934b1708a0d207dcf3d940264f140613646f203
This makes it easier for subclasses to use ResourceLoaderWikiModule. Currently
many subclasses of this simply need to override the getPages() method.
UserModule and SiteModule keep their getPages override due to the set of pages
being dependent on context.
Change-Id: I388531398671afacfec36c6c5746d72267b5bdac
Transform mw.Feedback into an ooui dialog.
* Added a configurable checkbox for useragent and terms
of servvice options. The checkbox can be configured
to be visible or not, and to be mandatory or optional.
(useragent addition based largely on the unmerged
fix I37b1a271af115)
* Transformed the 'feedback-bugornote' message to a
configurable intro message with a link to the feedback
page.
* Added a 'thank you' or 'error' dialog at the end of the
operation indicating whether the feedback was sent or
if there was some error.
Bug: T89878
Bug: T43291
Bug: T35365
Bug: T54588
Bug: T65290
Change-Id: Id1967a83a502f689c40f1af71398c3be99e30640
The categories on Category page were listed using table layout. This layout has
been changed to the responsive css column structure, which is 3 column wide
beyond 768px, otherwise shrinks to a single column.
break-inside is used which needs some consideration, see here:
http://css-tricks.com/almanac/properties/b/break-inside/
Bug: T55130
Change-Id: I437e6079b20e110047f93fb5c09aae40189f1ec0
This logic was duplicated into the preferences page module before we
had refactored it into a separate module.
Bug: T89819
Change-Id: I67a25ff8758f009123526d5194929bfcd7c3039b
Changed the Linker::makeHeadline function to additionally generate an
anchor that uses a section symbol. Created mediawiki.sectionAnchor
module to style the anchors and included it in SkinTemplate so that
other skins automatically get those styles.
Bug: T18691
Change-Id: I562e437ec0bd337c9db0406f5dcab504dfa37034
This never belonged in resources/lib/jquery as it isn't a jQuery plugin.
It's its own package and library.
In fact, while it is a jQuery Foundation project, it does not even
depend on jQuery core (e.g. like Sizzle, and PEP).
Change-Id: Ibb00f47f4c9444870832ba8d327853f335708ae7
This allows adding new functionality to the startup module in
separate files, without further growing mediawiki.js.
Bug: T85263
Change-Id: I41177b730a7370b4c9ca13d758d9f8493ff5192e
The new feature does not work very well, and the commit
breaks several unrelated things. Sorry, let's try again.
This reverts commit cb5a0f20a4.
Bug: T85496
Change-Id: I018050ec0bf773e6e22e99819fe3cad91171bbd2
The categories on Category page were listed using table layout. This layout has
been changed to the responsive css column structure, which is 3 column wide
beyond 768px otherwise shrinks to a single column.
Bug: T85496
Change-Id: I2d3583efd470500c374965a433538845fcfade26
Add an 'export' subpage to SpecialJavaScriptTest which allows
one to request a self-sufficient JavaScript payload that will
bootstrap a ResourceLoader client and load the test suites.
This is needed for using Karma (which only loads JavaScript,
no full html pages). As such elements from the Skin and OutputPage
will not exist. While all QUnit tests in MediaWiki core and
most extensions I've seen already use #qunit-fixture, this is
now required. This to prevent leakage of elements from one
test to another, but it also prevents tests from depending
on elements provided by the server.
While the Karma setup is still in the pipeline (might land before
this commit loses WIP status), for now this can be tested via
the 'Special:JavaScriptTest/qunit/plain' subpage.
Refactor:
* Use HTTP status code 404 in the response for "noframework".
* Simplify HTML footprint by using <div id="qunit"> instead of
hardcoding the full structure. This feature was added to QUnit
since v1.3.0 (Feb 2012), we're using v1.14.0 (Jan 2014).
QUnit's header is automatically derived from document.title.
* Remove redundant addModules() for 'test.mediawiki.qunit.testrunner'.
This is already added by default.
* Move allowClickjacking() call so that it applies to other modes
as well. The exported javascript needs to have wgBreakFrame set
to false so that test runners can frame it.
* Change mediawiki.special.javaScriptTest to not depend on QUnit.
It caused QUnit to load on error pages. And in theory the page
is suited for other frameworks and shouldn't load QUnit this way.
Bug: T74063
Change-Id: I3d4d0df43bb426d9579eb0349b8b5477281a7cfc
Original element sizes are stored in data(), and on window resize,
they are restored, so elements can be justified as on just loaded
page.
Bug: T55664
Change-Id: I286e0a4c8230c11619ca30f8f3b66778de835a33