Commit graph

272 commits

Author SHA1 Message Date
Ed Sanders 1dc933bead Genericise target initialisation across namespaces
Define $editableContent on target construction, and mark
all non-ancestor nodes between that at the target container
as uneditable (50% opacity, no pointer events).

Bug: T58289
Change-Id: I7fe51104bd5aa1bd53ffc604e5f02752c7553578
2016-05-25 12:50:36 +01:00
James D. Forrester 4d580b1e6c Update VE core submodule to master (a8d9a9e)
New changes:
f50f6a9 Remove directy dependency on stylelint
c45cfeb Add <BDI> support
4e5d312 Update store hashes when modifying items in store during #sanitize
eadc310 build: Bump grunt-stylelint to v0.3.0
a55520f Fix watch path for css
f016c4d Re-clone linear data on each paste

Change-Id: I2a1340261ce1f457f28c34fb1aaec7d4966783ea
2016-05-20 23:20:31 +01:00
Alex Monk 349b1f5e57 Add WTE welcome dialog
Bug: T133800
Change-Id: I6eb43274e22f647958c3ab1b6d5c12b3dbea388e
2016-05-10 23:28:21 +00:00
Ed Sanders 216ef78cb0 [DEPRECATING CHANGE] Use canonical namespace names for enabling VE
These are more meaningful and the actual namespace IDs used can
vary, especially for extensions.

Change-Id: I781d484d7525ff09b5d348e79b63b161a7a26997
2016-05-04 18:56:00 +01:00
jenkins-bot 80636c235e Merge "Add a popup after switching into VE from WTE" 2016-04-25 22:42:55 +00:00
jenkins-bot fd5e61582e Merge "Remove IE9 from blacklist, but don't add to whitelist (yet)" 2016-04-25 19:14:34 +00:00
Alex Monk 0bbe2e38ee Add a popup after switching into VE from WTE
Bug: T131066
Change-Id: I2294da7d09dfbacb9187aba5e6e703511cec3c9f
2016-04-20 18:46:00 -07:00
Ed Sanders 4479633159 Remove IE9 from blacklist, but don't add to whitelist (yet)
This puts IE9 on the greylist, meaning it will open but with
a warning.

Bug: T133094
Depends-On: I817b286e16b7923dd4dd456467466a0128805da1
Change-Id: I55fcbd1b7c4a82e11d61d3b93b4fdb7e992fba1d
2016-04-20 00:10:26 +00:00
Alex Monk 1e04640d02 Depend on postEdit code which we use after saving
Usually this gets loaded by MW core's Article::view, but that never gets run if
we loaded on action=edit

Bug: T132825
Change-Id: I1511bea947c976cea87d92efcb2e756dc7f7c55a
2016-04-19 19:12:15 +01:00
James D. Forrester be1809c35d Update VE core submodule to master (d6c6a85)
New changes:
c48d7cc Add support for placing a toolbar dialog in the side margin
ee7e14b FindAndReplaceDialog#renderFragments: Protect against null surface
fc61463 Fix dm.Surface#getHistory to not return undone items
f1dff2f Introduce ve.Range#overlapsRange method
f608958 Introduce dm.Surface#getModifiedRanges
db114ed Move debugging data-url GIFs to a debug only file
1dd8194 Update RangeFix to 0.2.0
706ff4e Add 'Support: [browser]' to browser hack comments
4f52afc Inline slugs: Limit Firefox hack to versions <38
bf73326 Add classList polyfill for IE9
59d78aa Fix access of iframe-created document in IE9
a886ae1 Hide borders on linked images in IE9
5293974 Fix double-click to edit table cells in IE9
a49a02f Add some more Support: comments

