Commit graph

672 commits

Author SHA1 Message Date
Ed Sanders 344da9de80 Move var declarations inline
Change-Id: I841ed46dfde9a6e2a5927e49ac3383d6e17bda66
2021-06-15 15:45:13 +01:00
Ed Sanders b3dbb96cf3 Update stylelint-config-wikimedia
Change-Id: Ib7c44812e8adc159ff2c1d634712e05cc8511078
2021-06-15 15:14:04 +01:00
Alexander Vorwerk cdb9388b93 Fix call to renamed var
The var 'module' got renamed to 'm' in
I57b11c6b4c6e67bb38bb67a93b06d6d1d3009933. This patch fixes the
call to it.

Bug: T284716
Change-Id: I57b7a5fd4a8f2fe2fa98ab5fc41c5bd2500f3a67
2021-06-10 11:11:44 +02:00
Umherirrender fbcc93d98c Avoid "Cannot read property 'top' of undefined" in toolbar
Can happen when using up and down keys without selection

Bug: T282607
Change-Id: Ibf7b4711fe7d0ebc14638a77770acff9149a9d7a
2021-06-01 22:30:15 +02:00
Ed Sanders 137395538e Fix eslint warnings
Change-Id: I57b11c6b4c6e67bb38bb67a93b06d6d1d3009933
2021-05-23 15:49:49 +01:00
David Lynch cb1c5d49aa Log whether Javascript was supported on saveSuccess
Adds a hidden field to the edit page form, with JS that will set its
value. Server-side then checks for that value and logs whether it was
correctly set.

Bug: T263505
Change-Id: I8be06385aa6d97e5536cfc252d34297e1c000a32
2021-04-30 17:45:40 -05:00
Umherirrender 54af531265 Remove suggest param from opensearch api request
Deprecated in 1.35 (Iec572012de171d02871b8dc3207d2b34d17bf9ef)

Change-Id: Ic9cca2ff6f7372a64a216c65c408454dc2dc7cbb
2021-04-28 19:49:50 +02:00
Umherirrender 3f95a63650 Swap new mw.Title to mw.Title.newFromText to handle invalid input
Avoid failure on invalid user input (like invalid tiles with <>)

Bug: T279298
Change-Id: Iaeb6ca3ab232bbb206f05acfa5c0a14e16945ffc
2021-04-28 01:21:58 +02:00
jdlrobson 9ac850b28a Dialog data attribute action is a DOMElement
After looking more closely at the code, I noticed that
dialogaction is set to e.target or this which is a
DOMElement, not a jQuery Object, thus it doesn't have
the trigger method which explains the error.

Follow up to 760f023f2

Bug: T261529
Change-Id: Ie5f58e33ad385f2abae19264bb2c3cd34a721788
2021-02-25 08:12:16 -08:00
jdlrobson 760f023f21 TypeError: $button.trigger is not a function
This error is generating a large amount of logspam.
Add a check to avoid it, and DRY up.

The issue is caused by line 1182 setting dialogaction to false when
a dialog is closed. Presumably references to this data attribute
remain.

Bug: T261529
Change-Id: Ie75f737980dfcbcc4829def1e5a6894262d73b31
2021-02-10 21:36:27 +00:00
jenkins-bot ef5c29c5f1 Merge "Log the DiscussionTools a/b test bucket for relevant schemas" 2021-02-01 17:08:45 +00:00
David Lynch e052e46f94 Log the DiscussionTools a/b test bucket for relevant schemas
If someone is enrolled the DT a/b test, we want to know about their
editing here as well.

Bug: T273096
Change-Id: If2bb04011c8ca54e8c7ffd073e21bec45e92460c
2021-01-29 20:56:14 -06:00
Reedy 4dcd3baab0 Use only the first item of various magic words
Bug: T273231
Change-Id: I1f88eb3e043cb95f939a7e38ddaa3e39a49523fa
Follows-Up: Ib03932d3d85a5540bea325f2717da3365756a90e
2021-01-29 02:57:01 +00:00
jenkins-bot 3aa618b801 Merge "Export crude public interface for WikiEditor" 2021-01-27 10:27:05 +00:00
Bartosz Dziewoński d77a69f236 Don't lowercase image caption/alt when prefilling image fields
Judging by the presence of this bug, no one ever uses this feature.

Change-Id: I46a986dd83cf98a8b9f5dcb5bd4c3acb04a6cf5b
2021-01-22 21:23:44 +00:00
Bartosz Dziewoński dc93bf1b37 Parse alternative magic word translations when prefilling image fields
In some languages, image options like 'alt' or 'thumb' can have
multiple synonyms. They were only handled for English (and were
hard-coded).

Change-Id: Ib03932d3d85a5540bea325f2717da3365756a90e
2021-01-22 22:15:16 +01:00
Ammar Abdulhamid ab287ade14 Allow specifying alt-text in File dialog
* Also add expandable help message to explain the alt text field

Bug: T260006
Change-Id: If16ff742d7a8dee4917884e73e9c95bf76350773
2021-01-22 21:37:17 +01:00
Niklas Laxström c10d08d87b Export crude public interface for WikiEditor
Bug: T250862
Change-Id: Iac8778f0d0a0150acc99569d84422bc9817dfcc7
2021-01-21 12:22:52 +00:00
David Lynch fa2b80e22a Edit page normally lacks wgRevisionId, but has form field parentRevId
Bug: T230133
Change-Id: I5e3defe22aee58e36d662ef051ebfb3ff1b64dde
2020-12-21 12:27:46 -06:00
libraryupgrader d3fab1c494 build: Updating npm dependencies
* eslint-config-wikimedia: 0.15.3 → 0.16.2
* grunt-eslint: 22.0.0 → 23.0.0

Change-Id: Icb97167116171aeaa7e5ce17b4da2bb59992a33d
2020-07-17 06:12:18 +00:00
bkudiess-msft 358c587ffb Makes special characters booklet accessible
Bug: T253410
Change-Id: Ic42c3cb437d128ca12d15908bb93e83902d997cb
2020-06-29 19:12:56 +00:00
jenkins-bot 38cc6f1f3f Merge "Add caption when inserting table" 2020-06-17 11:55:00 +00:00
jenkins-bot 17b14f3251 Merge "Update VisualEditorFeatureUse with new fields" 2020-06-10 19:53:46 +00:00
David Lynch 7ab9ac2a73 Update VisualEditorFeatureUse with new fields
Bug: T252925
Change-Id: Id6f3748bfd3865e7bb0e4ef5e882206438063e0f
2020-06-09 15:57:07 -05:00
Bartosz Dziewoński 036b7c28a3 Use jQuery.textSelection API for compat with CodeMirror extension
We were already using it for almost all interactions with the editing
area, except for this code which restores the selection after closing
a dialog.

