Commit graph

6147 commits

Author SHA1 Message Date
Ed Sanders 62e9b6a939 Prevent content selections ending up inside handlesOwnChildren nodes
The delete logic sees the caption inside the image as a valid place to
put a cursor and therefore a valid range to delete up to. This means
paragraphs can be merged into image captions by backspacing them in.

Add in a flag that keeps track of whether we are in a handlesOwnChildren
node so we can skip over them.

Bug: 57927
Change-Id: I19e91d2d3a871806d207cbd419f4a45e41d69dc0
2013-12-05 16:45:28 +00:00
James D. Forrester 769f3ef0db Blacklist all versions of IE, as IE11 is now out
… and is completely broken still.

Change-Id: Ib8ddd40892688bd919ccc9d690e7bd3f2de6645e
2013-12-02 19:29:08 -08:00
jenkins-bot b5f04fe9e0 Merge "Use a global resizing flag on the surface to hide phantoms" 2013-12-03 03:22:56 +00:00
jenkins-bot 334bb899be Merge "Pressing enter in a list with no nearby content creates a paragraph" 2013-12-03 03:07:19 +00:00
jenkins-bot 76e3d9ec89 Merge "ve.ce.Surface.handleEnter tests" 2013-12-03 03:03:35 +00:00
jenkins-bot ad2fac3f92 Merge "Genericise runSurfaceHandleDeleteTest to work with other 'handle' methods" 2013-12-03 02:59:09 +00:00
jenkins-bot 7bc8da6fab Merge "csslint: Add .csslintignore file and update gruntfile" 2013-12-03 02:55:30 +00:00
jenkins-bot 164a262aeb Merge changes I8c8b2d49,If2124c68,I786b63ab
* changes:
  Split apart onSaveError logic for other mw targets
  mw.ViewPageTarget: Remove unused onTokenError handler covered in onSaveError
  Create base MobileView config and target refactor
2013-12-03 02:11:57 +00:00
Rob Moen db970a61fc Split apart onSaveError logic for other mw targets
Change-Id: I8c8b2d4900b511a65cff4c554cf7ef89d6d39ea9
2013-12-02 18:04:29 -08:00
Rob Moen a701e87caa mw.ViewPageTarget: Remove unused onTokenError handler covered in onSaveError
Change-Id: If2124c68aab0d313f4ddd698014d2a4296bbabb8
2013-12-03 02:02:03 +00:00
Rob Moen f1fa56165d Create base MobileView config and target refactor
Changes include:
* Target mobile for ve dependencies
* Create mobile view constructor
** Some tools like dialogs are excluded for now
* Refactor mw.target to permit code reuse
** Split out pageTarget view functionality from core init methods

Change-Id: I786b63ab57518fc6af7761501259ed66592f70e3
2013-12-02 17:59:27 -08:00
jenkins-bot c06316eb64 Merge "Make veaction=edit work regardless of user preference" 2013-12-02 23:43:52 +00:00
Timo Tijhof a49195ac55 csslint: Add .csslintignore file and update gruntfile
Add .csslintignore file for the csslint run by Jenkins.

Also updating our Gruntfile for local usage to include demos,
which Jenkins is going to include as well (as it uses an ignore
blacklist instead of whitelist).

Change-Id: I9114cfc54e82f090f0fcf62155ef7c1a9261548d
2013-12-03 00:15:50 +01:00
jenkins-bot 4c54865134 Merge "Re-order command registry to match toolbar order" 2013-12-02 22:51:52 +00:00
jenkins-bot 5ca96e805f Merge changes I177877bf,I49a02b5d
* changes:
  Use visibility: hidden; for the ui.Context and its popup
  Followup eb95d7b0b2: don't hide the inspectors WindowSet at all
2013-12-02 21:18:55 +00:00
jenkins-bot e223156d06 Merge "Fix JS errors when inserting references" 2013-12-02 21:15:32 +00:00
Roan Kattouw 1df63b8a63 Use visibility: hidden; for the ui.Context and its popup
They contain iframes and those need to not be display: none;
in order to make Firefox happy.

Bug: 57568
Change-Id: I177877bff3c3b18bfc87ee4e6afa7e60fea26ffc
2013-12-02 13:03:06 -08:00
Translation updater bot 9e233c4a7a Localisation updates from https://translatewiki.net.
Change-Id: I4ef6e82d38f98bb2c6373bea1d9ffec985b5e250
2013-12-02 20:41:40 +00:00
Roan Kattouw 07671c6b53 Followup eb95d7b0b2: don't hide the inspectors WindowSet at all
There's no point in hiding the WindowSet if we've already closed the
open window in it. In fact, there's no point in hiding a WindowSet
pretty much ever.

