Commit graph

64 commits

Author SHA1 Message Date
jenkins-bot 3f226d7223 Merge "Fix cursor position after extension loads" 2017-09-26 00:55:25 +00:00
jenkins-bot 1b6637bd43 Merge "Fix for function mw.toolbar.insertTags in chrome and IE" 2017-09-15 23:00:20 +00:00
jenkins-bot 5128648e0b Merge "i18n: use correct language and direction" 2017-09-13 18:45:12 +00:00
Ebrahim Byagowi a3e4ea6789 i18n: use correct language and direction
Change-Id: I6fd368f923b52a299633acb361748317ec18bdd1
2017-09-13 22:32:46 +04:30
Pavel Astakhov e727726d2a Fix word jumping (option+arrow key) for Mac
Bug: T175378
Bug: T174055
Change-Id: I7f648691ec3b36f9abe1c5c7fbe5c97e142f500e
2017-09-11 13:56:00 -07:00
jenkins-bot 9ba136850c Merge "Join the popup label into one message" 2017-09-11 20:19:03 +00:00
jenkins-bot fdb006a17c Merge "Fix home/end behavior" 2017-09-11 20:17:38 +00:00
jenkins-bot dba972cf9c Merge "Simplify setTimeout" 2017-09-11 18:57:43 +00:00
Pavel Astakhov 701cdca90b Fix home/end behavior
Bug: T174514
Change-Id: I0f07ac1f4f3bc3a42c620ce88be026fdf42450c6
2017-09-11 21:01:43 +06:00
Fomafix eca881d11f Simplify setTimeout
* Use setTimeout instead of window.setTimeout.
* Directly call function and avoid anonymous function.

Change-Id: Ic396ef744d58fb722761a66f38390d2bb4848c2d
2017-09-11 16:19:55 +02:00
Sam Wilson b4b9da7e51 Join the popup label into one message
The popup label was being styled as two words from two different
i18n messages, each a different colour. This combines them into
one, moves the identifing class name up to the outer span, and
colours both words blue (the outer braces are left black).

Bug: T174219
Change-Id: Id1166f48ae4b3b8daff29be56dd92ef330dd9cef
2017-09-11 10:23:22 +08:00
Niharika Kohli 279103fea9 Render everything as long as user doesn't start typing/moving cursor
Bug: T174480
Change-Id: I106b1d0d2a68e8ba2b346fd6aaf06b530d18f8d4
2017-09-08 14:11:01 -07:00
jenkins-bot 94a08e27d6 Merge "Do not redefine the browser history navigation keys Alt-Left and Alt-Right" 2017-09-04 09:06:57 +00:00
Pavel Astakhov f71d17d8d1 Fix for function mw.toolbar.insertTags in chrome and IE
Bug: T164905
Change-Id: I15b60944a95f94b4a2e3b929fe4d00fe757961bd
2017-09-04 14:54:26 +06:00
Pavel Astakhov e1eaac762d Fix cursor position after extension loads
Bug: T174547
Change-Id: I8ce2c61884410c4ca47bd8cbc11d0902df7f1d4a
2017-09-04 13:49:06 +06:00
Ed Sanders 41f57b2184 Don't assume action=edit/submit is the old wikitext editor
VE will hijack action=edit, and not render the textarea.
Instead check for the textarea directly.

Change-Id: I024d130cd64dd755321f044c372bdcc8b7cdb5f2
2017-08-25 15:14:37 +01:00
Fomafix ae8696fea6 Do not redefine the browser history navigation keys Alt-Left and Alt-Right
Bug: T174055
Change-Id: I1e2acb927dfcc0799b78b2dc045c0208246ba111
2017-08-24 20:00:01 +02:00
Bartosz Dziewoński 3a1589d527 Remove a workaround to clear broken 'background-image'
No longer needed after Ib658651e04090ec4f5bc1f5bacbbfb0d7e7f893e
in WikiEditor.

Bug: T172500
Change-Id: I22e5a854ed6ee657d5f6c416cb4412184d10f1ac
2017-08-04 14:38:09 +02:00
Kaldari 28a9dd7fac Only show popup if CodeMirror button exists
Bug: T170609
Change-Id: Ibe9aa1b7ffce2e7813aa9aa2ab45f349d8ad2082
2017-08-03 15:57:49 -07:00
jenkins-bot bff703563d Merge "Preserve scroll position when switching" 2017-07-24 16:35:28 +00:00
Ed Sanders 7fe9e2e762 Popup: Use built-in features of PopupWidget instead of custom CSS
* Use OOUI buttons for the actions.
* Make the widget wider to accommodate longer titles in
  different languages.