Bug: T254612
Change-Id: I26d22d9c5d64fe8c861405e65cd4464c349aeac9
2020-06-08 18:45:14 +00:00
bkudiess-msft 44e82ec089 Restores focus after dialog closes
Bug: T253595
Change-Id: I125d6c00239091cb3028818e3b72c212babf10b3
2020-05-28 12:23:14 +00:00
jenkins-bot b38a83c670 Merge "Extend comment on overqualified selector from code example" 2020-05-12 19:22:53 +00:00
Volker E b51d815435 Extend comment on overqualified selector from code example
Change-Id: Ic5d91d862f1ec2e986be3b0a2b95c0427dc7eda3
2020-05-11 22:49:24 -07:00
pcoombe a822d1c197 Add caption when inserting table
Data tables should always include a caption for accessibility reasons.
So add a placeholder caption when using the "insert table" button.

Bug: T252350
Change-Id: I6773e2274007946de516ae34e841f66ad20ebc0c
2020-05-11 11:09:23 +01:00
Ed Sanders 90c0b245fc Move 32px dropdown height to -wikimedia.less
Bug: T251682
Change-Id: I86afcb66b8d5d8fdff4f95944c863b10a1949518
2020-05-03 21:17:03 +01:00
Ed Sanders 8e9d306510 Create a toolbarReady hook for attaching toolbar tools
Using an event introduces a race condition where the extension
adding the listener has to do so before WikiEditor finishes loading.

Change-Id: I5a8dc6f8fd1b1939b5d98307b20ef1fd355cee99
2020-04-21 15:28:40 +01:00
Timo Tijhof 0f24c10873 jquery.wikiEditor: change autoIcon() to no longer append version string
Remove use of mw.loader.getVersion, which I'm planning to remove
from the public API. The only valid use case I found of it (not
in WMF repos) is to check if a module exists, for which one can
use mw.loader.getState() already.

The code path here handles with the 'icon' property of a
WikiEditor "toolbar group tool". In other words, the buttons
you can click in the toolbar to open a dialog or insert markup.

I found two ways to reach this code path:

* For the built-in tools and icons that are part of WikiEditor.
  These are all based on OOUI now and no longer use inline styles
  with background-image etc., they are class-based instead, with
  the URLs and language variants handled server-side by RL.

* For user scripts that register a custom tool and icon.
  To try this, copy snippets to the console on an edit page from
  <https://meta.wikimedia.org/wiki/User:Krinkle/Scripts/InsertWikiEditorButton>

  These pass urls as the 'icon' property and thus don't satisfy
  the hasOwn condition in this code. And even if they did, there'd
  be no reason for the module version to be helpful to the thumbnail
  url the user would have passed.

This line of code has existed with the mw.loader.getVersion() call
since the repository's very first commit in 2010 (9d278e8dee).

The worst that can happen is if there are stil some internal icons
hitting this path, they'll be cached for 1 hour instead of 7 days
(per /w/static.php rules in production). For third parties, there
would be no difference and such static paths have no caching by
default either way (outside WMF).

Change-Id: I6ec29abde0085d04b662b56b5ebcc2bd7fa267f8
2020-04-07 20:55:01 +01:00
jenkins-bot 855a7d73fa Merge "Simplify the CSS definition and extend the clickable area by 4px" 2020-04-07 09:48:15 +00:00
Fomafix b3335607e6 Simplify the CSS definition and extend the clickable area by 4px
Change-Id: I7fd42f647eccc24561474e6e977768bc0d1bfd07
2020-04-05 11:27:50 +02:00
jenkins-bot ce1640bae9 Merge "Localize numbers before passing to mw.msg" 2020-03-30 08:16:56 +00:00
Alexander Jones 884991e4a0 Localize numbers before passing to mw.msg
This commit localizes numbers before passing to mw.msg. This occurs
in two places, the successful replacement count and the error message
where too many cells are used in the table tool. The comment above the
second call was not correct, as the existing message used a substitution.

Bug: T244812
Change-Id: I00f83bd478bc42cb536edceba2bcc9daf0b13b3d
2020-03-27 14:04:27 +00:00
jenkins-bot 52bdc80a21 Merge "Replace arrow variants with CSS transformations" 2020-03-27 07:36:58 +00:00
Ed Sanders ec78f1a2b6 Replace arrow variants with CSS transformations
* Allows us to briefly animate the transition between
  expanded and collapsed
* Remove the left/right-arrows, and just use a single
  down-arrow with rotations.
* Remove the up-arrow used by the dropdown, we don't
  use that elsewhere in WMUI.
* Remove PNG fallback as `transform` works only with IE 9+
  and we're not supporting WikiEditor on Grade C browsers.

Change-Id: I29ab0c35b890689bdea8de5f6bbeef0948483fa5
2020-03-26 16:20:36 -07:00
jenkins-bot d050676356 Merge "Improve accessibility of expandable controls" 2020-03-13 19:36:35 +00:00
Akinwale Alagbe b2222d0afa Improve accessibility of expandable controls
Fixing aria-* attributes to the Heading menu and roles property to 
the menu dropdown items in order to make the element function like an 
ideal menu to screen readers. 

Adding aria-expanded attribute to Expandable panes(Advanced, 
Special Characters and Help) widgets to allow
screen readers announces of the state expandable buttons. 

Bug: T244426
Change-Id: I0cb47afd7f3622ed83a57410086984d9abc9acfd
2020-03-13 19:23:10 +00:00
jenkins-bot 792ef7c8ed Merge "Preload modules of the file upload dialog" 2020-03-13 17:10:36 +00:00
jenkins-bot cc358744f1 Merge "Lazy load the modules for the upload dialog" 2020-03-13 17:10:27 +00:00
jenkins-bot f7b8e34a5c Merge "Fix double escaping" 2020-03-13 15:57:25 +00:00
Fomafix 6ced54bdf6 Increase clickable area of tabs buttons
This makes the clickable area of the tabs buttons like the other
buttons.

Change-Id: I7987aed0627def6b177ef54aa8a787917e9b40f0
2020-03-03 06:48:25 +01:00
Fomafix 9542561b9c Preload modules of the file upload dialog
This prevents a delay when showing the file upload dialog.

Change-Id: I0c29def8e65302078d4fd528abee7c07373803e7
2020-03-03 06:26:10 +01:00
Fomafix 47a7e21216 Lazy load the modules for the upload dialog
This reduces the initial loaded modules.

Also add the dependency on module 'oojs-ui-widgets' because
jquery.wikiEditor.toolbar.js uses OO.ui.ToggleButtonWidget.

Change-Id: I03d0f73fb77bb389dd4e5ad2aa15b3ff5a97e5f5
2020-03-03 06:25:51 +01:00
Fomafix 3303e4b25d Add z-index: 1 to menu options
This avoids overlapping of wrapped icons with the heading pull down
menu.

