There are now 4 types of logos, only one of which is needed.
Update documentation in installer to reflect this.
Also make it possible to drag and drop files into the installer
and see live previews of what the logos will look like to aid
setup.
The 1x is no longer required.
Bug: T255913
Change-Id: I58226ae8fb02c32d2eeea65a50aaabbc193cb51c
Changes in the behavior:
* The expanding/collapsing now works even with disabled JavaScript.
* There is no FOUC on loading anymore.
* The animation on show/hide is absent.
Change-Id: I1b88d8e2cdbb1c969670a7a8637dba10bf447330
Follows-up Id6d13bbea6:
- '$': mw.loader.implement does this already.
- 'mw': Use the canonical name directly.
This replaces the following patterns:
File closures (common):
- `( function ( $, mw ) {` => `( function () {`
- `( function ( $ ) {` => `( function () {`
- `( function ( mw ) {` => `( function () {`
- `( function ( mw, $ ) {` => `( function () {`
File closures (rare):
- `( function ( mw, $, OO ) {` => `( function () {`
- `( function ( mw, OO, $ ) {` => `( function () {`
- `( function ( mw, document ) {` => `( function () {`
Combined dom-ready and file closure (rare):
- `jQuery( function ( $ ) {` => `$( function () {
- `jQuery( function () {` => `$( function () {
Remaining references in files without a closure, as found by
the new ESLint setting (rare):
- `jQuery` => `$`
- `mediaWiki` => `mw`
Change-Id: I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b
When the radio button is already on "other" then the input field for
the namespace should not get hidden by JavaScript on load.
Also remove the readonly attribute in HTML because the readonly
attribute can not get removed with disabled JavaScript.
Change-Id: I8cfde90d791765234572caf00b731881ac2eda48
Follows-up c8833d8e8e.
* Select the input elements by class to avoid accidentally trigging
on unrelated elements elsewhere on the page in the future, given
the generic selector.
* Use on('change') instead of deprecated change() alias.
* Set properties directly instead of via prop() indirection.
* Get attribute directly instead of via data() indirection.
Change-Id: I5158aa26b5fd7327d6795f0a31bbffbe99043fbf
As there will likely be extensions bundled with the 1.31 release that
depend upon other extensions, we should have the installer prevent users
from enabling extensions that depend on other, not-enabled extensions.
We can build a dependency map from extension.json's "requires"
component. On the client-side, we'll first disable all checkboxes that
require other extensions, and evaluate each checkbox click, updating the
disabled checkboxes as possible.
This required some refactoring of how ExtensionRegistry reports issues
with dependency resolution so we could get a list of what was missing.
While we're at it, sort the extensions under headings by type.
This does not support skins that have dependencies yet (T186092).
Bug: T31134
Bug: T55985
Change-Id: I5f0e3b1b540b5ef6f9b8e3fc2bbaad1c65b4b680
`$textbox.removeProp('readonly')` has no effect and leaves the input
still as readonly, so instead use `$textbox.prop( 'readonly', false )`,
which does work.
Bug: T188415
Change-Id: I898c5605caf383cc992a948f14294193460f761b
Do not use "wgMainCacheType" form variable
name that contains values that cannot be
assigned to $wgMainCacheType
Bug: T116375
Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
Quite a few reasons:
* There is a bug in IE 8 and below where the startIndex argument
does not support negative values, contrary to the ECMAScript
spec and implementations in other browsers.
IE8:
'faux'.substr( -1 ); // "faux"
Standards:
'faux'.substr( -1 ); // "x"
Code written for ES5 (and using the es5-shim) works as expected
since the shim repairs this method.
* String#substr and String#substring both exist but have
different signatures which are easily mixed up.
String.prototype.substr( start [, length] )
> Supports negative start, but not in IE8 and below.
> Takes length, *not* second index. E.g. `substr( 2, 3 )`
returns `slice( 2, 5 )`.
String.prototype.substring( indexA [, indexB] )
> Doesn't support negative indices.
> If indexA is larger than indexB, they are silently swapped!
String.prototype.slice( start [, end] )
> Supports negative indices.
'faux'.substr( 0, 2 ); // "fa"
'faux'.substring( 0, 2 ); // "fa"
'faux'.slice( 0, 2 ); // "fa"
'faux'.substr( -2 ); // "ux"
'faux'.substring( -2 ); // "faux"
'faux'.slice( -2 ); // "ux"
'faux'.substr( 1, 2 ); // "au"
'faux'.substring( 1, 2 ); // "a"
'faux'.slice( 1, 2 ); // "a"
'faux'.substr( 1, -1 ); // ""
'faux'.substring( 1, -1 ); // "f"
'faux'.slice( 1, -1 ); // "au"
'faux'.substr( 2, 1 ); // "u"
'faux'.substring( 2, 1 ); // "a"
'faux'.slice( 2, 1 ); // ""
* String#slice works the same way as Array#slice and slice
methods elsewhere (jQuery, PHP, ..).
* Also simplify calls:
- Omit second argument where it explicitly calculated the length
and passed it as is (default behaviour)
- Pass negative values instead of length - x.
- Use chatAt to extract a single character.
* Change:
- Replace all uses of substring() with slice().
- Replace all uses of substr() with slice() where only one
parameter is passed or where the first parameter is 0.
- Using substr()'s unique behaviour (length instead of endIndex)
is fine, though there's only one instances of that, in
mediawiki.jqueryMsg.js
Change-Id: I9b6dd682a64fa28c7ea0da1846ccd3b42f9430cf
The CSS and JS files are definitely used only by the installer.
As for the images:
* mediawiki.png is still used directly by some error pages
(includes/PHPVersionError.php, includes/templates/NoLocalSettings.php)
* ajax-loader.gif is still used by shared.css
* bullet.gif is mysteriously used by *something*, according to the
logs at bug 69277 comment 11; I currently have no idea what, so
let's keep it here for a while
* All other ones don't grep (outside of the installer itself) and
don't appear in the logs on bug 69277.
Bug: 69277
Change-Id: I9146d9211a807911a5e0cfaa1dd3ab8170f333ca