Depends-On: I9c5cea3e8df1fae001d4d98c0782a04dec803776
Change-Id: I460368f509a213464e57bb95f2d726305ef608de
2016-04-18 18:34:20 -07:00
jenkins-bot fb592f1fe0 Merge "Update VE core submodule to master (f8be8c3)" 2016-04-11 14:24:22 +00:00
Ed Sanders f91efee467 Update VE core submodule to master (f8be8c3)
New changes:
0e3e63a Rename ve-ce-sectionNode-focused to active
0010e49 Update OOjs UI to v0.16.5
8a50357 Localisation updates from https://translatewiki.net.
a731e0e Implement ve.dm.Selection#getCoveringRange
145c754 ce.Surface: Prevent selection from spanning an active node
e430224 Move toolbar positioning logic to PositionedTargetToolbar
c4bc52c demo: Put border around whole target

Local changes:
* Adjust to cope with the new positioned toolbar class

Change-Id: I47053af8a9efb0f4c267543616a5d6c80ae1534f
2016-04-11 07:06:13 -07:00
jenkins-bot c253bfbd5a Merge "Use widgets for wiki-page-name, wiki-user-name, wiki-template-name, boolean, URL and line template fields" 2016-04-08 16:39:50 +00:00
Alex Monk 978224f2ec Use widgets for wiki-page-name, wiki-user-name, wiki-template-name, boolean, URL and line template fields
* Use TitleInputWidget for wiki-page-name and wiki-template-name parameters
* Use UserInputWidget for wiki-user-name parameters
* Use a custom hacky CheckboxInputWidget child class for boolean parameters
* Borrow some ve.ui.MWExternalLinkAnnotationWidget.prototype.createInputWidget code for url parameters
* Use a TextInputWidget with multiline disabled for line parameters

Not dealt with in this commit, so fallback to existing behaviour:
* string
* number
* unknown
* content
* unbalanced-wikitext
* date
* wiki-file-name

Bug: T55613
Bug: T124734
Bug: T124736
Change-Id: If04944d64303d959e8dd605e75a175895932b788
Depends-On: I87699a93ca1b34c6d248456fcc060f584623d158
Depends-On: I5e97604f0fc24176d5e89899bf0505dc442a1a7e
2016-04-06 22:07:19 +01:00
James D. Forrester 4479c56b5a Update VE core submodule to master (5109934)
New changes:
14a02d3 Add article/section nodes for isolated editing sections
fa1b64a SectionNode: Don't set self as active node if a descendent is active
90f05cc Sections: Make sections & articles un-unwrappable
9518d4b SurfaceFragment#delete: Check removal is not a no-op
5109934 Section nodes: Use opacity to indicate active-ness

Change-Id: I3e89e8fa2db130f21e7d58231043b775ec51dc18
2016-04-05 19:03:06 +03:00
James D. Forrester 0b39a17870 Update VE core submodule to master (18bac29)
New changes:
3e587b8 sync-gh-pages: Fix "oojs-ui-apex.vector.css" 404 Not Found
0e53633 Toolbar: Add tooltip to structure group
7f0b6f7 Remove icon properties from windows
3a612b2 Fix positioning of mobile windows

Change-Id: I2a6995e61a76abfc0f77d3301c7c76593756463c
2016-03-29 10:10:26 -07:00
James D. Forrester e46e81916d Update VE core submodule to master (b286f7f)
New changes:
1f298ce Update OOjs UI to v0.16.4
650776a Improve drop target preview for block node dragging
77fb965 LinearArrowKeyDownHandler: test more
0f669bf Fix behaviour of SurfaceFragment#annotateContent
fa08fca ve.ui.ContentActions: Add tests
3f4185f Tests: Add speed warnings to UI surface constructors
4bee4eb Localisation updates from https://translatewiki.net.
b678dbe Refactor getNodeAndOffset
254a802 Localisation updates from https://translatewiki.net.
0f0d980 SurfaceFramgent: Guard against tx.getModifiedRange returning null
603abe4 TriggerRegistry: Alter trigger for paste special on Mac to OS standard