Bug: T246550
Change-Id: Ia05773f2e41c2a50a6341546922dce2f8e196ab7
2020-02-29 22:45:17 +01:00
Ed Sanders 0df5223a20 Use WikimediaUI toolbar styling in Vector
Bug: T223155
Change-Id: I4730a78836e8db0b4116f09e07929d8b883c9fa4
2020-02-10 14:44:06 -08:00
Ricordisamoa e4d02b5e9a Fix double escaping
e75284e528 escapes a few messages too
eagerly but 1fc00749fb only fixes one
of such mistakes.

Without this change, the labels of some toolbar buttons (e.g. Italian
'Redirect', Welsh 'Numbered list') display '&#039;' where apostrophes
should be.

Change-Id: I3265631512c5d22ecc3dafb9d56acecc7d50ad1d
2020-02-05 19:11:01 +01:00
Ed Sanders ef38bdfe2f Align toolbar styling with Apex
Also separate out Apex-specific styling into a separate file.

The current toolbar is already supposed to be aligned with Apex
so the visual changes here are minimal.

Bug: T223155
Change-Id: I7a0a21809018e0094d50992054523d20be3c5473
2020-02-04 17:16:37 -08:00
Ed Sanders d861bf41de Use caret-style arrow indicator
This style of indicator is used everywhere else (Vector, WMUI, Apex).

Bug: T223155
Change-Id: I0792ee718656943a2938c2d027f8effe71a54002
2020-02-04 16:58:18 -08:00
jenkins-bot e94ad450bd Merge "Avoid href="#" on <a> elements" 2020-01-25 16:25:07 +00:00
Fomafix 3def0a39fc Use document.body instead of 'body' as jQuery selector
Change-Id: I05737b760a4875a58101a520d18cd21528175410
2019-12-16 11:36:27 +01:00
Fomafix f5c89bd673 Avoid href="#" on <a> elements
An <a href="#"> element
* shows a status line with a URL on hover and
* opens a new tab on middle click.

For still supporting keyboard navigation the replacement uses
* tabindex="0" to have the normal tab order and
* .on( 'keydown' ) to catch the Enter key.

The image example in the help does not need a link or a keyboard
navigation.

Change-Id: I6d75f75871bb29bdd878451f282f2055ed3f4f5c
2019-11-06 18:13:14 +01:00
Ed Sanders 85ac5f2e07 build: Update linters
Change-Id: Idcac2a782781a86dabd91f30a41adac1ea94ef16
2019-10-29 22:16:13 +00:00
jenkins-bot 9a25fc5557 Merge "Remove use of jquery.tabIndex (take 2)" 2019-10-16 21:49:54 +00:00
jenkins-bot 540785f413 Merge "Revert "Remove use of jquery.tabIndex in jquery.wikiEditor.dialogs.js"" 2019-10-16 21:12:05 +00:00
Timo Tijhof b505eaed24 Remove use of jquery.tabIndex (take 2)
This was used for setting incremental tabindex attributes
on the <button> elements of the "Find and replace" dialog
as opened from the "Advanced" toolbar section. I was unable to
find a difference in behaviour with and without this code running.

Both with and without this, when tabbing from the first input
field in the dialog, the buttons are in the tab order after
the input fields (matching the visual rendering). Unclear
what this was doing.

This re-applies commit 81b08daa48, which was reverted (5f356b1a),
because I forgot to remove the calls in  dialogs.config.js.

Bug: T234581
Bug: T235701
Change-Id: Ic51074c3d2b2e9b9b050c9f42862519a3e78af16
2019-10-16 22:03:29 +01:00
Jforrester 5f356b1aca Revert "Remove use of jquery.tabIndex in jquery.wikiEditor.dialogs.js"
This reverts commit 81b08daa48.

Bug: T235701
Change-Id: Iaad63b755aba5654ce6d684d4a5a88f732a6e797
2019-10-16 20:59:38 +00:00
jenkins-bot c5b154e599 Merge "Remove use of jquery.tabIndex in jquery.wikiEditor.dialogs.js" 2019-10-12 02:13:30 +00:00
Timo Tijhof 81b08daa48 Remove use of jquery.tabIndex in jquery.wikiEditor.dialogs.js
This was used for setting incremental tabindex attributes
on the <button> elements of the "Find and replace" dialog
as opened from the "Advanced" toolbar section.

I was unable to find a difference in behaviour with and without
this code running.

Both with and without this, when tabbing from the first input
field in the dialog, the buttons are in the tab order after
the input fields (matching the visual rendering). Unclear
what this was doing.

Bug: T234581
Change-Id: I5de97733091d0e123913f272b00784205d69267f
2019-10-11 22:51:20 +01:00
Ed Sanders 2112538387 build: Update linters
Change-Id: I3a50982ee652c4c1c9b357c793e07cccf014e261
2019-10-07 16:52:10 +01:00
David Lynch a107382fc5 Implement firstChange logging
Also, clean up the invalid logging of some prefixed schema items.

Depends-On: I79e04dda6323ebb05b129bb96c0323db112bcdd0
Bug: T229079
Change-Id: I73eae25d83b8d3f73128d3b800b267a8288a76e8
2019-09-10 09:38:49 -05:00
Timo Tijhof 7e5b71b04e mediawiki.RegExp (deprecated) -> mediawiki.util
Bug: T218339
Change-Id: Idd56fbd34648eeb42434848119b118375562cd14
2019-09-09 17:55:24 +00:00
jenkins-bot c36ba4893e Merge "Allow data URLs for toolbar icons" 2019-09-08 11:54:45 +00:00
Alex Monk 20d3c66c2c Follow-up Ia75d685c: Fix the insert file dialog
This appears to have been an oversight in the above change. Since the magic
words variable was no longer set, magicWordsI18N became null which broke
things, and caused whitespace info to not get recorded, which broke the
ability to handle the dialog being submitted too.

Bug: T230078
Change-Id: I5c44ed348de6ac2363d3d789b38053caa3935f62
2019-08-07 23:02:19 +00:00
Roan Kattouw d23d096281 Convert ext.wikiEditor module to packageFiles
This allows us to bundle the wgWikiEditorMagicWords and
mw.msg.wikiEditor(?!) config vars that were previously exported globally
in the startup module.

This code is old and crufty, so this is a somewhat minimal conversion:
* Use require() for jquery.wikiEditor.{dialogs,toolbar}.config.js,
  and for jquery.wikiEditor.{dialogs,toolbar}.js
* Don't attempt to convert jquery.wikiEditor.js to something
  require-based, instead just run it and let it set the $.wikiEditor and
  $.fn.wikiEditor globals
* Consolidate ext.wikiEditor.{dialogs,toolbars}.js into
   ext.wikiEditor.js

Bug: T222828
Change-Id: Ia75d685cbde786e8fceb6db36f2436b2beea1499
2019-08-05 22:24:56 +00:00
Alexander Jones 05a6e4e6a6 Allow data URLs for toolbar icons
The autoIcon function now immediately returns the icon URL if it
begins with "data:".

