Commit graph

554 commits

Author SHA1 Message Date
James D. Forrester
3d77461809 OOUI: Switch Minerva skin from deprecated 'Minerva' theme to 'MediaWiki'
Change-Id: I9600e11521256b143bfd8f3ee01cc1cf907a4c45
2014-10-04 15:07:32 -07:00
Amir E. Aharoni
4cdbcd52a2 Whitespace correction
Change-Id: Ia6e9c1e47bf6289398a38e6b4b2f5055e30ba4fb
2014-10-04 16:29:43 +03:00
umherirrender
ada950fd3e Add comment for messages on 'mediawiki.action.edit.editWarning'
In I43bf828654d342893a19656ddd4151c2558d2f63 the comment was added for
another usage.

Change-Id: I0510d069c6bc266d8d9e9a144daed2fc8dd7ebb9
2014-10-03 21:05:29 +02:00
Timo Tijhof
b3830611c4 Split mediawiki.toolbar from mediawiki.action.edit
Follows-up 285c52039b.

Get rid of mediawiki.mediawiki.action.toolbar. Not keeping a
backwards-compat alias since this module is not supposed to be used
publicly in its current form.

Change-Id: I403216c6916e1f4d29216a55c3fe6c92eb68400b
2014-10-02 13:49:42 -07:00
jenkins-bot
71a8bf7b82 Merge "Change mw-ui anchors to require mw-ui-anchor base class, and introduce mw-ui-text base class" 2014-10-02 04:24:18 +00:00
Shahyar
2568fbbdd4 Change mw-ui anchors to require mw-ui-anchor base class, and introduce mw-ui-text base class
Introduced mw-ui-text base class for plain-text, non-interactable elements which require context colors (eg. icons)
Also added mw-ui-anchor for interactable elements (such as anchors)

Note: This is not supported by IE6 at current time.

Bug: 69212
Bug: 70801
Change-Id: I4d017d0a22cb4f3ca52b6228e45c0463c110ae64
2014-10-01 23:47:36 -04:00
jenkins-bot
fba29de528 Merge "Use skinStyles for mediawiki.ui.icon" 2014-10-01 07:26:42 +00:00
Matthew Flaschen
d6aae24d77 Use skinStyles for mediawiki.ui.icon
This allows skin customization.  This was missed since it was under
code review when the others went in.

Change-Id: I2c640fda4d2c6e40be0add52f6fc948a8e07c010
2014-10-01 02:03:08 -04:00
jenkins-bot
35b92c4bee Merge "Update OOjs UI to v0.1.0-pre (afa3241e8e)" 2014-09-30 21:42:10 +00:00
Roan Kattouw
9d41cc7191 Update OOjs UI to v0.1.0-pre (afa3241e8e)
New changes:
8daef61 TextInputWidget: Add setValidation function to change pattern used to validate text
953c46c [BREAKING CHANGE] Create a MediaWiki theme
e2a3bae PopupWidget: Position body/anchor using 'margin-left' instead of 'left'
4f50c34 Correct the left positioning of a popup wrapper
afa3241 Move references to pending.gif to the themes that provide it

Update changes:
* Update links to OOjs UI distribution files

Change-Id: Ic59650b56de44807348db4df46c538756ed9329e
2014-09-30 14:24:24 -07:00
Alex Monk
91ba0535b2 Implement autocompletion for Performer field on Special:Log
Bug: 48241
Change-Id: I5e6af5aba56de613f10f862aaf064aaa32b5b176
2014-09-30 01:03:55 +00:00
Timo Tijhof
3934753979 Remove deprecated "jquery.json" module
Announced in https://www.mail-archive.com/wikitech-l%40lists.wikimedia.org/msg78108.html

Change-Id: Icc9dec0146cd374787124b7e1ed295c77737d11b
2014-09-29 22:43:23 +00:00
umherirrender
1288d52d63 Register missing messages for mediawiki.special.upload
Follows-up I43bf828654d342893a19656ddd4151c2558d2f63.
The confirm close needs messages and jQueryMsg for parsing "int:".

Change-Id: If9a69749dcff2196dfe51a4484c6faeb98674ffa
2014-09-29 12:42:03 -07:00
jenkins-bot
2fe344a125 Merge "Add window close warning to Special:Upload" 2014-09-28 22:16:57 +00:00
jenkins-bot
5b1f1899ea Merge "Implement mediawiki.confirmCloseWindow module" 2014-09-28 22:16:48 +00:00
Mark Holmquist
d154cb5526 Add window close warning to Special:Upload
Change-Id: I43bf828654d342893a19656ddd4151c2558d2f63
2014-09-28 22:06:45 +00:00
Bartosz Dziewoński
3fea95a886 mediawiki.action.view.redirect: Remove deployment hack
Follow-up to c49bd9cb.