Change-Id: I512c9b3a99673a876040e0fce789483e7221a78c
2016-03-25 15:30:43 -07:00
Ed Sanders fd3683e414 Update VE core submodule to master (d1ce123)
New changes:
6cf8864 Follow-up eb97c1f: Fix build for added language 'inh'
d1ce123 SpecialCharacterDialog: Use getReadyProcess promise to wait for char list

Local changes:
* SpecialCharacterDialog: Defer loading of character list.
  Saves ~40k for most users who never use it.

Change-Id: I74b30fee96e1ae4463ed28c19bef4b515330220e
Depends-On: I45dc9f788aa5bd702b91ffd9f63b05b1f4760691
2016-03-22 09:15:23 -07:00
James D. Forrester 7df0e7589e Update VE core submodule to master (eb97c1f)
New changes:
e661245 Localisation updates from https://translatewiki.net.
d0bac53 ElementLinearData: Add test for sanitize conversions
53988e4 ElementLinearData: Test blacklist unwrapping
8593098 ve.dm.Model: Remove unused, untested method 'hasAttributes'
6247dd2 ce.Surface: Add tests for table strip delete
bee1851 ce.Surface: Add larger table strip-delete test
42d39e7 ce.Surface: Test table navigation with enter/escape/tab/shift-tab
5d248f9 Remove TableCaptionCommand
a86ad04 PreviewElement: Check node is a GCN, and always return a boolean
b518839 Localisation updates from https://translatewiki.net.
8834e9c ce.Surface: Allow any key code in the key handler tests
6b3ea6a ce.Surface: Linear arrow tests for block node
026999d Localisation updates from https://translatewiki.net.
eb97c1f Localisation updates from https://translatewiki.net.

Change-Id: Ic5853116d97623316d9a6bbacda2ecab9e4b49d5
2016-03-22 15:12:36 +00:00
Alex Monk 3288d4e3f9 Show redirect target inside target
Bug: T63861
Depends-On: I71d3d415fe918e8b0a090860cad9271092b1bd7e
Change-Id: I5a138b95e04773885ca9ee548026729805eb11f0
2016-03-17 15:21:06 +00:00
Alex Monk c2fb616786 Remove message entries for messages that got deleted a month ago
Follow up to I9cf2aa50

Someone should figure out why some of these still have translations

Bug: T129704
Change-Id: I23e4c72fc07c4decf43b8b3a76bb5515731e737c
2016-03-12 22:09:08 +00:00
Alex Monk d2a9aefba7 Better handling of read-only mode
* Don't just fail to load, action=visualeditor itself should not write to the DB
  (we have action=visualeditoredit for that)
* Send notice to the client in the usual way
* Handle read only errors on save, log as unknown

This won't let you review changes because that uses visualeditoredit

Bug: T129501
Change-Id: Id78c06b031423e47a7ddf94ec615b6d6975309d3
2016-03-10 21:02:52 +00:00
jenkins-bot fe19bfb0af Merge "Use iconWhenInvisible for alien extension nodes" 2016-03-07 18:34:38 +00:00
Ed Sanders bbf86a6768 Use iconWhenInvisible for alien extension nodes
Change-Id: I0bc9bfd040685855402f705f46973e36c42dc0db
2016-03-07 18:15:45 +00:00
jenkins-bot c930ac2779 Merge "Wikitext paste: Move MWWikitextStringTransferHandler matchRegExp into a registry" 2016-03-07 16:32:13 +00:00
Ed Sanders 5cc10a810a Wikitext paste: Move MWWikitextStringTransferHandler matchRegExp into a registry
This allows extensions to register their own rules for detecting wikitext,
e.g. matching '<ref>'.

Bonus: Strip the autogenerated <references/> tag which
gets inserted when converting a <ref>.

Bug: T128805
Change-Id: I7a38db45d25e86ff3f3f6199aa04425ec98f7cc4
2016-03-05 22:47:00 +00:00
Roan Kattouw 6322be2e07 Handle API errors when refetching the edit token
This can happen when the user gets logged out on a private wiki.
We get a badtoken error, so we try to refetch the token, which
itself returns an error. Token refetches didn't have error handling
at all and got the save dialog stuck in the pending state.