Bug: T27223
Change-Id: Ib62f1f50f612ddae9b5f8fb4a6b59863a6da3c98
2019-08-04 19:30:55 -05:00
Alexander Jones 2075d6d2dc Pre-fill fields in image dialog when image code is selected in editor
This commit adds a function to parse image syntax selected in the
editor and uses the parsed data to automatically fill the fields
of the WikiEditor image dialog. Surrounding whitespace in the
selected wikitext is now included in the result. This causes an
issue with the ownline option in line 840, which appends an extra
line regardless of the post text.

Bug: T40829
Change-Id: Ib117a2e6350400f9298d4892a00981ac41f3dbbf
2019-08-01 00:34:06 -05:00
Fomafix 3a306ff7fb Use lightweight mw.util.getParamValue() instead of mw.Uri()
Change-Id: I27eea6544a7dfe503d0cac1e24228eca9834ca95
2019-07-17 17:41:23 +02:00
jenkins-bot 145379966b Merge "Add arrow-up as indicator for the pinned menu" 2019-07-11 22:56:59 +00:00
David Lynch 7bbbf1a886 Log editor switches to visualeditorfeatureuse
Also, avoid distorting the logging of abort when VE is switched to from
WikiEditor. Log it immediately, rather than waiting until the end of the VE
session triggers a page-unload.

Bug: T221191
Change-Id: I3ddccd8df973a289f3bcdc4cdc42df1ab23ce6a4
2019-07-03 23:36:23 -05:00
Fomafix d2e683f230 Add arrow-up as indicator for the pinned menu
Change-Id: I9a8afd8ec8f17c867f81889524a64b96b1d10568
2019-06-18 18:09:25 +02:00
jenkins-bot 7c75285577 Merge "Search: Add option to search whole words" 2019-05-19 18:21:54 +00:00
Derk-Jan Hartman f501cdc9c6 Search: Add option to search whole words
Bug: T24478
Change-Id: Idb47ac392b0f8b1425053c6916db8f25c11c9762
2019-05-15 22:03:54 +02:00
Dan Andreescu 7d61121793 Remove mentions of schema.* ResourceLoader modules
These modules are deprecated and will be removed, see parent task for
details and deprecation information.

Bug: T223286
Change-Id: I72a1ab68f94842b2fa9bcd84c21ea736a48e0614
2019-05-14 21:19:34 -04:00
Fomafix df7fa37a0f Round SVG coordinates to whole integer
Change-Id: If8ddf7dba9807a8a108f0841697385f1a97158e4
2019-03-17 11:34:42 +01:00
Roan Kattouw cd59ae1bf4 Migrate away from deprecated specialCharacters API
Use require('mediawiki.language.specialCharacters') instead of
mw.language.specialCharacters.

Change-Id: I74e706a6603bd8fa899193de91e49f246608c4c1
2019-02-08 17:20:29 -08:00
Ed Sanders f9f01cf6b7 build: Update eslint-config-wikimedia 0.10.1
Change-Id: I71b5c0a1b499865b56ef6957427cae7c97609d73
2019-02-06 01:26:47 +00:00
Ed Sanders 583ad04b87 build: Update eslint-config-wikimedia to 0.10.0
Change-Id: I5fea8a1d6c91ea69c3490101ea38ce4626bd7e11
2019-01-08 23:32:56 +00:00
Ed Sanders c13f6b77ce Update stylelint-config-wikimedia to 0.5.0
Change-Id: I46d65752974a71cc07c9ce622b6cd8c7389f354d
2018-12-04 17:33:05 -05:00
jenkins-bot a6e515460f Merge "Animations: Get rid of jquery animations" 2018-12-03 20:43:39 +00:00
Derk-Jan Hartman 45d34eaa1b Animations: Get rid of jquery animations
Similar to makecollapsible.. Played around with CSS transitions, but
due to the non-predictable and variant sizing of the section elements
isn't really worth the trouble in my opinion.

Also was an accessibility issue on the select (header) dropdown.

Bug: T210671
Bug: T175379
Change-Id: I6fa476645bae7f0e1b01c563c4395e2af003c2c5
2018-12-03 12:27:40 -08:00
jenkins-bot 6cc83d2f93 Merge "Search & Replace: Fix using replace as first action" 2018-11-30 23:35:24 +00:00
Ed Sanders d1675f275c Use mw.Title.wantSignaturesNamespace
This bumps the extension to requiring the 1.33.x releases of MediaWiki,
which are currently in alpha.

Change-Id: I55f77294d271c81f510ce54181a24435b840d3d2
Depends-On: Ib2faa22c429096d545ddb829a6b4025427ad6071
2018-11-27 09:46:52 -08:00
Ed Sanders c19397ffbc Update eslint-config-wikimedia to 0.9.0
Change-Id: Ie60321d33b786a9f56fbf0df26571be7c0a29de8
2018-11-27 17:36:31 +00:00
jenkins-bot 4d479d62f9 Merge "Search & Replace: Use actual global replace" 2018-11-19 22:54:43 +00:00
Derk-Jan Hartman 38c3f2ed98 Search & Replace: Fix using replace as first action
When you use replace, before having used find, matchIndex gets out of
sync with what replace is expecting and encapsulateSelection won't
have a selection and thus defaults to position 0.

Bug: T76750
Change-Id: I1dcc724e7548690a3cc63672f93a3099c028f123
2018-11-19 07:21:21 +00:00
Ed Sanders 65ce4f6e73 Make button padding clickable
Currently the hover state include the padding, but
only the icon part is clickable.

Change-Id: Ifde032313452dff2ab74197477b0eb3dd6b5dfe1
2018-11-18 15:01:09 +00:00
jenkins-bot 7ff3ffa829 Merge "Remove the dialog version of ref inserter" 2018-11-18 14:38:23 +00:00
jenkins-bot ec8742491f Merge "LinkDialog: Switch to jquery.throttle-debounce plugin" 2018-11-18 14:31:56 +00:00
jenkins-bot f5ed495ba8 Merge "JS for ie-mac is not supported, so no need for this CSS" 2018-11-18 14:31:55 +00:00
Derk-Jan Hartman 8284c0480d Search & Replace: Use actual global replace
The old S&R implementation introduces problems with regexes (T58228 and
T50614) and is also rather slow. At some point in the past it was faster
to do multiple search/replace actions using textSelection perhaps, but
with current browsers doing a one shot replace will perform much faster.

If you have CodeMirror enabled, there will be a delay after replacing
all content on a major page, but no worse than the original page load
one, which I think is acceptable.

Bug: T58228
Bug: T50614
Bug: T25510
Change-Id: Ifab1d071d9f09ec55aa6556b5dca04378c4e5273
2018-11-17 21:11:01 +00:00
Derk-Jan Hartman dc86b00db3 JS for ie-mac is not supported, so no need for this CSS
Change-Id: I1aac178c5e162c6a19318d9980283ea562718db7
2018-11-17 13:09:30 +01:00
Derk-Jan Hartman 0089645a46 LinkDialog: Switch to jquery.throttle-debounce plugin
Change-Id: Iebca0398d6bc2939a0904c4cd23395d3207cfea5
2018-11-17 12:07:39 +00:00
Derk-Jan Hartman 709e2bbdfd Remove the dialog version of ref inserter
1: reftoolbar is used in more advanced situations
2: it doesn't actually do much
3: leaner