Change-Id: Ic3904d40e89533483434e074b2021d4ec3db6831
2014-09-28 16:07:33 +00:00
tholam
c24ef26d68 Set site logo in mediawiki.skinning.interface module instead of inline styles
Requires skins use the 'mw-wiki-logo' class on the logo element for the styles
to apply and to load the 'mediawiki.skinning.interface' module (or implement
their own skin module that uses the ResourceLoaderSkinModule class).

This is backwards compatible with skins using inline styles as the class only
applies when used.

Bug: 56257
Change-Id: I4e6db89a688843ac24539f8fd1b408c0d04881b3
2014-09-26 21:09:22 +00:00
Bartosz Dziewoński
e9c41b239c Merge "Make mediawiki.action.view.dblClickEdit recheck preference" 2014-09-25 16:47:28 +00:00
Alex Monk
d31afa8147 Make mediawiki.action.view.dblClickEdit recheck preference
There's a preference which makes the browser go to action=edit when double
clicking on the content. In VE we want to disable this while the editor is
open. With this check in place, we can turn it off by falsifying the value
of the preference (and then restoring the original value when VE closes).

Bug: 53058
Change-Id: I0f6225b25ad279755548361f82b855727758da2b
2014-09-25 17:37:02 +01:00
Sam Smith
7e931c1a45 Add mw-ui-icon
Compatible with IE8+ (because of the use of pseudo-elements).
This includes support for icons on the left of the element and
icons which hide the text of the containing element.

I attempted to make an mw-ui-icon-element which didn't use pseudo
elements but the problem with this is how it plays with things such
as mw-ui-button and the gutter. I'd suggest exploring this later as this gets greater
adoption.

In addition to this I have dropped mw-ui-icon-after since I don't see any
clear use cases for this yet and I think it is overengineering the solution.

Bug: 55535
Change-Id: I68a1b207d8a4af57879361921a5f8c3aeda3fd9a
2014-09-23 13:45:20 +01:00
Mark Holmquist
d607e6a70b Implement mediawiki.confirmCloseWindow module
Copied from UploadWizard, removed there in I9411a6d33.

Change-Id: I5d35b6fddd73cf56371eeda299ee0779cb40397a
2014-09-23 03:32:50 +00:00
Kunal Mehta
6f1a506ee8 Fix duplicate messages key in 'mediawiki.special.preferences' definition
Follows up: Idb00f50a

Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
2014-09-21 17:25:51 -07:00
jenkins-bot
bf820fca0e Merge "jquery.confirmable: Add a space between buttons" 2014-09-21 05:10:38 +00:00
jenkins-bot
4060f43b43 Merge "Add "unsaved changes" warning to Special:Preferences" 2014-09-19 01:19:52 +00:00
Brad Jorsch
9084a3a1aa Add "unsaved changes" warning to Special:Preferences
Much like the similar warning on the edit page, it has been requested
that we display a warning if the user has made changes on
Special:Preferences and attempts to leave without saving.

This adapts the code from
resources/mediawiki.action/mediawiki.action.edit.editWarning.js to do
so.

Bug: 55966
Change-Id: Idb00f50ad8148cd80bd0af81b4cd06a0eb217d96
2014-09-19 11:04:30 +10:00
Fomafix
16c5d8801e mediawiki.util: Deprecate mw.util.updateTooltipAccessKeys
Use $nodes.updateTooltipAccessKeys() instead of
mw.util.updateTooltipAccessKeys( $nodes )

mw.util.updateTooltipAccessKeys() with empty parameter
to update all nodes is only needed in mediawiki.page.ready.js.
Copy that code to mediawiki.page.ready.js.

Adapt wikibits.js

Change-Id: I300a23e614e5f91fe2f536d958e91a47f6203021
2014-09-18 10:59:18 -07:00
Matthew Flaschen
20eb104e3e Change MediaWiki UI to use skinStyles so skins can customize
Bug: 70351
Change-Id: I5d5725dba7e8e65b8fe3f5213b5e50d8dfeba755
2014-09-18 01:20:37 -04:00
jenkins-bot
96efe0bc66 Merge "Revamp classic edit toolbar not to hardcode paths in HTML" 2014-09-16 12:51:21 +00:00
Bartosz Dziewoński
285c52039b Revamp classic edit toolbar not to hardcode paths in HTML
Also, try out a way to have per-module LESS variables defined in PHP.
This might come in handy in the future… Maybe for skin theme support?

