Commit graph

16 commits

Author SHA1 Message Date
Jon Robson
9bd3af32fc Update installer to reflect modern logos
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
2022-03-10 16:48:39 +00:00
Ed Sanders
689d07b81d build: Update eslint-config-wikimedia to 0.13.0
Change-Id: I7df5840bc97f8bbcd8cfc875c2b48b3061ef2c9e
2019-07-05 13:32:26 -07:00
Fomafix
1dc40b1cb3 Installer: Use HTML/CSS instead of JavaScript to toggle the help message
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
2019-06-15 12:29:07 +02:00
Ed Sanders
9097f95ecc build: Update eslint-config-wikimedia to 0.11.0
Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b
2019-02-20 23:36:03 +00:00
Ed Sanders
b3e490bba6 build: Update eslint-config-wikimedia to 0.10.0
Change-Id: I2930bcabeeb7b7b2eb36063e77b26e664a691b43
2019-01-08 17:40:11 +00:00
Timo Tijhof
add9bd191f resources: Strip '$' and 'mw' from file closures
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
2018-09-14 00:59:27 +01:00
Fomafix
31a472655b installer: Do not wrongly hide namespace input field
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
2018-05-08 02:39:52 +00:00
Timo Tijhof
fd8a4c707a installer: Clean up ext-dependency jQuery code
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
2018-04-18 03:14:30 +01:00
Kunal Mehta
c8833d8e8e Handle extension dependencies in the installer
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
2018-04-13 15:28:40 -07:00
Kunal Mehta
445622563f installer: Fix setting a custom $wgMetaNamespace
`$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
2018-04-06 16:02:49 -07:00
Ed Sanders
2c03d167fa build: Upgrade grunt-eslint from 19.0.0 to 20.0.0
Most indent and escaping fixes.

Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
2017-07-18 16:57:03 +01:00
saper
1730a17929 Installer: use _MainCacheType form variable
Do not use "wgMainCacheType" form variable
name that contains values that cannot be
assigned to $wgMainCacheType

Bug: T116375
Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
2015-10-26 17:10:13 +00:00
Kevin Israel
975b4d0c34 Web installer: Fix collapsing of field help text
Follows-up 1e06a9f02f.

Bug: T112383
Change-Id: I23030f48ce89abc460ac9e7ed3c148893ffb24ef
2015-09-26 19:56:38 -04:00
James D. Forrester
42fe11a2e6 build: Enable jscs rule 'requireSpacesInsideParentheses' and make pass
Change-Id: Ie88c89344e54657f007e5101472e667be5408319
2015-09-03 21:35:22 +00:00
Timo Tijhof
c718183466 Use String#slice instead of String#substr or String#substring
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
2014-09-03 21:33:06 +00:00
Bartosz Dziewoński
a8e474c1f2 Move installer files from skins/common/ to mw-config/
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
2014-08-17 22:32:25 +00:00
Renamed from skins/common/config.js (Browse further)