Keeping it in the same file, because that will preserve order. seems
safer.

Change-Id: I9bb2cf1e8731d12551a00b717b11602e6192d299
2018-11-16 21:49:31 +01:00
Derk-Jan Hartman cc3f42f6a1 remove old -khtml-box-sizing...
Change-Id: Idbd0b16431e2a9c34c28c68b775e7854b5dffbc5
2018-11-16 21:38:44 +01:00
Ed Sanders f1c0cbc70f Make jQuery.async loop synchronous
Bug: T209699
Change-Id: I61b6bd2f428144d746ccfbaf6269d64926a9c4d7
2018-11-16 12:56:55 +00:00
Derk-Jan Hartman aaa454b618 Remove browser arrays
Follow-up to I189516917d805dff3819e742a9fd8ad96a161159

Change-Id: Ic2e5389cc565ef061f4f846ad628ee6ea1a8a9fb
2018-11-15 22:59:51 +01:00
Derk-Jan Hartman a686b7f580 LinkDialog: use placeholder instead of fake values
Use proper placeholder attribute instead of faking it with a value.
This predated even jquery.placeholder and is no longer needed.
Also fixes a bug where it was checking with the API for the existence
of the placeholder value.

Bug: T133716
Change-Id: I290ec48f6b1d250da28efffd7ebdb6b681c0227e
2018-11-15 07:06:20 +00:00
Derk-Jan Hartman daab3360c9 LinkDialog: fix size of background image
At the default line-height the background image tends to
get clipped. Set it to the same line-height as the adjacent label
and both the label and the icon are aligned and the icon won't be
cutoff

Bug: T193480
Change-Id: Id94ba02a305a5150ad5b266bb0e2bb01b8a637ac
2018-11-14 23:17:06 +01:00
jenkins-bot 07d219f2c5 Merge "Modules: Protect against loading modules twice" 2018-11-14 21:11:51 +00:00
jenkins-bot fa63708bd5 Merge "Toolbar: ignore modifications on readonly textarea" 2018-11-14 20:51:06 +00:00
Derk-Jan Hartman 0161e37e6e Modules: Protect against loading modules twice
Bug: T189029
Change-Id: Ie0dff9c1dfa8e3a0927f2915a9a237dff739289a
2018-11-14 20:24:15 +00:00
Derk-Jan Hartman 261c76d746 Toolbar: Add tiny hover effect to ooui icon buttons
Change-Id: If3f8eddb2ece0af34c5f42b264b53c7bf0ccb352
2018-11-14 19:52:32 +00:00
Derk-Jan Hartman c7e4545589 Toolbar: ignore modifications on readonly textarea
CodeMirror forces WikiEditor to load. While CodeMirror handles readonly
textareas, the WikiEditor toolbar doesn't. CodeMirror and
syntaxhighlighting is pretty useful in readonly actually,
so I'm making WikiEditor a tad more resistent against readonly mode.

Bug: T188817
Change-Id: I927a780e1aea86a19750387f530bad84b1ff5ef4
2018-11-14 19:02:58 +00:00
jenkins-bot db6c6f636b Merge "Remove obsolete aliases from closures" 2018-11-14 00:11:49 +00:00
Derk-Jan Hartman fd92d4b821 Toolbar: Allow groups to be multiline/wrap
Bug: T25943
Change-Id: I2db720449dfe9619de1f8e37fc99282191d932b1
2018-11-13 15:40:35 +01:00
Ed Sanders 4fa41179e8 Remove obsolete aliases from closures
Bug: T208951
Change-Id: I0b2993912de221e810414e46708c19be163922f6
2018-11-12 22:28:40 +00:00
Roan Kattouw d700202f85 Update EventLogging code for Edit->EditAttemptStep schema migration
The schema itself is being renamed, and many of the field names are
different.

Bug: T207803
Depends-On: I2949c9782669b75cf17978698c8cef21fdee6dea
Change-Id: I07d9bc1530005914043911b7906c1602522c9162
2018-10-29 11:38:07 -07:00
Roan Kattouw 55b89c1ede Oversample Schema:Edit events when configured to do so
Respect the config var exported by WikimediaEvents that, if set to true,
forces oversampling. When oversampling, all events are logged even if
they would have been sampled out. The isOversample property is set to
true if the event was oversampled and would not otherwise have been
logged.

Bug: T206543
Depends-On: I5fdf5fdd2dc0d99a0a0d7eb7ab2e3dce4798009b
Change-Id: I7e504884a888c4d080cd4762549b72489126ed65
2018-10-18 10:58:45 -07:00
Roan Kattouw e54a4420ca Use Schema:Edit sampling rate config from WikimediaEvents
Instead of hard-coding the 6.25% sampling rate, allow it to be
controlled by the config variable in the WikimediaEvents extension
(which also defines the RL module for the Edit schema).

Also use sampling code from EventLogging so we can configure the
sampling rate as a number, rather than using a hex-digit based strategy.

Bug: T206543
Depends-On: I00383cec62f6c2a0137b329565b0ca84bfbb223f
Depends-On: Ib746fc708e7b752cebc5fd8d080e40819dfa34f3
Change-Id: I2956efc9294768742dd49dcb36770f0509e4090f
2018-10-17 14:30:03 -07:00
Gergő Tisza 1fc00749fb
Fix escaping
Follows up I2df3ec8c0.

Change-Id: Ic8f44dec0f24e2443055ef46cd0b4140c200a22b
2018-10-12 20:29:29 -07:00
James D. Forrester e75284e528
Fork autoMsg() with escaped autoSafeMsg(), replace where appropriate
The only use of raw HTML messages is in the help panel, which is the only user
of `layout: 'table'`, so we can replace all other callers.

Bug: T154891
Change-Id: I2df3ec8c05d4daaa094378354566356a822c081f
2018-10-12 01:27:52 -07:00
Zoranzoki21 7ccbaa3539 Fix "the the" typo
Bug: T201491
Change-Id: I93f905e2f83c6f93aa75a3c826897c165873f6f5
2018-08-27 20:13:56 +00:00
James D. Forrester a24d4748a5 Fix missing 'find' icon, now called 'articleSearch'
Change-Id: I364ac11825564619898c699e66de7d36963cab49
2018-08-24 09:41:17 -07:00
Volker E 17b772e314 Use 'reference' instead of 'book' icon
'reference' is the standard icon for reference.

Bug: T202463
Change-Id: I3e0ed63c449de623a139b3ee3c6866ba3faa7712
2018-08-21 15:53:22 -07:00
Derk-Jan Hartman bfbc794c5b Toolbar: Add a new 'toggle' tool type; declare as v0.5.2
A new toggle tooltype which makes use of ToggleButtonWidget in order
to provide proper accessibility for all buttons that require on/off
state