* Don't show if CM already enabled

Change-Id: Ibde461a99929565c15b5e7c5ef3ad88e163fba05
2017-07-20 21:30:45 +00:00
Ed Sanders 60ab939b26 Popup: Build as DOM instead of HTML strings
Change-Id: Ib33b6b2a1f3e0f9c50398287822ae88305855a58
2017-07-20 21:30:37 +00:00
Ed Sanders 643faba0db Preserve scroll position when switching
This will be slightly off when you have scrolled past
headers which have a different font size, but it's better
than jumping back to the top of the document.

Change-Id: I62a73c30932c3dc1e538484edead9c5d2ed6c72f
2017-07-20 19:12:38 +01:00
Kaldari 4fc52b7ba3 Make sure enhanced editing toolbar is loaded before adding button
Bug: T169943
Change-Id: Id8828b0d49ecec5124430d15445739d73795d164
2017-07-10 14:16:36 -07:00
Niharika29 55092521c3 Make sure popup appears for both classic and wikitext editors
Bug: T165003
Change-Id: I4b1c9498df7931643ea3c39d6d2afd9384e47de0
2017-07-04 00:15:56 +00:00
Niharika29 a1b41c6099 Fixes for Codemirror popup patch
Bug: T165003
Change-Id: I52e3cdb3afde242451e9cab68baecc1ab77868dc
2017-06-30 18:43:50 +00:00
Niharika29 99e31d152f Show a popup for first time Codemirror users
Bug: T165003
Change-Id: I545a57bdb273ab6906711e2d65dc029293ecc02a
2017-06-29 00:20:14 +00:00
Pavel Astakhov 8ff5f6afee Replace CodeMirror icons with new icons (#36C)
Bug: T164441
Change-Id: I2e185dfa468ede51bd1a0e41b3b4dcf43a74313c
2017-05-14 23:44:17 +06:00
Ed Sanders 59aed7d2e2 build: Update eslint to 0.4.0 and make a pass
Change-Id: I580e7a2ed7276dc3b9546b497ecf2f8f4efe1aa6
2017-05-08 16:54:10 +01:00
Ed Sanders de6b08919b Use consistent label for button across editors
Change-Id: I1a299522e95cdb4a6e5bdbdda1c65d4fcec22133
2017-05-08 16:54:10 +01:00
Pavel Astakhov c9b4aa65fd Refactor the Integration with other extensions (v 4.0.0)
This patch makes initialization easier and cheaper.

Since only the PhpTags extension uses the CodeMirrorGetAdditionalResources
  hook it was removed. Instead, the CodeMirrorPluginModules and
  CodeMirrorTagModes properties are used in extension.json file.

This patch adds ext.CodeMirror.lib.mode.php module for the PhpTags
  extension (with dependences). In CodeMirror there are a lot of modes
  they will be registered on request (if they will be requered for
  extensions).

Examples of integration:
* Cite: I1bf156fa813af4d5f891619f692047bbdb8a1a86
* PhpTags: Ie339f0475e63885e603defaee2cdcccd6a95fafc

Bug: T163238
Change-Id: Idb7a1a5769a1047ef2f7cd25a7152f73a6613225
2017-05-04 21:20:21 +01:00
jenkins-bot 8f8a68f056 Merge "wikiEditorToolbarEnabled: Rewrite if block as statement" 2017-04-27 01:45:49 +00:00
jenkins-bot 0f22c06b9c Merge "Swap the enable/disable labels" 2017-04-26 17:19:25 +00:00
Pavel Astakhov 3954552b43 Swap the enable/disable labels
Bug: T163916
Change-Id: Ie868556fe31ea4aae976e94526cc96bb79803626
2017-04-26 22:48:13 +06:00
Ed Sanders 9205f900bd wikiEditorToolbarEnabled: Rewrite if block as statement
Change-Id: I516a8e8f1bf53dc784a2ab3ff49bd20b172dc6e8
2017-04-20 23:31:58 +01:00
Pavel Astakhov b7bc84d783 Remove some outdated code
Since WikiEditor uses wikiEditor-toolbar-doneInitialSections event
  we don't need to add it to ResourceLoader dependencies.

Bug: T161475
Change-Id: I7c7c3ba495c0292d2df052145e7930c86fcb48f5
2017-04-18 14:07:51 +06:00
Pavel Astakhov cf07be26b3 Take out the blue highlight for cursor location
Bug: T162204
Change-Id: I6aca0103a2603bf37ff856a7dd6f2aa4137ee53c
2017-04-05 10:50:42 +06:00
Reedy c4e0cf86d4 Fix some indenting
Change-Id: I6bb9a8875d053ddac564d6d74ad34c8c9b0332ae
2017-04-04 01:15:09 +01:00
Ed Sanders 02c22f53ff Styling fixes
* Move CSS out of mediawiki.css which is for wikitext
  highlighting rules.
* Account for wikieditor-ui adding wrappers even when
  disabled.

Change-Id: I0fca693a6771ee1d790800c9afd5c7091fda20c1
2017-03-27 14:02:25 +01:00
Pavel Astakhov 29fa173331 Fix CodeMirror state when initializing
Before CodeMirror was enabled every time (ignoring user settings)
since switchCodeMirror was called in initialisation and some others bugs...

Change-Id: I418c64000e05dbfac62f5bb2327cfe7ed74efb17
2017-03-27 14:23:21 +06:00
Ed Sanders 3980fa0af0 Cleanup and use SVG icons
Change-Id: Idcad8e2554c5e44155c88bd925186095e3aad930
2017-03-27 02:59:13 +00:00
Ed Sanders 806527d8a1 Switching fixes
* Fix state toggle in WikiEditor
* Update options API code
* Fix font-size and line-height so text doesn't move
* Append to WikiEditor after loading so it appends in
  correct part of DOM.
* Only add border in classic editor

Change-Id: I5e80298030633d4859d01a92b6c61ef1fa969e96
2017-03-22 11:48:41 +00:00
Ed Sanders 53c64371dd Only give code mirror focus for specific commands
Previously focus was being called even for getContents, causing the
editor to instantly steal focus from the edit summary input (!!).

Change-Id: I5a14850d90a7c5605026e1fac192585ee62b4615
2017-03-22 11:48:41 +00:00
Ed Sanders 66ba217ba2 build: Replace jshint/jscs with eslint, introduce stylelint
Change-Id: I9b5afb39f5a0d32e722b2a1f56c219b8c85b451c
2017-03-21 16:45:56 +00:00
Paladox 45ebd2d55d Update Jenkins tests
Test jshint and jscs through npm using latest version of jscs and jshint.

Add support for composer.json running phplint and in the future php code
sniffer.

Change-Id: Id8f11f9414fae8313dc18a857a07e11694354dcb
2016-03-03 13:29:48 +00:00
Pavel Astakhov 740cc73d1a Go to next field when TAB key is pressed (v 3.3.0)
Bug: T118180
Change-Id: Ic86736f0c2b657bd3b56c16f9243a4f123af6d5e
2015-11-18 14:34:08 +06:00
Pavel Astakhov 82f8acd450 Fix conflict with the CodeEditor extension (v 3.2.3)
CodeMirror will be not initialized if CodeEditor is used

Change-Id: I78ab2814beb0e40a878f6a02b7d3967c216afce6
2015-11-18 11:34:36 +06:00
Pavel Astakhov 3db709ef0c Skip setCodeEditorPreference for anon users (v 3.2.2)
Change-Id: If4f208b3edd73a100404f09f170fb3a060ce1c3c
2015-10-29 09:15:29 +06:00
Pavel Astakhov e681dc6ce2 Add setContents to textSelection and JS hook for #wpTextbox1 (v 3.1.12)
Bug: T108711
Change-Id: I65f25108863339fdcfc55c030a1158c2cd789b91
2015-08-14 11:49:12 +06:00
Florian f2c5c5613b Add translateable tooltip message for CodeMirror button
Use a message, that explains a bit more, what CodeMirror is and indicate
what the button do exactly.

Change-Id: If8a0a8261cd811407cff4868dcf6475335b3f752
2015-08-10 17:57:09 +02:00