Remove old "bulletin board style toolbar" from core
authorJames D. Forrester <jforrester@wikimedia.org>
Thu, 20 Oct 2016 21:26:22 +0000 (14:26 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Wed, 17 Oct 2018 03:08:32 +0000 (20:08 -0700)
With this change, MediaWiki will no longer have a 'JavaScript-powered'
wikitext toolbar, and instead sysadmins will be required to choose one
(or more) of the several extensions available for this purpose if they
need the functionality. For over half a decade MediaWiki's tarball has
included the 2010-era replacement for this feature, WikiEditor. We are
now working on replacing even that, with the 2013-era visual editor, a
mode of which is the forthcoming 2017-era wikitext editor, and several
more specialised editors like CodeEditor.

Beyond this, the core editor toolbar is ancient, un-loved, and is used
only exceptionally rarely, mostly by accident. It is unhelpful to give
implicitly this as the primary editor for MediaWiki just because we've
not removed it from core when it is not a very good experience for any
kind of user, and has not received the attention that users deserve to
be worth retaining in core.

The old core preference, which was intended to govern whether this old
toolbar should be shown, has since mutated into whether the to run the
EditPageBeforeEditToolbar hook. The hook is used by several extensions
to provide toolbars in lieu of the core one. This preference has been,
in practice, a very confusing preference for MediaWiki users, who have
to interact with quite similar preferences to toggle their real editor
which sit next to this one on the preferences page. Consequently, this
preference is also removed.

The code could be made into an extension for those (very few) users of
MediaWiki who might want to keep on using it. However, the author will
offer their services but not their encouragement in said undertaking.

Bug: T30856
Bug: T32795
Change-Id: I2b05f0ca25873ad8e0b33a5e4938bef52c4e9347

52 files changed:
RELEASE-NOTES-1.32
autoload.php
docs/hooks.txt
includes/DefaultSettings.php
includes/EditPage.php
includes/resourceloader/ResourceLoaderEditToolbarModule.php [deleted file]
languages/Language.php
languages/i18n/en.json
languages/i18n/qqq.json
languages/messages/MessagesAr.php
languages/messages/MessagesBe_tarask.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
languages/messages/MessagesFa.php
languages/messages/MessagesKsh.php
languages/messages/MessagesRu.php
maintenance/dictionary/mediawiki.dic
maintenance/jsduck/categories.json
resources/Resources.php
resources/src/mediawiki.toolbar/images/ar/button_bold.png [deleted file]
resources/src/mediawiki.toolbar/images/ar/button_headline.png [deleted file]
resources/src/mediawiki.toolbar/images/ar/button_italic.png [deleted file]
resources/src/mediawiki.toolbar/images/ar/button_link.png [deleted file]
resources/src/mediawiki.toolbar/images/ar/button_nowiki.png [deleted file]
resources/src/mediawiki.toolbar/images/be-tarask/button_bold.png [deleted file]
resources/src/mediawiki.toolbar/images/be-tarask/button_italic.png [deleted file]
resources/src/mediawiki.toolbar/images/be-tarask/button_link.png [deleted file]
resources/src/mediawiki.toolbar/images/de/button_bold.png [deleted file]
resources/src/mediawiki.toolbar/images/de/button_italic.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_bold.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_extlink.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_headline.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_hr.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_image.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_italic.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_link.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_media.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_nowiki.png [deleted file]
resources/src/mediawiki.toolbar/images/en/button_sig.png [deleted file]
resources/src/mediawiki.toolbar/images/fa/button_bold.png [deleted file]
resources/src/mediawiki.toolbar/images/fa/button_headline.png [deleted file]
resources/src/mediawiki.toolbar/images/fa/button_italic.png [deleted file]
resources/src/mediawiki.toolbar/images/fa/button_link.png [deleted file]
resources/src/mediawiki.toolbar/images/fa/button_nowiki.png [deleted file]
resources/src/mediawiki.toolbar/images/ksh/LICENSE [deleted file]
resources/src/mediawiki.toolbar/images/ksh/button_italic.png [deleted file]
resources/src/mediawiki.toolbar/images/ru/LICENSE [deleted file]
resources/src/mediawiki.toolbar/images/ru/button_bold.png [deleted file]
resources/src/mediawiki.toolbar/images/ru/button_italic.png [deleted file]
resources/src/mediawiki.toolbar/images/ru/button_link.png [deleted file]
resources/src/mediawiki.toolbar/toolbar.js [deleted file]
resources/src/mediawiki.toolbar/toolbar.less [deleted file]

index 4ae590d..0d8b468 100644 (file)
@@ -392,6 +392,26 @@ because of Phabricator reports.
   * ApiUsageException::getCodeString() (deprecated in 1.29)
   * ApiUsageException::getMessageArray() (deprecated in 1.29)
 * Class UsageException, deprecated in 1.29, has been removed.
+* MediaWiki no longer has a 'JavaScript-powered' wikitext toolbar built in. The
+  old "bulletin board style toolbar", known as "the 2006 wikitext editor", has
+  been removed, and instead sysadmins will be required to choose one (or more)
+  of the several extensions available for this purpose if they need the
+  functionality. The MediaWiki "tarball" releases have included the replacement
+  extension for this, the WikiEditor extension aka "the 2010 wikitext editor",
+  for many years now. As part of this, several parts of MediaWiki have been
+  removed or simplified:
+  * The user option 'showtoolbar' (shown as "Show edit toolbar") is no longer
+    available; if an extension adds a toolbar via the EditPageBeforeEditToolbar
+    hook, it will be shown; extensions should provide a specific user preference
+    to disable themselves as needed.
+  * The public methods Language::getImageFile() and ::getImageFiles(), and the
+    related specification of $imageFiles within individual languages' code file,
+    as well as the referenced static media assets, all of which were only used
+    inside MediaWiki itself for providing the icons for the old toolbar, have
+    been removed without explicit deprecation.
+  * The internal ResourceLoader module "mediawiki.toolbar", which is unused
+    except by MediaWiki itself and back-compatibility code, has been removed.
+  * The internal ResourceLoaderEditToolbarModule class has been removed.
 
 === Deprecations in 1.32 ===
 * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit
index 3e6b4a2..125216b 100644 (file)
@@ -1211,7 +1211,6 @@ $wgAutoloadLocalClasses = [
        'ResourceLoader' => __DIR__ . '/includes/resourceloader/ResourceLoader.php',
        'ResourceLoaderClientHtml' => __DIR__ . '/includes/resourceloader/ResourceLoaderClientHtml.php',
        'ResourceLoaderContext' => __DIR__ . '/includes/resourceloader/ResourceLoaderContext.php',
-       'ResourceLoaderEditToolbarModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderEditToolbarModule.php',
        'ResourceLoaderFileModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderFileModule.php',
        'ResourceLoaderFilePath' => __DIR__ . '/includes/resourceloader/ResourceLoaderFilePath.php',
        'ResourceLoaderForeignApiModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderForeignApiModule.php',
index fd7b300..5105cee 100644 (file)
@@ -1471,11 +1471,10 @@ textarea in the edit form.
 &$buttons: Array of edit buttons "Save", "Preview", "Live", and "Diff"
 &$tabindex: HTML tabindex of the last edit check/button
 
-'EditPageBeforeEditToolbar': Allows modifying the edit toolbar above the
-textarea in the edit form.
-Hook subscribers can return false to avoid the default toolbar code being
-loaded.
-&$toolbar: The toolbar HTML
+'EditPageBeforeEditToolbar': Allow adding an edit toolbar above the textarea in
+the edit form.
+&$toolbar: The toolbar HTML, initially an empty `<div id="toolbar"></div>`
+Hook subscribers can return false to have no toolbar HTML be loaded.
 
 'EditPageCopyrightWarning': Allow for site and per-namespace customization of
 contribution/copyright notice.
index 6a1ed92..4433461 100644 (file)
@@ -4887,7 +4887,6 @@ $wgDefaultUserOptions = [
        'rows' => 25, // @deprecated since 1.29 No longer used in core
        'showhiddencats' => 0,
        'shownumberswatching' => 1,
-       'showtoolbar' => 1,
        'skin' => false,
        'stubthreshold' => 0,
        'thumbsize' => 5,
index 7143c3f..bb4243a 100644 (file)
@@ -2479,13 +2479,6 @@ ERROR;
                $out->addModuleStyles( 'mediawiki.editfont.styles' );
 
                $user = $this->context->getUser();
-               if ( $user->getOption( 'showtoolbar' ) ) {
-                       // The addition of default buttons is handled by getEditToolbar() which
-                       // has its own dependency on this module. The call here ensures the module
-                       // is loaded in time (it has position "top") for other modules to register
-                       // buttons (e.g. extensions, gadgets, user scripts).
-                       $out->addModules( 'mediawiki.toolbar' );
-               }
 
                if ( $user->getOption( 'uselivepreview' ) ) {
                        $out->addModules( 'mediawiki.action.edit.preview' );
@@ -2788,13 +2781,8 @@ ERROR;
 
                $out->addHTML( $this->editFormTextTop );
 
-               $showToolbar = true;
                if ( $this->wasDeletedSinceLastEdit() ) {
-                       if ( $this->formtype == 'save' ) {
-                               // Hide the toolbar and edit area, user can click preview to get it back
-                               // Add an confirmation checkbox and explanation.
-                               $showToolbar = false;
-                       } else {
+                       if ( $this->formtype !== 'save' ) {
                                $out->wrapWikiMsg( "<div class='error mw-deleted-while-editing'>\n$1\n</div>",
                                        'deletedwhileediting' );
                        }
@@ -2932,7 +2920,7 @@ ERROR;
                        $out->addHTML( $editConflictHelper->getEditFormHtmlBeforeContent() );
                }
 
-               if ( !$this->mTitle->isUserConfigPage() && $showToolbar && $user->getOption( 'showtoolbar' ) ) {
+               if ( !$this->mTitle->isUserConfigPage() ) {
                        $out->addHTML( self::getEditToolbar( $this->mTitle ) );
                }
 
@@ -4088,145 +4076,20 @@ ERROR;
        }
 
        /**
-        * Shows a bulletin board style toolbar for common editing functions.
-        * It can be disabled in the user preferences.
+        * Allow extensions to provide a toolbar.
         *
         * @param Title|null $title Title object for the page being edited (optional)
-        * @return string
+        * @return string|null
         */
        public static function getEditToolbar( $title = null ) {
-               global $wgOut, $wgEnableUploads, $wgForeignFileRepos;
-
-               $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos );
-               $showSignature = true;
-               if ( $title ) {
-                       $showSignature = MWNamespace::wantSignatures( $title->getNamespace() );
-               }
-
-               $contLang = MediaWikiServices::getInstance()->getContentLanguage();
-
-               /**
-                * $toolarray is an array of arrays each of which includes the
-                * opening tag, the closing tag, optionally a sample text that is
-                * inserted between the two when no selection is highlighted
-                * and.  The tip text is shown when the user moves the mouse
-                * over the button.
-                *
-                * Images are defined in ResourceLoaderEditToolbarModule.
-                */
-               $toolarray = [
-                       [
-                               'id'     => 'mw-editbutton-bold',
-                               'open'   => '\'\'\'',
-                               'close'  => '\'\'\'',
-                               'sample' => wfMessage( 'bold_sample' )->text(),
-                               'tip'    => wfMessage( 'bold_tip' )->text(),
-                       ],
-                       [
-                               'id'     => 'mw-editbutton-italic',
-                               'open'   => '\'\'',
-                               'close'  => '\'\'',
-                               'sample' => wfMessage( 'italic_sample' )->text(),
-                               'tip'    => wfMessage( 'italic_tip' )->text(),
-                       ],
-                       [
-                               'id'     => 'mw-editbutton-link',
-                               'open'   => '[[',
-                               'close'  => ']]',
-                               'sample' => wfMessage( 'link_sample' )->text(),
-                               'tip'    => wfMessage( 'link_tip' )->text(),
-                       ],
-                       [
-                               'id'     => 'mw-editbutton-extlink',
-                               'open'   => '[',
-                               'close'  => ']',
-                               'sample' => wfMessage( 'extlink_sample' )->text(),
-                               'tip'    => wfMessage( 'extlink_tip' )->text(),
-                       ],
-                       [
-                               'id'     => 'mw-editbutton-headline',
-                               'open'   => "\n== ",
-                               'close'  => " ==\n",
-                               'sample' => wfMessage( 'headline_sample' )->text(),
-                               'tip'    => wfMessage( 'headline_tip' )->text(),
-                       ],
-                       $imagesAvailable ? [
-                               'id'     => 'mw-editbutton-image',
-                               'open'   => '[[' . $contLang->getNsText( NS_FILE ) . ':',
-                               'close'  => ']]',
-                               'sample' => wfMessage( 'image_sample' )->text(),
-                               'tip'    => wfMessage( 'image_tip' )->text(),
-                       ] : false,
-                       $imagesAvailable ? [
-                               'id'     => 'mw-editbutton-media',
-                               'open'   => '[[' . $contLang->getNsText( NS_MEDIA ) . ':',
-                               'close'  => ']]',
-                               'sample' => wfMessage( 'media_sample' )->text(),
-                               'tip'    => wfMessage( 'media_tip' )->text(),
-                       ] : false,
-                       [
-                               'id'     => 'mw-editbutton-nowiki',
-                               'open'   => "<nowiki>",
-                               'close'  => "</nowiki>",
-                               'sample' => wfMessage( 'nowiki_sample' )->text(),
-                               'tip'    => wfMessage( 'nowiki_tip' )->text(),
-                       ],
-                       $showSignature ? [
-                               'id'     => 'mw-editbutton-signature',
-                               'open'   => wfMessage( 'sig-text', '~~~~' )->inContentLanguage()->text(),
-                               'close'  => '',
-                               'sample' => '',
-                               'tip'    => wfMessage( 'sig_tip' )->text(),
-                       ] : false,
-                       [
-                               'id'     => 'mw-editbutton-hr',
-                               'open'   => "\n----\n",
-                               'close'  => '',
-                               'sample' => '',
-                               'tip'    => wfMessage( 'hr_tip' )->text(),
-                       ]
-               ];
-
-               $script = '';
-               foreach ( $toolarray as $tool ) {
-                       if ( !$tool ) {
-                               continue;
-                       }
-
-                       $params = [
-                               // Images are defined in ResourceLoaderEditToolbarModule
-                               false,
-                               // Note that we use the tip both for the ALT tag and the TITLE tag of the image.
-                               // Older browsers show a "speedtip" type message only for ALT.
-                               // Ideally these should be different, realistically they
-                               // probably don't need to be.
-                               $tool['tip'],
-                               $tool['open'],
-                               $tool['close'],
-                               $tool['sample'],
-                               $tool['id'],
-                       ];
+               $startingToolbar = '<div id="toolbar"></div>';
+               $toolbar = $startingToolbar;
 
-                       $script .= Xml::encodeJsCall(
-                               'mw.toolbar.addButton',
-                               $params,
-                               ResourceLoader::inDebugMode()
-                       );
-               }
-
-               $toolbar = '<div id="toolbar"></div>';
-
-               if ( Hooks::run( 'EditPageBeforeEditToolbar', [ &$toolbar ] ) ) {
-                       // Only add the old toolbar cruft to the page payload if the toolbar has not
-                       // been over-written by a hook caller
-                       $nonce = $wgOut->getCSPNonce();
-                       $wgOut->addScript( Html::inlineScript(
-                               ResourceLoader::makeInlineCodeWithModule( 'mediawiki.toolbar', $script ),
-                               $nonce
-                       ) );
+               if ( !Hooks::run( 'EditPageBeforeEditToolbar', [ &$toolbar ] ) ) {
+                       return null;
                };
-
-               return $toolbar;
+               // Don't add a pointless `<div>` to the page unless a hook caller populated it
+               return ( $toolbar === $startingToolbar ) ? null : $toolbar;
        }
 
        /**
diff --git a/includes/resourceloader/ResourceLoaderEditToolbarModule.php b/includes/resourceloader/ResourceLoaderEditToolbarModule.php
deleted file mode 100644 (file)
index 2a6af71..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * ResourceLoader module for the edit toolbar.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-/**
- * ResourceLoader module for the edit toolbar.
- *
- * @since 1.24
- */
-class ResourceLoaderEditToolbarModule extends ResourceLoaderFileModule {
-       /**
-        * Get language-specific LESS variables for this module.
-        *
-        * @since 1.27
-        * @param ResourceLoaderContext $context
-        * @return array
-        */
-       protected function getLessVars( ResourceLoaderContext $context ) {
-               $vars = parent::getLessVars( $context );
-               $language = Language::factory( $context->getLanguage() );
-               foreach ( $language->getImageFiles() as $key => $value ) {
-                       $vars[$key] = CSSMin::serializeStringValue( $value );
-               }
-               return $vars;
-       }
-}
index fb78f13..eabd0fe 100644 (file)
@@ -814,22 +814,6 @@ class Language {
                return self::$dataCache->getItem( $this->mCode, 'datePreferenceMigrationMap' );
        }
 
-       /**
-        * @param string $image
-        * @return array|null
-        */
-       function getImageFile( $image ) {
-               return self::$dataCache->getSubitem( $this->mCode, 'imageFiles', $image );
-       }
-
-       /**
-        * @return array
-        * @since 1.24
-        */
-       public function getImageFiles() {
-               return self::$dataCache->getItem( $this->mCode, 'imageFiles' );
-       }
-
        /**
         * @return array
         */
index ea63054..3929b8d 100644 (file)
@@ -11,7 +11,6 @@
        "tog-extendwatchlist": "Expand watchlist to show all changes, not just the most recent",
        "tog-usenewrc": "Group changes by page in recent changes and watchlist",
        "tog-numberheadings": "Auto-number headings",
-       "tog-showtoolbar": "Show edit toolbar",
        "tog-editondblclick": "Edit pages on double click",
        "tog-editsectiononrightclick": "Enable section editing by right clicking on section titles",
        "tog-watchcreations": "Add pages I create and files I upload to my watchlist",
index a17cfca..9cb4de0 100644 (file)
        "tog-extendwatchlist": "[[Special:Preferences]], tab 'Watchlist'. Offers user to show all applicable changes in watchlist (by default only the last change to a page on the watchlist is shown). {{Gender}}",
        "tog-usenewrc": "{{Gender}}\nUsed as label for the checkbox in [[Special:Preferences]], tab \"Recent changes\".\n\nOffers user to use alternative representation of [[Special:RecentChanges]] and watchlist.",
        "tog-numberheadings": "[[Special:Preferences]], tab 'Misc'. Offers numbered headings on content pages to user. {{Gender}}",
-       "tog-showtoolbar": "{{Gender}}\n[[Special:Preferences]], tab 'Edit'. Offers user to show edit toolbar in page edit screen.\n\nThis is the toolbar: [[Image:Toolbar.png]]",
        "tog-editondblclick": "{{Gender}}\n[[Special:Preferences]], tab 'Edit'. Offers user to open edit page on double click.",
        "tog-editsectiononrightclick": "{{Gender}}\n[[Special:Preferences]], tab 'Edit'. Offers user to edit a section by clicking on a section title.",
        "tog-watchcreations": "[[Special:Preferences]], tab 'Watchlist'. Offers user to add created pages to watchlist. {{Gender}}",
index 60be21c..3a3529a 100644 (file)
@@ -439,11 +439,3 @@ $specialPageAliases = [
  * Arabic trails too.
  */
 $linkTrail = '/^([a-zء-ي]+)(.*)$/sDu';
-
-$imageFiles = [
-       'button-bold'     => 'ar/button_bold.png',
-       'button-italic'   => 'ar/button_italic.png',
-       'button-link'     => 'ar/button_link.png',
-       'button-headline' => 'ar/button_headline.png',
-       'button-nowiki'   => 'ar/button_nowiki.png',
-];
index 00295fe..21bd60c 100644 (file)
@@ -239,9 +239,3 @@ $separatorTransformTable = [
 $minimumGroupingDigits = 2;
 
 $linkTrail = '/^([абвгґджзеёжзійклмнопрстуўфхцчшыьэюяćčłńśšŭźža-z]+)(.*)$/sDu';
-
-$imageFiles = [
-       'button-bold'     => 'be-tarask/button_bold.png',
-       'button-italic'   => 'be-tarask/button_italic.png',
-       'button-link'     => 'be-tarask/button_link.png',
-];
index 5227eba..d3167cc 100644 (file)
@@ -352,8 +352,3 @@ $bookstoreList = [
 
 $separatorTransformTable = [ ',' => '.', '.' => ',' ];
 $linkTrail = '/^([äöüßa-z]+)(.*)$/sDu';
-
-$imageFiles = [
-       'button-bold'     => 'de/button_bold.png',
-       'button-italic'   => 'de/button_italic.png',
-];
index 7a7370f..4c078a6 100644 (file)
@@ -531,23 +531,6 @@ $linkTrail = '/^([a-z]+)(.*)$/sD';
  */
 $linkPrefixCharset = 'a-zA-Z\\x{80}-\\x{10ffff}';
 
-/**
- * List of filenames for some ui images that can be overridden per language
- * basis if needed.
- */
-$imageFiles = [
-       'button-bold'     => 'en/button_bold.png',
-       'button-italic'   => 'en/button_italic.png',
-       'button-link'     => 'en/button_link.png',
-       'button-extlink'  => 'en/button_extlink.png',
-       'button-headline' => 'en/button_headline.png',
-       'button-image'    => 'en/button_image.png',
-       'button-media'    => 'en/button_media.png',
-       'button-nowiki'   => 'en/button_nowiki.png',
-       'button-sig'      => 'en/button_sig.png',
-       'button-hr'       => 'en/button_hr.png',
-];
-
 /**
  * A list of messages to preload for each request.
  * Here we add messages that are needed for a typical anonymous parser cache hit.
index bda468c..a78233f 100644 (file)
@@ -412,11 +412,3 @@ $dateFormats = [
 # Harakat are intentionally not included in the linkTrail. Their addition should
 # take place after enough tests.
 $linkTrail = "/^([ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهیآأئؤة‌]+)(.*)$/sDu";
-
-$imageFiles = [
-       'button-bold'     => 'fa/button_bold.png',
-       'button-italic'   => 'fa/button_italic.png',
-       'button-link'     => 'fa/button_link.png',
-       'button-headline' => 'fa/button_headline.png',
-       'button-nowiki'   => 'fa/button_nowiki.png',
-];
index c96c94d..0687a42 100644 (file)
@@ -201,7 +201,3 @@ $magicWords = [
        'language'                  => [ '0', '#SHPROOCH:', '#SPROCH:', '#SPRACHE:', '#LANGUAGE:' ],
        'hiddencat'                 => [ '1', '__VERSHTOCHE_SAACHJRUPP__', '__VERSTECKTE_KATEGORIE__', '__WARTUNGSKATEGORIE__', '__HIDDENCAT__' ],
 ];
-
-$imageFiles = [
-       'button-italic'   => 'ksh/button_italic.png',
-];
index b513648..fbd8096 100644 (file)
@@ -425,10 +425,4 @@ $minimumGroupingDigits = 2;
 $fallback8bitEncoding = 'windows-1251';
 $linkPrefixExtension = false;
 
-$imageFiles = [
-       'button-bold'   => 'ru/button_bold.png',
-       'button-italic' => 'ru/button_italic.png',
-       'button-link'   => 'ru/button_link.png',
-];
-
 $linkTrail = '/^([a-zабвгдеёжзийклмнопрстуфхцчшщъыьэюя]+)(.*)$/sDu';
index a0177b1..0345ad6 100644 (file)
@@ -3697,7 +3697,6 @@ showredirs
 showreviewed
 showsizediff
 showtoc
-showtoolbar
 showunreviewed
 shtml
 si
index 7ff972e..54c1d38 100644 (file)
                                        "mw.visibleTimeout"
                                ]
                        },
-                       {
-                               "name": "Actions",
-                               "classes": ["mw.toolbar"]
-                       },
                        {
                                "name": "API",
                                "classes": ["mw.Api*", "mw.ForeignApi*"]
index 9603830..7d2ed14 100644 (file)
@@ -1394,12 +1394,6 @@ return [
                'dependencies' => 'jquery.cookie',
                'targets' => [ 'desktop', 'mobile' ],
        ],
-       'mediawiki.toolbar' => [
-               'class' => ResourceLoaderEditToolbarModule::class,
-               'scripts' => 'resources/src/mediawiki.toolbar/toolbar.js',
-               'styles' => 'resources/src/mediawiki.toolbar/toolbar.less',
-               'dependencies' => 'jquery.textSelection',
-       ],
        'mediawiki.experiments' => [
                'scripts' => 'resources/src/mediawiki.experiments.js',
                'targets' => [ 'desktop', 'mobile' ],
diff --git a/resources/src/mediawiki.toolbar/images/ar/button_bold.png b/resources/src/mediawiki.toolbar/images/ar/button_bold.png
deleted file mode 100644 (file)
index 50e2ff0..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ar/button_bold.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ar/button_headline.png b/resources/src/mediawiki.toolbar/images/ar/button_headline.png
deleted file mode 100644 (file)
index 2e3e781..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ar/button_headline.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ar/button_italic.png b/resources/src/mediawiki.toolbar/images/ar/button_italic.png
deleted file mode 100644 (file)
index 6b54fb6..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ar/button_italic.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ar/button_link.png b/resources/src/mediawiki.toolbar/images/ar/button_link.png
deleted file mode 100644 (file)
index 4434e7f..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ar/button_link.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ar/button_nowiki.png b/resources/src/mediawiki.toolbar/images/ar/button_nowiki.png
deleted file mode 100644 (file)
index c9378de..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ar/button_nowiki.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/be-tarask/button_bold.png b/resources/src/mediawiki.toolbar/images/be-tarask/button_bold.png
deleted file mode 100644 (file)
index df6700d..0000000
Binary files a/resources/src/mediawiki.toolbar/images/be-tarask/button_bold.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/be-tarask/button_italic.png b/resources/src/mediawiki.toolbar/images/be-tarask/button_italic.png
deleted file mode 100644 (file)
index 872c00f..0000000
Binary files a/resources/src/mediawiki.toolbar/images/be-tarask/button_italic.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/be-tarask/button_link.png b/resources/src/mediawiki.toolbar/images/be-tarask/button_link.png
deleted file mode 100644 (file)
index d3dd88e..0000000
Binary files a/resources/src/mediawiki.toolbar/images/be-tarask/button_link.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/de/button_bold.png b/resources/src/mediawiki.toolbar/images/de/button_bold.png
deleted file mode 100644 (file)
index 8e6b389..0000000
Binary files a/resources/src/mediawiki.toolbar/images/de/button_bold.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/de/button_italic.png b/resources/src/mediawiki.toolbar/images/de/button_italic.png
deleted file mode 100644 (file)
index 5e3cd11..0000000
Binary files a/resources/src/mediawiki.toolbar/images/de/button_italic.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_bold.png b/resources/src/mediawiki.toolbar/images/en/button_bold.png
deleted file mode 100644 (file)
index e582fb1..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_bold.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_extlink.png b/resources/src/mediawiki.toolbar/images/en/button_extlink.png
deleted file mode 100644 (file)
index 458943c..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_extlink.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_headline.png b/resources/src/mediawiki.toolbar/images/en/button_headline.png
deleted file mode 100644 (file)
index 7d64a16..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_headline.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_hr.png b/resources/src/mediawiki.toolbar/images/en/button_hr.png
deleted file mode 100644 (file)
index 47e1ca4..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_hr.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_image.png b/resources/src/mediawiki.toolbar/images/en/button_image.png
deleted file mode 100644 (file)
index 6919296..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_image.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_italic.png b/resources/src/mediawiki.toolbar/images/en/button_italic.png
deleted file mode 100644 (file)
index 820efe2..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_italic.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_link.png b/resources/src/mediawiki.toolbar/images/en/button_link.png
deleted file mode 100644 (file)
index 5dd362c..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_link.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_media.png b/resources/src/mediawiki.toolbar/images/en/button_media.png
deleted file mode 100644 (file)
index 80c3156..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_media.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_nowiki.png b/resources/src/mediawiki.toolbar/images/en/button_nowiki.png
deleted file mode 100644 (file)
index 05a977a..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_nowiki.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/en/button_sig.png b/resources/src/mediawiki.toolbar/images/en/button_sig.png
deleted file mode 100644 (file)
index 2cbcc0b..0000000
Binary files a/resources/src/mediawiki.toolbar/images/en/button_sig.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/fa/button_bold.png b/resources/src/mediawiki.toolbar/images/fa/button_bold.png
deleted file mode 100644 (file)
index 5489343..0000000
Binary files a/resources/src/mediawiki.toolbar/images/fa/button_bold.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/fa/button_headline.png b/resources/src/mediawiki.toolbar/images/fa/button_headline.png
deleted file mode 100644 (file)
index 4d48a5d..0000000
Binary files a/resources/src/mediawiki.toolbar/images/fa/button_headline.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/fa/button_italic.png b/resources/src/mediawiki.toolbar/images/fa/button_italic.png
deleted file mode 100644 (file)
index 41098c7..0000000
Binary files a/resources/src/mediawiki.toolbar/images/fa/button_italic.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/fa/button_link.png b/resources/src/mediawiki.toolbar/images/fa/button_link.png
deleted file mode 100644 (file)
index 8c2d85a..0000000
Binary files a/resources/src/mediawiki.toolbar/images/fa/button_link.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/fa/button_nowiki.png b/resources/src/mediawiki.toolbar/images/fa/button_nowiki.png
deleted file mode 100644 (file)
index c9378de..0000000
Binary files a/resources/src/mediawiki.toolbar/images/fa/button_nowiki.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ksh/LICENSE b/resources/src/mediawiki.toolbar/images/ksh/LICENSE
deleted file mode 100644 (file)
index 640bbff..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-button_italic.png
--------------------
-Source : https://commons.wikimedia.org/wiki/Image:Button_S_italic.png
-License: Public domain
-Author : Purodha Blissenbach, https://ksh.wikipedia.org/wiki/User:Purodha
-
diff --git a/resources/src/mediawiki.toolbar/images/ksh/button_italic.png b/resources/src/mediawiki.toolbar/images/ksh/button_italic.png
deleted file mode 100644 (file)
index 34268d9..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ksh/button_italic.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ru/LICENSE b/resources/src/mediawiki.toolbar/images/ru/LICENSE
deleted file mode 100644 (file)
index 572864b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-button_bold.png
----------------
-Source : https://commons.wikimedia.org/wiki/File:Button_bold_ukr.png
-License: Public domain
-Author : Alexey Belomoev
-
-button_italic.png
-------------------------
-Source : https://commons.wikimedia.org/wiki/File:Button_italic_ukr.png
-License: Public domain
-Author : Alexey Belomoev
-
-button_link.png
------------------
-Source : https://commons.wikimedia.org/wiki/File:Button_internal_link_ukr.png
-License: GPL
-Author : Saproj, Erik Möller
diff --git a/resources/src/mediawiki.toolbar/images/ru/button_bold.png b/resources/src/mediawiki.toolbar/images/ru/button_bold.png
deleted file mode 100644 (file)
index a7dceb1..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ru/button_bold.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ru/button_italic.png b/resources/src/mediawiki.toolbar/images/ru/button_italic.png
deleted file mode 100644 (file)
index 44a0a74..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ru/button_italic.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/images/ru/button_link.png b/resources/src/mediawiki.toolbar/images/ru/button_link.png
deleted file mode 100644 (file)
index 36b9059..0000000
Binary files a/resources/src/mediawiki.toolbar/images/ru/button_link.png and /dev/null differ
diff --git a/resources/src/mediawiki.toolbar/toolbar.js b/resources/src/mediawiki.toolbar/toolbar.js
deleted file mode 100644 (file)
index be49d26..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/**
- * Interface for the classic edit toolbar.
- *
- * @class mw.toolbar
- * @singleton
- */
-( function () {
-       var toolbar, isReady, $toolbar, queue, slice, $currentFocused;
-
-       /**
-        * Internal helper that does the actual insertion of the button into the toolbar.
-        *
-        * For backwards-compatibility, passing `imageFile`, `speedTip`, `tagOpen`, `tagClose`,
-        * `sampleText` and `imageId` as separate arguments (in this order) is also supported.
-        *
-        * @private
-        *
-        * @param {Object} button Object with the following properties.
-        *  You are required to provide *either* the `onClick` parameter, or the three parameters
-        *  `tagOpen`, `tagClose` and `sampleText`, but not both (they're mutually exclusive).
-        * @param {string} [button.imageFile] Image to use for the button.
-        * @param {string} button.speedTip Tooltip displayed when user mouses over the button.
-        * @param {Function} [button.onClick] Function to be executed when the button is clicked.
-        * @param {string} [button.tagOpen]
-        * @param {string} [button.tagClose]
-        * @param {string} [button.sampleText] Alternative to `onClick`. `tagOpen`, `tagClose` and
-        *  `sampleText` together provide the markup that should be inserted into page text at
-        *  current cursor position.
-        * @param {string} [button.imageId] `id` attribute of the button HTML element. Can be
-        *  used to define the image with CSS if it's not provided as `imageFile`.
-        * @param {string} [speedTip]
-        * @param {string} [tagOpen]
-        * @param {string} [tagClose]
-        * @param {string} [sampleText]
-        * @param {string} [imageId]
-        */
-       function insertButton( button, speedTip, tagOpen, tagClose, sampleText, imageId ) {
-               var $button;
-
-               // Backwards compatibility
-               if ( typeof button !== 'object' ) {
-                       button = {
-                               imageFile: button,
-                               speedTip: speedTip,
-                               tagOpen: tagOpen,
-                               tagClose: tagClose,
-                               sampleText: sampleText,
-                               imageId: imageId
-                       };
-               }
-
-               if ( button.imageFile ) {
-                       $button = $( '<img>' ).attr( {
-                               src: button.imageFile,
-                               alt: button.speedTip,
-                               title: button.speedTip,
-                               id: button.imageId || undefined,
-                               'class': 'mw-toolbar-editbutton'
-                       } );
-               } else {
-                       $button = $( '<div>' ).attr( {
-                               title: button.speedTip,
-                               id: button.imageId || undefined,
-                               'class': 'mw-toolbar-editbutton'
-                       } );
-               }
-
-               $button.click( function ( e ) {
-                       if ( button.onClick !== undefined ) {
-                               button.onClick( e );
-                       } else {
-                               toolbar.insertTags( button.tagOpen, button.tagClose, button.sampleText );
-                       }
-
-                       return false;
-               } );
-
-               $toolbar.append( $button );
-       }
-
-       isReady = false;
-       $toolbar = false;
-
-       /**
-        * @private
-        * @property {Array}
-        * Contains button objects (and for backwards compatibility, it can
-        * also contains an arguments array for insertButton).
-        */
-       queue = [];
-       slice = queue.slice;
-
-       toolbar = {
-
-               /**
-                * Add buttons to the toolbar.
-                *
-                * Takes care of race conditions and time-based dependencies by placing buttons in a queue if
-                * this method is called before the toolbar is created.
-                *
-                * For backwards-compatibility, passing `imageFile`, `speedTip`, `tagOpen`, `tagClose`,
-                * `sampleText` and `imageId` as separate arguments (in this order) is also supported.
-                *
-                * @inheritdoc #insertButton
-                */
-               addButton: function () {
-                       if ( isReady ) {
-                               insertButton.apply( toolbar, arguments );
-                       } else {
-                               // Convert arguments list to array
-                               queue.push( slice.call( arguments ) );
-                       }
-               },
-
-               /**
-                * Add multiple buttons to the toolbar (see also #addButton).
-                *
-                * Example usage:
-                *
-                *     addButtons( [ { .. }, { .. }, { .. } ] );
-                *     addButtons( { .. }, { .. } );
-                *
-                * @param {...Object|Array} [buttons] An array of button objects or the first
-                *  button object in a list of variadic arguments.
-                */
-               addButtons: function ( buttons ) {
-                       if ( !Array.isArray( buttons ) ) {
-                               buttons = slice.call( arguments );
-                       }
-                       if ( isReady ) {
-                               buttons.forEach( function ( button ) {
-                                       insertButton( button );
-                               } );
-                       } else {
-                               // Push each button into the queue
-                               queue.push.apply( queue, buttons );
-                       }
-               },
-
-               /**
-                * Apply tagOpen/tagClose to selection in currently focused textarea.
-                *
-                * Uses `sampleText` if selection is empty.
-                *
-                * @param {string} tagOpen
-                * @param {string} tagClose
-                * @param {string} sampleText
-                */
-               insertTags: function ( tagOpen, tagClose, sampleText ) {
-                       if ( $currentFocused && $currentFocused.length ) {
-                               $currentFocused.textSelection(
-                                       'encapsulateSelection', {
-                                               pre: tagOpen,
-                                               peri: sampleText,
-                                               post: tagClose
-                                       }
-                               );
-                       }
-               }
-       };
-
-       // Legacy (for compatibility with the code previously in skins/common.edit.js)
-       mw.log.deprecate( window, 'addButton', toolbar.addButton, 'Use mw.toolbar.addButton instead.' );
-       mw.log.deprecate( window, 'insertTags', toolbar.insertTags, 'Use mw.toolbar.insertTags instead.' );
-
-       // For backwards compatibility. Used to be called from EditPage.php, maybe other places as well.
-       toolbar.init = $.noop;
-
-       // Expose API publicly
-       // @deprecated since MW 1.29
-       mw.log.deprecate( mw, 'toolbar', toolbar, null, 'mw.toolbar' );
-
-       $( function () {
-               var i, button;
-
-               // Used to determine where to insert tags
-               $currentFocused = $( '#wpTextbox1' );
-
-               // Populate the selector cache for $toolbar
-               $toolbar = $( '#toolbar' );
-
-               for ( i = 0; i < queue.length; i++ ) {
-                       button = queue[ i ];
-                       if ( Array.isArray( button ) ) {
-                               // Forwarded arguments array from mw.toolbar.addButton
-                               insertButton.apply( toolbar, button );
-                       } else {
-                               // Raw object from mw.toolbar.addButtons
-                               insertButton( button );
-                       }
-               }
-
-               // Clear queue
-               queue.length = 0;
-
-               // This causes further calls to addButton to go to insertion directly
-               // instead of to the queue.
-               // It is important that this is after the one and only loop through
-               // the queue
-               isReady = true;
-
-               // Apply to dynamically created textboxes as well as normal ones
-               $( document ).on( 'focus', 'textarea, input:text', function () {
-                       $currentFocused = $( this );
-               } );
-       } );
-
-}() );
diff --git a/resources/src/mediawiki.toolbar/toolbar.less b/resources/src/mediawiki.toolbar/toolbar.less
deleted file mode 100644 (file)
index 93ea294..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-@import 'mediawiki.mixins';
-
-#mw-editbutton-bold {
-       .background-image('images/@{button-bold}');
-}
-
-#mw-editbutton-italic {
-       .background-image('images/@{button-italic}');
-}
-
-#mw-editbutton-link {
-       .background-image('images/@{button-link}');
-}
-
-#mw-editbutton-extlink {
-       .background-image('images/@{button-extlink}');
-}
-
-#mw-editbutton-headline {
-       .background-image('images/@{button-headline}');
-}
-
-#mw-editbutton-image {
-       .background-image('images/@{button-image}');
-}
-
-#mw-editbutton-media {
-       .background-image('images/@{button-media}');
-}
-
-#mw-editbutton-nowiki {
-       .background-image('images/@{button-nowiki}');
-}
-
-// Who decided to make only this single one different than the name of the data item?
-#mw-editbutton-signature {
-       .background-image('images/@{button-sig}');
-}
-
-#mw-editbutton-hr {
-       .background-image('images/@{button-hr}');
-}