Bug: T198781
Change-Id: I8b7fd41571a48fa4f6560790d94bb966972e740f
2018-08-17 11:19:32 -07:00
jenkins-bot ac1db705fa Merge "Remove dummy isSupported function, deprecated in REL1_31" 2018-04-18 10:32:20 +00:00
Ed Sanders 72e48c26e0 Convert remaining tools to OOUI
Replaces the insert and advanced-insert groups, which
are currently multi-colour icons.

Drops the button-sprite + offset mode, according to
mwgrep there are no other users of this.

Bug: T191031
Bug: T143508
Change-Id: I7032f98908a591ea5c9d3dbbb7616e2c10bbfc80
2018-04-11 15:50:23 +01:00
Bartosz Dziewoński 5dd46f9943 Fix margin on OOUI icon buttons in Apex theme (MonoBook)
Bug: T191031
Change-Id: Ia11bf09e0dea8e929cfd0ab85cd46252f6a52325
2018-04-10 18:58:29 +02:00
Ed Sanders bfafde341f Use OOUI icons for bold & italic
Bug: T191031
Change-Id: I3beca4122e8b0514808ccffeb4042f1965e9f056
2018-04-04 20:13:03 +01:00
jenkins-bot e772abe425 Merge "Remove background colour on WikiEditor wrapper" 2018-04-03 19:42:26 +00:00
jenkins-bot b8b79c19ec Merge "Use OOUI icons for advanced format & size tools" 2018-04-03 19:42:23 +00:00
jenkins-bot c21d53cabb Merge "Replace toolbar background image with CSS linear gradient" 2018-04-03 19:33:33 +00:00
Ed Sanders 546933e52b Allow dialogs to have their borders
There is quite low contranst between dialog
background and the overlay, so it makes sense
to just leave the border, which is consistent
with MWUI dialogs in OOUI.

Change-Id: I90ad752b91d15a25e8b36d43df44ac56df75cd9c
2018-04-02 22:11:13 +01:00
Ed Sanders 89eff4701e Remove background colour on WikiEditor wrapper
The backgorund colour is more selectively applied
elsewhere. This just causes problems if the skin
sets <textarea>s to transparent (e.g. Minerva).

Change-Id: I6695dc5af9224238efdc3eac97817010cf52237d
2018-04-02 22:09:58 +01:00
jenkins-bot 37b51a2dc4 Merge "Hide right border of only the last group in the toolbar" 2018-04-02 11:49:06 +00:00
Ed Sanders 5ec5da115e Replace toolbar background image with CSS linear gradient
Change-Id: I1d72be9119e85fd9957ba0fb86f22a9a5cc2edca
2018-03-30 15:59:36 +01:00
Ed Sanders 38c91e7512 Remove unused format-indent icons
Change-Id: I2c12b77129b86268191173292b82f2051d85e795
2018-03-30 00:22:13 +01:00
MusikAnimal 96518636b3 Hide right border of only the last group in the toolbar
Bug: T190378
Change-Id: I14295eb71afad9c6c444199d1b84b7b714525475
2018-03-29 17:02:35 -04:00
Ed Sanders 335f189460 Use OOUI icons for advanced format & size tools
Bug: T191031
Change-Id: Ifb6c166ecfe082414677420939106d55a5715bb2
2018-03-29 15:53:15 +01:00
Ed Sanders 2dd87044e2 Provide #setActive API for buttons
Change-Id: I3e6f65f6f290778d3fbfa22f5d212c26fee12a86
2018-03-23 13:39:01 +00:00
Ed Sanders e7fea7563c Toolbar: Increase opacity on active tools
Change-Id: Ib83fa83794b9ecdb091aa14a5c4002640fc2f2fc
2018-03-22 15:33:52 +00:00
jenkins-bot 8f6a39059e Merge "Provide a 'tool-active' styling for toggle buttons" 2018-03-21 23:15:58 +00:00
jenkins-bot 76dcd4216a Merge "Allow toolbar items to use OOUI icons as buttons" 2018-03-21 22:50:43 +00:00
jenkins-bot b0a5d572d1 Merge "Remove never-used tools" 2018-03-21 19:38:23 +00:00
Ed Sanders a2e2b69241 Provide a 'tool-active' styling for toggle buttons
Based on styling used by CodeMirror extension.

Change-Id: I74b7399c6dba3409b26656ae89fa3a569c69fef3
2018-03-21 18:31:36 +00:00
Ed Sanders 6b9aa52894 Allow toolbar items to use OOUI icons as buttons
Change-Id: I04e8b6c395e9569e5593378a556e239edc254186
2018-03-21 18:31:21 +00:00
Ed Sanders accdb762f1 Remove never-used tools
Five tools are registered in toolbar.config, then overridden
in dialogs.config with more advanced verisons. As the dialog
module is no longer optional, the simplified versions are
no longer accessible.

Change-Id: Ib66025d209a36fb821c5619cbfe63330fb6c9a1f
2018-03-21 17:28:32 +00:00
jenkins-bot 5ce2c13463 Merge "Avoid '|' in title is interpreted as separator on API request" 2018-03-12 22:36:25 +00:00
Fomafix d5648e2c95 Avoid '|' in title is interpreted as separator on API request
mw.Api uses U+001f as separator when the title contains a '|'.
This is activated by using an array instead of a string.
The local check for an invalid title because of a '|' is not necessary
anymore.

This changes requires MediaWiki 1.28+ which is already required.

Change-Id: I8450c478d42158f064bf5309efae6bd1d81244ea
2018-03-04 09:44:27 +01:00
Amire80 2592dc0e4c Use display:inline-block for special character buttons
This allows them to use the natural text direction which will
be right-to-left for right-to-left alphabets.

Also fix bottom padding to match top padding.

Bug: T56310
Change-Id: I7b2ebf9d1682fe827517fc959618531c904c94ca
2018-02-28 13:56:07 +00:00
Alangi Derick e0977eeb93 Escape messages appropriately and not use raw html
Make sure messages are escaped and not feed on raw html
before inserting into the group.

Also, updated the minus-x version to 0.3.0.

Bug: T154891
Change-Id: I12e5dc03396fa8bed9beb362ae91a77e64646113
2018-01-22 20:21:58 +01:00
Jforrester 436a0aa1fa Remove dummy isSupported function, deprecated in REL1_31
This reverts commit a92c99cd45.

Change-Id: I2567fbf5a41efb1242b690dd23e4b59b166c0251
2018-01-18 18:19:46 +00:00
jenkins-bot b25a3f68dc Merge "Restore isSupported as deprecated dummy function" 2018-01-18 12:44:10 +00:00
Ed Sanders a92c99cd45 Restore isSupported as deprecated dummy function
Bug: T185143
Change-Id: I0be5d09390b70ee581262b4ba6421f5f51f2e696
2018-01-18 11:24:10 +00:00
James D. Forrester 86256e0c10 Remove reference to mw-editButtons-pipe-separator, now removed from MW
Change-Id: I50aeda4aee2dae8094ae19bdc6fb0c64425c3e14
2018-01-10 14:27:59 -08:00
Ed Sanders 17cf175e78 Save/restore selection in all browsers
Previously this wasn't required due to an iFrame mode.