(I recommend reviewing the file changes in the order below. :D)

includes/resourceloader/ResourceLoaderFileModule.php
  * Pass the context (ResourceLoaderContext) deeper down via
    readStyleFiles() and readStyleFile(). We need it to compile the
    .less files for the right language.
  * Extract LESS compiler creation to getLessCompiler().
  * Allow passing a LESS compiler instance to compileLessFile(), rather
    than getting one after the method is called.

  All of the changes are backwards-compatible.

includes/resourceloader/ResourceLoaderEditToolbarModule.php
  * New module to support getting the language data and passing it to
    LESS variables.

  It might be a good idea to factor out a reusable class for a LESS
  module with additional variables, but that would require more
  attention to design than I gave it.

resources/src/mediawiki.action/mediawiki.action.edit.toolbar/mediawiki.action.edit.toolbar.less
  * Glue code to use the language data defined by the module above and
    put it in final CSS.

includes/EditPage.php
  * Do not hardcode image URLs in output HTML, as they are provided in
    CSS now. This gets rid of some usage of globals.

  In fact, we should be able to finally move the inline JavaScript
  calls out of getEditToolbar(), but I'm already introducing too many
  changes for one patch. That can be done later.

languages/Language.php
  * Add getImageFiles() to complement existing getImageFile() method.
    Misleadingly named, it returns paths for images for the toolbar
    only (and no other ones at all).

skins/common/ → resources/src/mediawiki.action/mediawiki.action.edit.toolbar/
  * Moved all of the button images to new location.

  Also, boring cleanup that was harder before because we treated the
  paths as public API:
  * Placed default ones in en/ subdirectory.
  * Renamed cyrl/ to ru/.
  * Renamed ksh/button_S_italic.png → ksh/button_italic.png.

languages/messages/
  * Adjusting paths and filenames for the changes above.

resources/src/mediawiki.action/mediawiki.action.edit.css
resources/src/mediawiki.action/mediawiki.action.edit.js
  * Added styles and updated the script to make it possible to have
    non-<img> elements as toolbar buttons.
  * Consolidated styles that were already required, but defined
    somewhere else:
    * `cursor: pointer;` (from shared.css)
    * `vertical-align: middle;` (from commonElements.css)

Bug: 69277
Change-Id: I39d8ed4258c7da0fe4fe4c665cdb26c86420769c
2014-09-13 23:16:23 +02:00
jenkins-bot
062a6fecda Merge "Clean up mediawiki.legacy.protect a bit." 2014-09-13 16:30:12 +00:00
Alex Monk
c805e14eec Clean up mediawiki.legacy.protect a bit.
Also kills some inline JS stuff in ProtectionForm

Bug: 33871
Change-Id: Ie43c80bf5ebd6107458d5284cc68b7128f29359a
2014-09-13 15:43:30 +01:00
Bartosz Dziewoński
9cb95c3dd7 jquery.confirmable: Add a space between buttons
It should have always been there, my bad. Problems with lack of the
space:

* Languages with ligatures may decide to join the last letters of
  "Yes" with first letters of "No", producing a mess. (This was
  reported with a proposed solution as I0e6fcd83, I opted for doing
  this fix instead.)