Change-Id: I49a02b5d255b266eb9e0a537cb64082eb0ad5e4b
2013-12-02 12:29:33 -08:00
Roan Kattouw f8ff2023c3 Fix JS errors when inserting references
ve.ui.MWReferenceDialog.prototype.teardown:
* Pass ranges rather than nodes to transaction builders
* Don't do a removal in insertion mode, we know the removal range
  will be empty

ve.dm.Transaction.newFromDocumentInsertion:
* Correctly splice the edited internalItem into listData in the case
  that newDoc isn't a document slice of doc
* Rename range to spliceItemRange for clarity
* Introduce spliceListNodeRange and set it to either newDoc's
  listNodeRange or doc's depending on whether newDoc is a slice of doc

Bug: 57683
Change-Id: Iae7de7701ae86bed89b707038407243d82249e1a
2013-12-02 11:35:00 -08:00
jenkins-bot 8c1f58979e Merge "Use visibility: hidden; to hide inspectors" 2013-12-02 19:26:07 +00:00
Roan Kattouw eb95d7b0b2 Use visibility: hidden; to hide inspectors
Using display: none; on the inspectors WindowSet causes Firefox to
neglect to load CSS in the inspectors' iframes, which means the frame
never initializes and the inspector never opens.

Bug: 57568
Change-Id: Ia1a0ce78754fa1318a7d439abe1f0e2f86420e7a
2013-12-02 10:42:31 -08:00
jenkins-bot 649c1aeb9e Merge "Add focus and blur events to ce.Surface" 2013-12-02 18:35:39 +00:00
Ed Sanders 456c97d912 Pressing enter in a list with no nearby content creates a paragraph
Currently we assume getNearestContentOffset will give us something
sane however it can return -1 when there is no nearby content and so
an exception is thrown. In this case we have to create an empty
paragraph to place the cursor in.

Change-Id: Ic6c19da881e47ff6be45cdaa4b71bfcc1c654796
2013-12-02 15:57:43 +00:00
Ed Sanders 519e54d463 ve.ce.Surface.handleEnter tests
Change-Id: Ic30cd4e116029be85822f73dcb84938e641bc4b9
2013-12-02 15:57:41 +00:00
Ed Sanders 96e2313e6e Genericise runSurfaceHandleDeleteTest to work with other 'handle' methods
We will want to reuse this test runner for handleEnter and handleInsertion.

Change-Id: I7489bf2d20fa17b1c164ff20e0cfcd9b9d5102d2
2013-12-02 15:52:44 +00:00
Ed Sanders 76091d4474 Re-order command registry to match toolbar order
Bonus: fix grammar in DialogAction comment.

Change-Id: I0fdf5f028f7191b0d662456ec1506490d7439a1a
2013-12-02 14:18:03 +00:00
jenkins-bot 97adcc2103 Merge "Tear down the save dialog and remove it from memory on surface teardown" 2013-12-01 22:23:06 +00:00
Translation updater bot b8ff6dac4d Localisation updates from https://translatewiki.net.
Change-Id: Iba1328c19f95b6fe3cfad87c1e4752a2074ec844
2013-12-01 19:58:00 +00:00
jenkins-bot 10f745932e Merge "Render MW extension node wikitext with XML" 2013-12-01 19:06:30 +00:00
Ed Sanders 7982ecf2c3 Render MW extension node wikitext with XML
MW extensions are XML not HTML, so we shouldn't build them as XML
to prevent HTML specific rules being applied, such as <source>
always being self closing.

Bug: 54577
Change-Id: I84af4a29cd1c4ae4d1db4f70a4012a8ad0f98bf6
2013-12-01 17:13:39 +00:00
Translation updater bot 8786486289 Localisation updates from https://translatewiki.net.
Change-Id: I976bfc2217745b29ff5b7778077dda89bc8f2bf9
2013-11-30 19:55:33 +00:00
jenkins-bot 2cf336b958 Merge changes Icb404af8,Ib6efc2a5,I6d48f8ee
* changes:
  Make autonumbered external links inspectable
  Always remove the annotation when the remove button is clicked
  Add abstract getAnnotation() method to AnnotationInspector