Change-Id: Ib89af27d5ab6b9b1b05046b32b05ce368ff47a5f
2018-01-02 21:46:31 +00:00
Ed Sanders 84926bbd33 Remove browser compatibility checks
WikiEditor works in all browsers that MW supports,
and should do going forward.

Change-Id: I189516917d805dff3819e742a9fd8ad96a161159
2018-01-02 21:44:59 +00:00
James D. Forrester 6f35dcc39c Merge all the non-styles-only ResourceLoader modules into one
These were always jointly loaded, so they just bloated the module table
to no benefit.

Bug: T165112
Change-Id: I51745e84d6b840a18d84385dfb5ea4f96ada311d
2018-01-02 21:41:42 +00:00
James D. Forrester be36244c70 Radically simplify this extension now there's only one config option
On or off. Pick your apples.

Change-Id: I7677f0b597c33f236192aea1aaa347a36216fbb7
2018-01-02 21:25:16 +00:00
James D. Forrester 77cea2697c Drop the never-finished "Labs" publish and preview features
These features were ideas in the Usability Initiative but were never
finished to the level that they would be deployed on Wikimedia wikis
and have been marked as "going to be removed" for years. Now is time
to act on that promise.

Change-Id: Ia1eb91d2dfb1979518d97badc1477146b4606f7c
2018-01-02 21:00:44 +00:00
jenkins-bot 3d39b80b0c Merge "Track time-to-ready/loaded via window.performance" 2017-12-11 21:28:30 +00:00
jenkins-bot fae67b0a3d Merge "Track action=loaded when the editor is *fully* ready" 2017-12-11 21:28:29 +00:00
David Lynch 046e9b6374 Track time-to-ready/loaded via window.performance
Change-Id: Iadb9c131ca6730c20d4b166e686942f9b404e198
2017-12-11 11:53:14 -06:00
Ed Sanders 0322d628aa Track action=loaded when the editor is *fully* ready
Change-Id: I29ee776bdfe5d89ddffb97175588ed037ef0beee
2017-12-06 16:32:27 +00:00
Seb35 db23e9984c Cancel button returns Undefined error
The associated HTML changed in MediaWiki commit 97d7de0b.

Bug: T177313
Change-Id: I360fbd375efd7090256626df3fce418a5aa45ac2
2017-11-24 19:12:53 +01:00
Amir Sarabadani f3aad21d96 More alignment with WikimediaUI color style
Bug: T174119
Change-Id: I4ae87be955ef60e5cad45133c9b0118e1cf246be
2017-10-31 21:48:22 +01:00
jenkins-bot 1c67de24a2 Merge "build: Update linters and fix errors" 2017-10-31 19:17:42 +00:00
Ed Sanders 66a29b9c0a build: Update linters and fix errors
Change-Id: I3d316cfa7432d0600f0114608342155c1d1f6c1d
2017-10-31 18:40:57 +00:00
Amir Sarabadani 2726762994 Align colors with WikimediaUI color palette
Bug: T179411
Change-Id: I39f47c15547c0bc3197dc1c186cee748f48b1b67
2017-10-31 17:12:52 +01:00
Ed Sanders ca87c9020e Remove rest of partially-removed IE hack
Bug: T123219
Change-Id: I3b900116ce2dc44338451c07ecdc419bad82014b
2017-10-12 16:02:48 +01:00
jenkins-bot a005f16488 Merge "Align close colors to conform to WCAG level AA" 2017-10-12 01:18:47 +00:00
Fomafix 1e0621fc1f Show invalidreason from API response on invalid title
Bug: T99547
Change-Id: I34372e054e509732b008875260ba5c5e0248e551
2017-10-11 11:02:08 +02:00
Volker E 10c92ebd15 Align close colors to conform to WCAG level AA
`#666` is closest simple one that also works on
backgrounds like `#fafafa`.

Change-Id: Iffca2872504e2a173155e4ddc5e4ab652464eb8f
2017-10-10 20:06:12 -07:00
jenkins-bot 3fb5a2c9e1 Merge "Hide loading spinner also on API fail" 2017-08-10 22:32:26 +00:00
Pavel Astakhov 3e14a90fb7 Do not add a background image if the icon is not defined
Bug: T172500
Change-Id: Ib658651e04090ec4f5bc1f5bacbbfb0d7e7f893e
2017-08-04 15:46:08 +06:00
Fomafix bb1bc1d2c1 Hide loading spinner also on API fail
Change-Id: I65c1adf8058f2cd0a18466b0d92e43d5ec67d8f7
2017-07-25 17:43:14 +02:00
Derk-Jan Hartman 0cdd6d467e WikiEditor: <br /> -> <br>
Bug: T150172
Change-Id: I645cd627a8f66144fdbbdecf15b24af0528746a8
2017-06-04 20:54:37 +02:00
James D. Forrester ba6e4e171d Follow-up d400102: Drop irrelevant comment, merge var declaration
Change-Id: I09685da71cdfa21b40258ecffc64fa9a2f6ec272
2017-05-22 13:20:09 +02:00
jenkins-bot a899832759 Merge "Remove IE8 hacks" 2017-05-22 10:47:25 +00:00
Ed Sanders d400102c38 Remove IE8 hacks
Change-Id: I23e33e3498487bedcc50d95e2162175e940882c4
2017-05-22 11:50:04 +02:00
Fomafix c410ce8a4d Add parameter useskin to action=parse for live preview
This change duplicates the Change-Id: Ie3615866 in core and is needed to load
the module 'mediawiki.toc' since Change-Id: Iaad84d24.

Change-Id: Ie667e97737acb66a8efcb299bc081b9577ae24d6
2017-05-21 19:44:30 +02:00
jenkins-bot 86da31e8e0 Merge "Make toolbar and dialog part of the core module" 2017-05-11 23:17:17 +00:00
Fomafix 5432a42d2d Use background-image instead of <img> for spinner
* Background images get embedded.

Change-Id: Iea1fb3db29b1eb8d5bff1b9b07a6c16145b9efc0
2017-05-05 19:09:37 +02:00
Ed Sanders 1b0bd60ee8 build: Update eslint to 0.4.0 and make pass
Change-Id: Ib0ac14fb53479eb964a5d51066661b4771b1f72e
2017-05-04 22:38:47 +00:00
Ed Sanders 781504057a Make toolbar and dialog part of the core module
Bug: T163793
Change-Id: Ia6d02b51d4e04f148d836827640ff132366c4bee
2017-05-03 11:54:23 -07:00
jenkins-bot ecc01e9122 Merge "Explicit load module 'jquery.tablesorter' instead of use when loaded" 2017-04-27 13:04:51 +00:00
Fomafix 278ae63c04 Explicit load module 'jquery.tablesorter' instead of use when loaded
The module 'jquery.tablesorter' is already loaded a few lines above.
The previous situation depends on a race-condition of the function is called
or not.