We can't offer the user to proceed with a different identity here,
because we encountered an error while trying to figure out what their
current identity is. The best we can do is encourage them to
log back in in a different tab.

Bug: T128934
Change-Id: I17d4452f688ec22631dbd12af223731635004d66
2016-03-04 18:06:33 -08:00
James D. Forrester e7db4517d1 Update VE core submodule to master (8450592)
New changes:
cea967f Use upstream highlightQuery method in OOUI
07bcff1 Update OOjs UI to v0.16.0
6296fd4 Handle Enter keyPress without matching keyDown
3c2a3b4 Localisation updates from https://translatewiki.net.
c2d64c9 GeneratedContentNode: Check model existence before using
c1a350a FindAndReplace: Always focus dialog when using command
cdd9581 Follow-up I534ce003: Surface#getViewportRange: Fix typo

Change-Id: I4c61e85d43486731e0b20d3a26f23fabe7482861
2016-02-25 15:54:27 -08:00
jenkins-bot b616785927 Merge "Put jquery.uls.data dependency in the correct place" 2016-02-22 23:24:35 +00:00
Ed Sanders 63c207b183 Put jquery.uls.data dependency in the correct place
This module is (and always has been) referenced by
ve.init.mw.Platform, so ensure it is loaded before that.

Previously this was not a problem because it was inside a
function that was never run unless the language search widget
was invoked.

This probably makes a good case to not put these functions
in platform, but that is for another day.

Bug: T127736
Change-Id: I119b27a397b15628a8de5f0b32ae636bc73a8ba4
2016-02-22 22:31:30 +00:00
jenkins-bot 74b2489276 Merge "Link to file description pages in media dialog" 2016-02-22 21:07:43 +00:00
Ed Sanders deb676e73d MediaDialog: Use CC logo from upstream (ooui-icons-wikimedia)
Change-Id: I4fabf5f8d87b9b21623883203b9d6965a0ff33a0
2016-02-21 18:20:30 +00:00
Alex Monk ca5cab52af Link to file description pages in media dialog
Bug: T125227
Change-Id: I243f5479ab27ab098d41db08ff4a53195d382577
2016-02-21 03:45:37 +00:00
James D. Forrester cebaacb546 Update VE core submodule to master (cdfd84e)
New changes:
c02ea46 Clarify documentation of directionality methods
43c9b6f Move initialisation browser support checking from downstream
c89be66 Localisation updates from https://translatewiki.net.
5fb7907 Follow-up c89be66: Fix build for added language 'nan'
fc74fab dm.ElementLinearData.compareElements: Add a few missed test cases

Local changes:
Use initialisation browser support checking from upstream

Depends-On: I27a8e7b4376647f01cee648de987dc3ca6a060d5
Change-Id: I3fc79422ee5e487cf5fae3929fe492f21cd2840a
2016-02-17 20:04:16 -08:00
jenkins-bot 2a5ca23f80 Merge "Revert "Re-add null appendix tab messages to extension.json"" 2016-02-17 00:50:34 +00:00
jenkins-bot 4a751524c4 Merge "Edit mode switch: Show popup next to VE switch button" 2016-02-10 01:51:57 +00:00
Ed Sanders 80124c88a6 Edit mode switch: Show popup next to VE switch button
Only show if the user came from VE.

Change-Id: Ic362ba534d135fca5516c8ba401f6b2a22886ff1
2016-02-10 01:36:32 +00:00
Alex Monk 03a10bc443 Revert "Re-add null appendix tab messages to extension.json"
This reverts commit c4a1e2a3f7.

Bug: T125249
Change-Id: Ifebfb7979e05efe1bd723e4f84f6e43088c9c85e
2016-02-09 18:43:13 +00:00
James D. Forrester 2837cfb400 ext.visualEditor.desktopArticleTarget.init: Depend on mediawiki.user too
Change-Id: I8df684ae582a2caef051a04ee99b9f518ecf567a
2016-02-09 10:38:22 -08:00
Ed Sanders c51cef07b9 DesktopTarget: Move generic VE desktop styles into a separate module
Here they can be re-used by other VE desktop targets,e.g. Flow.

