aboutsummaryrefslogtreecommitdiffstats
path: root/mw-config/config.js
Commit message (Collapse)AuthorAgeFilesLines
* resources: Use simple for-in instead of Object.keys().forEach()Timo Tijhof2025-01-141-4/+4
| | | | | | Follows-up If16d0a3682047537d0a089cddaec58b7c1dec7c8. Change-Id: I725bb89cfa8330ce29876f3e3f6720c92a72b020
* eslint: Manually enforce prefer-const in all remaining codeEd Sanders2024-10-051-1/+1
| | | | Change-Id: Ic9f254b55d3936f351ba9c7cc3b553544fc63a58
* eslint: Autofix var to let/constEd Sanders2024-09-121-32/+32
| | | | | | | Temporarily disable no-var & prefer-const as resulting errors need to be fixed manually. Change-Id: I6cb62a2c70a4c1fc265a00b1f18af127ac9d5029
* ESLint: Enforce prefer-arrow-callback and autofixEd Sanders2024-06-111-9/+9
| | | | Change-Id: Iddfa574e42e569ac5e2a2b098ad2f11ca80c5955
* installer: Make logo preview use codex elementsAmir Sarabadani2024-02-061-11/+14
| | | | | | | Currently, it is unstyled divs that don't look very well. Alternative approach to I85e38a9ff16979f Change-Id: Ic5cb76dbc4c919e059a6648200feecc037326230
* Installer: Remove Creative Commons license chooser iframeTim Starling2024-01-111-13/+0
| | | | | | | | | | | | | This chooser has been removed from the Creative Commons website, and the URL we are using now redirects to an apparently random 2006 blog post. There is a new license chooser, with source at https://github.com/creativecommons/chooser , but it does not support the kind of embedding we need. So, remove the feature. Change-Id: I400777b2ae80198ba1db6bd105de38903afced6f
* Redesign the installer with CodexAmir Sarabadani2023-12-131-0/+7
| | | | | | | | | It is not perfect, but it's a major improvement compared the existing one. We need to clean up a lot more once it has landed but it's a good start. Bug: T337435 Change-Id: I1f85110e754546c797d3325b8dd6878093790266
* Make use of jQuery method chaining where it makes sensethiemowmde2023-02-141-6/+2
| | | | | | | | | | It's not always better to arrange code this way because it makes the lines depend on each other and makes it a little harder to change one line without changing the others. But I feel like it makes a lot of sense in these cases. These method calls are not independend from each other. Change-Id: I6b223018d900b907933e9d4ed010af47f92ed37d
* Update installer to reflect modern logosJon Robson2022-03-101-0/+121
| | | | | | | | | | | | | 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
* build: Update eslint-config-wikimedia to 0.13.0Ed Sanders2019-07-051-0/+1
| | | | Change-Id: I7df5840bc97f8bbcd8cfc875c2b48b3061ef2c9e
* Installer: Use HTML/CSS instead of JavaScript to toggle the help messageFomafix2019-06-151-11/+0
| | | | | | | | | 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
* build: Update eslint-config-wikimedia to 0.11.0Ed Sanders2019-02-201-13/+13
| | | | Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b
* build: Update eslint-config-wikimedia to 0.10.0Ed Sanders2019-01-081-7/+27
| | | | Change-Id: I2930bcabeeb7b7b2eb36063e77b26e664a691b43
* resources: Strip '$' and 'mw' from file closuresTimo Tijhof2018-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* installer: Do not wrongly hide namespace input fieldFomafix2018-05-081-1/+3
| | | | | | | | | | 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
* installer: Clean up ext-dependency jQuery codeTimo Tijhof2018-04-181-11/+8
| | | | | | | | | | | | | | | Follows-up c8833d8e8ecc. * 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
* Handle extension dependencies in the installerKunal Mehta2018-04-131-0/+48
| | | | | | | | | | | | | | | | | | | | | | 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
* installer: Fix setting a custom $wgMetaNamespaceKunal Mehta2018-04-061-1/+1
| | | | | | | | | `$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
* build: Upgrade grunt-eslint from 19.0.0 to 20.0.0Ed Sanders2017-07-181-12/+8
| | | | | | Most indent and escaping fixes. Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
* Installer: use _MainCacheType form variablesaper2015-10-261-2/+2
| | | | | | | | Do not use "wgMainCacheType" form variable name that contains values that cannot be assigned to $wgMainCacheType Bug: T116375 Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
* Web installer: Fix collapsing of field help textKevin Israel2015-09-261-5/+5
| | | | | | | Follows-up 1e06a9f02f9a. Bug: T112383 Change-Id: I23030f48ce89abc460ac9e7ed3c148893ffb24ef
* build: Enable jscs rule 'requireSpacesInsideParentheses' and make passJames D. Forrester2015-09-031-9/+9
| | | | Change-Id: Ie88c89344e54657f007e5101472e667be5408319
* Use String#slice instead of String#substr or String#substringTimo Tijhof2014-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move installer files from skins/common/ to mw-config/Bartosz DziewoƄski2014-08-171-0/+108
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