Change-Id: If6777fcc7d9d49604eb78b6d233a32898fc82446
2017-04-27 13:50:23 +02:00
Fomafix 25d64833dd Remove workarounds for IE8
Since MediaWiki 1.27 JavaScript is disabled on Internet Explorer 8.

Bug: T123219
Change-Id: If8e36d5cf39531ca9c599131847f612d17c31166
2017-04-26 18:28:25 +02:00
jenkins-bot 983cd6f480 Merge "Replace deprecated jQuery.isArray with Array.isArray" 2017-04-26 16:12:50 +00:00
Fomafix 24ee938095 Replace deprecated jQuery.isArray with Array.isArray
jQuery.isArray was deprecated in jQuery 3.2.0. [1]

Array.isArray is part of ES5 and MediaWiki 1.29+ which ensures that
JavaScript is only used when the browser supports ES5. (T128115)

Performed using:
find . -type f -name \*.js -exec sed -i -e 's/\$\.isArray/Array.isArray/g' {} \;

[1] https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility

Change-Id: Ia1a118fefb23761fe297647442f0a598a9488968
2017-04-26 16:04:51 +00:00
jenkins-bot 744dd98914 Merge "Fix deprecation warning since jQuery 3" 2017-04-17 20:58:19 +00:00
Amire80 677041ff59 Add Canadian Aboriginal characters to the special characters toolbar
Bug: T108626
Change-Id: I613e89a520f78bcf7b6640c3ed5b9f3cce351912
Depends-On: Ia337d42c6ef7f9645f1dd843ef0e7553857f6aa3
2017-04-17 14:23:26 +00:00
Fomafix 74229b1d25 Fix deprecation warning since jQuery 3
JQMIGRATE: Attribute selector with '#' must be quoted: a:not([href^=#])

Change-Id: I892d27fd5e1b7e4a8b495f295d95592f164f7003
2017-04-13 11:18:45 +02:00
Fomafix ebf4d28dfe Replace deprecated jQuery .bind() by .on()
jQuery .bind() is deprecated since jQuery 3.0.
https://api.jquery.com/bind/

Change-Id: Ibbcfbefe2983b2ed2e3b110518c16539cbb84d88
2017-03-24 08:51:58 +01:00
Fomafix bd133991ba Replace deprecated jQuery .unbind() by .off()
jQuery .unbind() is deprecated since jQuery 3.0.
https://api.jquery.com/unbind/

The deprecated jQuery .bind() was aready replaced by .on() in 7769baa5.

Change-Id: Ia03d7a26754cc26345d9551d740719c43f598995
2017-03-23 20:36:39 +01:00
Ed Sanders d4b3d2c87f build: Update stylelint to 0.4.1
Change-Id: I4f21c19a9b834fa5442df201c4d65c6184bcbd2c
2017-03-20 14:39:18 +00:00
Ed Sanders 9f7fcfd80e Follow-up Ife5e782bd: Syntax fixes
Change-Id: I0a9d68344b2e5ed5589d421525e6113b72476705
2017-01-09 13:43:42 -08:00
Timo Tijhof 7769baa56e Replace deprecated jQuery bind() and size()
> JQMIGRATE: jQuery.fn.bind() is deprecated
> JQMIGRATE: jQuery.fn.size() is deprecated; use the .length property

Note that bind() is not removed in v3, merely deprecated.
Even after the jQuery Migrate phase, it will continue to work.

size() was removed in v3 and works only during the Migrate phase.

https://api.jquery.com/size/
https://api.jquery.com/bind/
https://jquery.com/upgrade-guide/3.0/

Bug: T124742
Change-Id: I6bbd8f829ecf987228c6a5abd32c84e4e088a9bd
2016-11-21 18:23:50 -08:00
Ed Sanders 7eed707a48 Replace jshint/jscs with eslint/stylelint
Change-Id: Ife5e782bd5513e0496e384655b9b203de5c841a5
2016-11-21 21:02:38 +00:00
Bartosz Dziewoński eb3097759f Make Upload/Insert buttons in "Insert media" dialog less confusing
The "Upload" button is now displayed on the left side of the dialog,
which make it clear it's a "secondary" action. "Insert" is on the
right, like all jQuery UI buttons, and the primary action.

Unfortunately jQuery UI doesn't give us a lot of styling options for
buttons or dialogs, even this is a bit of a hack.

Bug: T135917
Change-Id: Ia64229b880653668c11787744c177f6c91900382
2016-11-02 16:56:37 +01:00
Fomafix fe7e2a790c Load module 'mediawiki.diff.styles' on show changes
The loading of the diff styles get lost in 6627f2cd.

In MediaWiki 1.28 the name of the module was renamed from
'mediawiki.action.history.diff' to 'mediawiki.diff.styles'.

Bug: T142845
Change-Id: I86ed2a0568c6bc4e81819633a295cec2e8924215
2016-09-26 21:29:14 +02:00
Derk-Jan Hartman 10583ec1a7 Avoid flash of content when hiding editHelp and the pipe separator
Bug: T120408
Change-Id: I651ea3d2b891ce347a51be9b3bc3e34351bc53dc
2016-05-25 11:26:13 +00:00
Derk-Jan Hartman 79a052dc5e Avoid reflow due to WikiEditor toolbar loading
This avoids part of the reflow that occurs when the WikiEditor has
finished loading it's toolbar, by reserving 33px above the textarea.

I will still reflow to uncollapse a Advanced or Help section of
course, but there is only so much we can do.

Bug: T125843
Change-Id: Ibadea803bdfde9f88cff082b043ed58a05ed75a9
2016-05-25 00:26:20 +02:00
Paladox f473a2bc36 Allow the signature wikitext to be overridden locally
Bug: T26191
Depends-On: I33de58e9729a51ae73a13853ffcfcbb2d2305111
Change-Id: I43f5bbaee007bbd038f2e118b3ffb8690753afb8
2016-05-18 00:43:15 +00:00
jenkins-bot d1bfcb7d5a Merge "Small side-by-side preview improvements" 2016-04-19 15:57:59 +00:00
Derk-Jan Hartman 6627f2cd94 Small side-by-side preview improvements
- load jsconfigvars
- trigger the hooks for wikipage.content and wikipage.diff
- rvdifftotextpst for diffs
- improve section support

This module is not used within WMF, but has some users amongst 3rd
parties.

Change-Id: I7f0b2de4a984d811ccd94149670390929a6182f6
2016-04-16 00:34:05 +02:00
Ed Sanders 785703b5c5 Add 'Greek extended' to special character list
Bug: T130535
Change-Id: I57634d14b8ada16bd00db0c0333c1fc87d2be28c
2016-04-14 19:58:51 +01:00