2013-11-30 08:58:09 +00:00
Roan Kattouw 93b645a453 Make autonumbered external links inspectable
When the target of an autonumbered link is changed to a URL, it's kept
as an autonumbered link and its target is updated. When the target is
changed to a MediaWiki page, the autonumbered link is removed and
replaced with an internal link with the text set to the target.
So for instance, if you inspect [http://www.example.com] and change
its target to "Foo", the result will be [[Foo]].

The core of this commit adds support for inspecting nodes to
ve.ui.LinkInspector. This support should probably move into a
class in between AnnotationInspector and LinkInspector, perhaps
called HybridInspector or something, but I'm deferring that for now.

LinkInspector allows changes to inspected nodes to be reflected either
as attribute changes on the node, or by replacing the node with something
else. MWLinkInspector uses this feature to replace the autonumbered
external link node with an internal link annotation when the target is
set to an external link.

Bug: 53505
Change-Id: Icb404af84c24574438e4de3ef05bbd1993b593f7
2013-11-30 00:14:41 -08:00
Translation updater bot ee7eb817ec Localisation updates from https://translatewiki.net.
Change-Id: Ieac5d8326e80acf72160b4a3a60f295c1577f86f
2013-11-29 19:32:18 +00:00
Roan Kattouw 8739772531 Add focus and blur events to ce.Surface
Didn't bother to deduplicate blur-focus event pairs that occur when the
focus moves from the documentNode to the pasteTarget or vice versa
(this happens when switching between normal selection and FocusableNode
selection).

Change-Id: If1ccd2fbf11de956b6c2364ae81b9dc20a1bf409
2013-11-27 21:56:34 +00:00
Translation updater bot 4d76d9382b Localisation updates from https://translatewiki.net.
Change-Id: Iae9280bb9373b27f0764afbc19da57f7de280ea6
2013-11-27 19:28:46 +00:00
cmcmahon c65a683ecf [browser test] more shuffling of elements among iframes
Change-Id: I1a60e2370fc436702d983705d7360563f5483242
2013-11-27 09:05:58 -07:00
Roan Kattouw e41cb61814 Always remove the annotation when the remove button is clicked
Remove weird check that prevented a removal from happening if the
subclass's getAnnotation() method returned null.

This caused a bug where if you inspected a link, typed an invalid
link target (e.g. '|'), then clicked the remove button (trash can icon),
the inspector would close but the link wouldn't be removed.
However, if you typed something that was a valid link target (or didn't
touch the input at all), the remove button would work as expected.

Change-Id: Ib6efc2a5827b109c6b38185e6d89b7bb29b13a75
2013-11-27 14:55:33 +00:00
Roan Kattouw 0fe4a7778e Add abstract getAnnotation() method to AnnotationInspector
It was relied on, and all subclasses had one, but for some reason
it wasn't defined as an abstract method.

Change-Id: I6d48f8ee666bd339be87744840c6edb4abb56dbf
2013-11-27 14:52:18 +00:00
Ed Sanders 5b9231d49d Tear down the save dialog and remove it from memory on surface teardown
Otherwise the old save dialog will still be around if the user sets up
another surface (e.g. a second edit), but won't be attached to the DOM.

Bug: 57654
Change-Id: I23c10849a212534bdd0600637d8ad4fa3ebc4fb7
2013-11-27 14:00:16 +00:00
cmcmahon 0a091193f9 [browser test] elements moved among iframes
Change-Id: Icc9f3f4422dfed063073724f8b610e75fd967b2d
2013-11-26 18:55:21 -07:00
Timo Tijhof c852bf6000 ve.js: Coding style fixup for 6f2090aac6
Change-Id: I5ef9d590b5cc573df64f1c9099c79207c471cfb6
2013-11-26 23:00:24 +00:00
jenkins-bot 96cace53bc Merge "Note language links need to be edited on Wikidata" 2013-11-26 22:54:00 +00:00
jenkins-bot 91f00b0eaf Merge "Revert model to use simple UTF-16 code units" 2013-11-26 22:53:06 +00:00
jenkins-bot af9e6dd263 Merge "mw.ViewPageTarget: Use ve-activated class on the html element" 2013-11-26 22:52:14 +00:00
jenkins-bot c18534bcad Merge changes If814e178,Id133431e,I38d63e31,I16d575b6
* changes:
  Plain text paste with paste special
  Use rare unicode characters for paste placeholders
  Rich paste
  Add fixUpInsertion to newFromDocumentReplace
2013-11-26 21:07:46 +00:00
Rob Moen b37fbf9ba9 mw.ViewPageTarget: Use ve-activated class on the html element
This allows things outside of VisualEditor to style themselves
differently while the editor is active.

Bug: 57555
Change-Id: Ief6b5f53096dd5eeb43a72a7bb182a2c04ec97ca
2013-11-26 20:41:27 +00:00
Translation updater bot 1e77fad405 Localisation updates from https://translatewiki.net.
Change-Id: I20b98ddc532ac32388cabd63c9125b71cb7399b3
2013-11-26 20:24:29 +00:00
jenkins-bot 3b63e332b5 Merge "Also apply autonumbering CSS to links in generated content" 2013-11-26 20:13:24 +00:00