* The "Yes" and "No" may be read together by screen readers, as
  "Yesno" (although I didn't test this), and similarly misinterpreted
  by other tools.
* The interface looks silly when copy-pasted.

Change-Id: I65c771fc22e105bf5978e6e4ee5068200f294b9e
2014-09-12 21:15:29 +02:00
Amir E. Aharoni
d508b0a570 Clean Resources.php for phpcs
Change-Id: I138527fd235fc65a7ee10338681a6cf83abddfdd
2014-09-11 12:47:12 +03:00
jenkins-bot
cbc41c4308 Merge "Merge mediawiki.legacy.upload into mediawiki.special.upload" 2014-09-10 16:46:09 +00:00
paladox
43f46b6c92 Update Moment.js from 2.8.1 to 2.8.3
Project site
* http://momentjs.com
* https://github.com/moment/moment/

File source
* https://github.com/moment/moment/tree/2.8.3

Changelog
* https://github.com/moment/moment/blob/2.8.3/CHANGELOG.md

Difference between 2.8.1 and 2.8.3

1.8.3

Bugfixes:
* #1801 proper pluralization for Arabic
* #1833 improve spm integration
* #1871 fix zone bug caused by Firefox 24
* #1882 Use hh:mm in Czech
* #1883 Fix 2.8.0 regression in duration as conversions
* #1890 Faster travis builds
* #1892 Faster isBefore/After/Same
* #1848 Fix flaky month diffs
* #1895 Fix 2.8.0 regression in moment.utc with format array
* #1896 Support setting invalid instance locale (noop)
* #1897 Support moment([str]) in addition to moment([int])

1.8.2

Minor bugfixes:
* #1874 use  Object.prototype.hasOwnProperty  instead of obj.hasOwnProperty  (ie8 bug)
* #1873 add  duration#toString()
* #1859 better month/weekday names in norwegian
* #1812 meridiem parsing for greek
* #1804 spanish del -> de
* #1800 korean LT improvement

Change-Id: I60595e8ea41e136c7afee12ad3702ecec6dd4aef
2014-09-08 01:20:31 +02:00
Alex Monk
86571c32bf Merge mediawiki.legacy.upload into mediawiki.special.upload
Bug: 31946
Change-Id: Iba7d5a655847f00dde8f11c46dfc13f43b610433
2014-09-05 21:49:23 +01:00
Bartosz Dziewoński
7dc4b58615 Article: Don't hardcode <img> tags on redirect page
* Created a ResourceLoader module for redirect page styling.
* Fixed a couple of bugs in Article code.

Keeping two of the old files for a while because they might still be
referenced by something (bug 69277 comment 11).

Bug: 69277
Change-Id: I8fa565833545e41d0232101566da8c5ffa850e36
2014-09-05 22:00:57 +02:00
Bartosz Dziewoński
ebaed67511 Move mediawiki.skinning.* modules from skins/common/ to resources/
This is a BREAKING CHANGE, as we have used the names of these three
files in skins/common/ as a "public API" for skins for a long time.
Doing so has been deprecated (but still supported) in 1.23.

We must clear them out at some point, and now is as good a time as
ever, with the 1.23 LTS release still supporting the old way.

Skins may no longer rely on the presence of commonElements.css,
commonContent.css and commonInterface.css in skins/common/ and
include them in their style modules. The corresponding ResourceLoader
modules must be used instead:

- skins/common/commonElements.css  → 'mediawiki.skinning.elements' module
- skins/common/commonContent.css   → 'mediawiki.skinning.content' module
- skins/common/commonInterface.css → 'mediawiki.skinning.interface' module

Follow-up to I3947eaac (where I said I intend to do this) and I56758908.

Bug: 69277
Change-Id: Id8456c570ff406822a8befad8f42f528ef5bd3a6
2014-09-04 11:00:11 +00:00
Bartosz Dziewoński
09b8f235e8 mediawiki.action.view.metadata: Include the CSS we need, don't rely on shared.css
Change-Id: I4b1cbc5998492272825d33842ee3721a41b19b4c
2014-09-03 14:03:17 +02:00
jenkins-bot
8a54fcee95 Merge "mediawiki.language: Implement Language::listToText in JS" 2014-09-03 09:36:53 +00:00
Alex Monk
2f0d1b8118 mediawiki.language: Implement Language::listToText in JS
For I35e55658 in VisualEditor.

Change-Id: I5d894f8a1cba65a3d90dfbf3e43be4e515a327d1
2014-08-31 19:52:18 +02:00
Bartosz Dziewoński
987a860df4 TablePager: Redo arrow icons from scratch as CSS backgrounds
Redrawn the images with SVG versions.

Intentionally did not preserve the value of the 'alt' attribute of the old
images, it doesn't seem very useful to me. Instead, added 'title'
attributes on the sort links that describe their action. This should be
more useful than the old version for both visual and aural mediums.

Bug: 69277
Change-Id: Ibaec75e81d3eb8338d911ac84d91570047f475f5
2014-08-31 00:48:45 +02:00
Bartosz Dziewoński
1683741e71 TablePager: Modernize style loading
* Create a CSS module for pager styling (table and navigation),
  pulling in existing styles for shared.css. Load it on all pages
  where the pager itself is shown.
* Build a ParserOutput object encapsulating the return HTML and
  required modules, rather than only providing the HTML. Added some
  hacks for backwards-compatibility with old-style calls and
  soft-deprecated them (there are many usages in extensions).

Other cleanup:
* Remove styles in oldshared.css, they were all overwritten by
  shared.css or by styles for .mw-datatable.
* Remove inline styles where possible, explain them where impossible.
* On SpecialListFiles, display navigation bar above the table as well
  as below (this seems to be the convention for other pages).

Change-Id: Iae976f854b96b5c61691918787c4dff7db089c28
2014-08-31 00:48:43 +02:00
Bartosz Dziewoński
b1dea1d957 Move mediawiki.legacy.* modules from skins/common/ to resources/
Also renamed some image files for consistency and sanity.

Added temporary symlinks to the new location for ajax.js and
wikibits.js, which still seem to get many hits for unknown reasons.
I'm going to figure this out and remove them before 1.24 release.

shared.css also appears in the access logs from bug 69277, but with
many fewer hits (it might just correspond to debug=true requests)
and failing to load a style file is a lot less problematic from
user's perspective than failing to load a script.

Bug: 69277
Change-Id: Id4a8f9470d287c73309ff526ffb88984e2d351b9
2014-08-31 00:30:49 +02:00
James D. Forrester
267a1b0d0e Update OOjs UI to v0.1.0-pre (43f379c884)
New changes:
0473209 Standardize less imports and image rule generation
4ead033 Localisation updates from https://translatewiki.net.
596d4e9 Tweak behaviour to match description in demos
8846b27 Fix typo in documentation: "nodes" (pl.) goes wo. article
611703c Fix label text in RTL demo listing containing parentheses
93c4b43 Divide CSS properties between base styles and themes
6ede2d8 Reorganize theme system
3515f5a Build with clean CSS
a24c7af Make OO.ui.Window's $content a div again
ea0172d Followup 6ede2d8: fix popup font size
d72addb Fix remaining references to 'agora' not 'minerva'
f6468b8 build: Don't copy anything other than SVG and PNG files to /dist
43f379c build: Also whitelist GIF files in the copy task

Local changes:
The "Agora" OOUI theme has been renamed to "Minerva", so correct loader.
The RTL CSS files were here by mistake, and have been removed.

Change-Id: I76e47b0b53bc5652146dd24fc403591bcc54e18b
2014-08-28 14:52:25 -07:00
jenkins-bot
2541375682 Merge "es5-shim: Add polyfill for Object.create" 2014-08-28 16:58:56 +00:00
Jack Phoenix
2241e7d26c Introduce mediawiki.skinning module for external link icons
This should facilitate the creation of third-party skins.

Previously third-party skin creators have had to either copy the relevant
lines from Monobook's main.css, which has led to unnecessary code
duplication and bitrot (to a degree), or no support for external link
icons at all.

This change set will hopefully make the main.css file of your average
custom skin about 86 lines shorter, as well as keep the external link code
and icons centralized for proper RTL support and whatnot (which is *not*
a given when it comes to custom, non-core skins!).

HTTPS' custom icon was dropped and HTTPS URLs are now given the standard
external link arrow icon. This is an intentional design decision.

New icons are Isarra's handiwork, kudos!

Bug: 63521
Change-Id: I8ecbc827f2b05aec79401ac4962fcc15387c8ad8
2014-08-27 22:09:07 +01:00
Timo Tijhof
b4df18c175 es5-shim: Add polyfill for Object.create
Follows-up fff9a814f2. Per the OOjs readme, it requires:

> (..) parser compatibility with ES3 engines.
> To support ES3 engines, ensure an appropriate polyfill is
> loaded for these methods:
> * Array.isArray
> * Object.create (basic use only)
> * Object.keys
> * JSON.stringify

The es5-shim and oojs modules already provide JSON, and most
Array and Object methods. Except for Object.create because there
are a few features in it that can't be emulated, and hence
es5-shim refuses to ship the polyfill for it.

Bug: 67590
Change-Id: I4838d78f77a3a71f80e6750adb914213b5ca4df5
2014-08-26 16:52:05 +00:00
Bartosz Dziewoński
2202bb1f6c mediawiki.language: Expose language fallback chain
The data can now be accessed via mw.language#getFallbackLanguages or
mw.language#getFallbackLanguageChain.

Bug: 69285
Change-Id: Id0c3267f01d5c4da0e4000a0fb318a9dfb538ef3
2014-08-22 03:14:04 +02:00