Change-Id: I18431ff73fc1c6ab5639a579e85b0f0cc48cb9ce
2016-02-07 17:39:57 -08:00
James D. Forrester 1e0486a679 Remove all Extension:Cite code, now moved there
Depends-on: I39936ed83d5a60471a0a75da753f498e80aef234
Depends-on: Ifd853bf9f901065798bd0063aeaa786a3761aa71
Depends-on: I32c93c5118eafe5f071252290c58d3de8dacc81a
Change-Id: Iba0f25b3ebe4e5e63377da57afb760d6980f9907
2016-02-05 21:36:56 +00:00
Timo Tijhof 7099ae0eef Fix "Uncaught TypeError: $.cookie is not a function"
Was being thrown on all read pages and caused VE to no longer
load properly.

Three places make use of $.cookie():
* ve.init.mw.DesktopArticleTarget.init.js
* ve.init.mw.DesktopArticleTarget.js
* ve.ui.MWEducationPopupTool.js

Presumably this worked by luck previously due to another extension
or core module depending on it and loading earlier but no more.

Change-Id: I6b00822f1d5d17add3e298cbd77f4790899aaec2
2016-02-03 16:50:31 +01:00
Ed Sanders 6d97858188 Update VE core submodule to master (53476f4)
New changes:
b558ef1 Localisation updates from https://translatewiki.net.
53476f4 Move logic for showing icon for invisibles to focusable node

Change-Id: I4bda82918cb54a3cc77523137fa297960b1b1ba0
2016-02-02 10:06:43 -08:00
Ed Sanders db5ed236dd Add controls for wikitable and sortable to table dialog
Bug: T95189
Depends-On: Ife3f3505b845db28dd29a07e9be1533c39726ce1
Change-Id: I1672d8cd2e138df1fad19dcfd948700942e87f2c
2016-02-01 10:58:42 -08:00
Ed Sanders 74358498da Update VE core submodule to master (70ff8cc)
New changes:
242ab45 DesktopContext: Float the context when it goes beyond the viewport
405c44d Rename TableContext to TableLineContext
6c564be Sort messages alphabetically
70ff8cc Introduce table and table cell context

Change-Id: I4357162bc192c90f99ca0aec12eb67bf848e5504
2016-02-01 10:51:26 -08:00
Ed Sanders 5e296a959b Sort messages alphabetically
Change-Id: I45b440b1b020ea79ab4c1eba78effb526c41ddc4
2016-02-01 17:36:43 +00:00
Alex Monk c4a1e2a3f7 Re-add null appendix tab messages to extension.json
Some old code (pre-Icebc378f) is still relying on these existing,
and some users are getting it loaded somehow.

Bug: T125249
Change-Id: I83190da98478bc702c23dfff2091cc5480174958
2016-01-31 18:25:23 +00:00
James D. Forrester 7b87c1e9b8 Follow-up dc3aa815: Add i18n strings for table moving commands
Change-Id: I12db538aaa2b4f6725bb757321369c805708ce14
2016-01-29 19:02:41 -08:00
James D. Forrester dc3aa815ed Update VE core submodule to master (526e1bf)
New changes:
79546b8 Tables: Add slugs for missing cells in sparse tables
f723301 Tables: Multi-cell copy and paste
2548fac Spoil the fun of guessing what current[0] and current[1] mean.
db7c9aa Localisation updates from https://translatewiki.net.
526e1bf Tables: Move columns and rows

Change-Id: Id8d5f091cbca36c54f78f90bd2ac7aa2e6dacd1b
2016-01-28 13:14:17 -08:00
jenkins-bot f78dd8ad72 Merge "MWWelcomeDialog: Let the user switch editors" 2016-01-27 00:20:10 +00:00