Commit graph

6006 commits

Author SHA1 Message Date
jenkins-bot f61227fc3c Merge "Make tools disable correctly" 2013-11-13 00:54:38 +00:00
cmcmahon d2165ad8fb [browser test] identifier for Link close element changed
Change-Id: Ia923c775315af9f0cd7017e0b02e621b3d9112b4
2013-11-13 00:23:50 +00:00
Roan Kattouw ec1c57330c Rename remapInteralListIndexes() to correct typo
Change-Id: Iebd2cebfd1a323b40d35ffbe1b908b0b7cb6c826
2013-11-12 14:39:38 -08:00
jenkins-bot fca76cf296 Merge "Fix docs for ve.dm.Model.getAttributes" 2013-11-12 21:01:03 +00:00
Translation updater bot d5b6ba5321 Localisation updates from http://translatewiki.net.
Change-Id: Ifc8ee0848e7aaffb256ded8c43b3ddb1b87e2ffc
2013-11-12 20:33:39 +00:00
Trevor Parscal a6dca1bfef Fix docs for ve.dm.Model.getAttributes
Prefix is optional

Change-Id: Idb436ba4755b79dfab07dc8e8266b1716a26b58b
2013-11-12 12:23:34 -08:00
Trevor Parscal 22287cd3d3 Make tools disable correctly
* Respect disabled state when handling clicks
* Style disabled tools in lists correctly

Change-Id: I14dffa3248ffa5d32403c6145381cfabdc2d7ff1
2013-11-12 12:13:56 -08:00
Trevor Parscal 65a2f41268 Cleanup after window refactor
Related to: I82c4fed8bcb3fb5630938c8bc4dd9b2d5f1a8c1d

Change-Id: I4cc280725315fee0c5dd042479d4373cc0cdd0b4
2013-11-12 12:02:28 -08:00
jenkins-bot a2d9925e3a Merge "Use mw.util.getUrl instead of mw.util.wikiGetlink (deprecated)" 2013-11-12 17:36:41 +00:00
Timo Tijhof 98bc6adf1f Use mw.util.getUrl instead of mw.util.wikiGetlink (deprecated)
Change-Id: I72afbbd909ce2394d54f78d465bd8ad245c1694f
2013-11-12 18:34:05 +01:00
jenkins-bot 0f9eb502a2 Merge "Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating" 2013-11-12 12:15:15 +00:00
Translation updater bot ed3172d0f8 Localisation updates from http://translatewiki.net.
Change-Id: I8074572fae263f9eb4e404170cb35cbadcd1dacd
2013-11-11 20:20:17 +00:00
Translation updater bot 51a7807fd2 Localisation updates from http://translatewiki.net.
Change-Id: I20148f3abe2e53b2b81f9c9dde2153d67cb1f27a
2013-11-10 20:30:29 +00:00
Roan Kattouw df3a61e874 Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating
The generation promise can get resolved (e.g. AJAX request can complete)
after the node has been detached. In that case accessing this.model.doc
will fail, so check for this in doneGenerating().

Also attempt to abort the pending promise on teardown.

Bug: 56649
Change-Id: Ia55f1c2c8dc3a3619c0b50795e50fcae4bc6471f
2013-11-09 17:42:38 -08:00
jenkins-bot 3adeb4e3fb Merge "Fix edit source switch in Firefox" 2013-11-10 01:42:01 +00:00
Ed Sanders 26726ee31d Fix edit source switch in Firefox
Previously was failing for two reasons:
1. FF requires the form to be attached before submitting
2. options.watch failed because of FF's annoying Object.prototype.watch

Bug: 56767
Change-Id: I7b3d349f057f5b87f823ce788b4143f817af5303
2013-11-09 17:39:53 -08:00
Translation updater bot 9149bca6fe Localisation updates from http://translatewiki.net.
Change-Id: I4f694fd5a99641533eb08fc4f21a361240af4613
2013-11-09 19:14:44 +00:00
jenkins-bot fdd4246237 Merge "Window refactor" 2013-11-09 03:08:54 +00:00
Moriel Schottlender a7c3e9689a Force LTR direction in MWSyntaxHighlightDialog
Syntax highlight editor shouldn't rely on GUI language directionality
but always allow for LTR text editing.

Bug: 56780
Change-Id: Iae7f9eee20ffb9a003830503865458918f5e1df3
2013-11-08 13:00:39 -08:00
Trevor Parscal 4192cbc4d5 Window refactor
Changes:

* Cleanup the window API to use more consistent and intuitive methods - we
  now use initialize/setup/teardown instead of
  initialize/onSetup/onOpen/onClose as methods which are overridden, and
  use open/close methods to control the window
* Change events around to have opening/open and closing/close events which
  act as before/after points during the opening/closing process
* Make WindowSet and Context respond to windows being opened, rather than
  opening them directly
* Fix a LinkInspector creation mode bug where the initial text doesn't get
  reset
* Move inspector, a VisualEditor concept, back to VE
* Cleanup naming of SurfaceDialog, SurfaceToolbar, etc. to use shorter
  names, they were given Surface* names when the generic ones were also in
  VE, but now the generic ones are in OO, so they can return to their
  original names

Change-Id: I82c4fed8bcb3fb5630938c8bc4dd9b2d5f1a8c1d
2013-11-08 12:33:25 -08:00
jenkins-bot d64801c86a Merge "MWExtensionInspector input direction based on content" 2013-11-08 19:29:58 +00:00
Moriel Schottlender 53f4b2f1ea MWExtensionInspector input direction based on content
In general, the direction of the MWExtensionInspector textarea
should be dependent on the directionality of the node it is editing.

The only exceptions are <hiero> and <math> that need to have their
textarea LTR always; these two inspectors' directionality definition
is overridden in their onOpen() method.

Bug: 56779
Change-Id: Iac5c1c3bf2c61b9fa36c9588c1734c91ca4305c4
2013-11-08 11:27:02 -08:00
jenkins-bot c0ee282b16 Merge "Add shortcut commands for underline & sub/superscript." 2013-11-08 19:02:50 +00:00
jenkins-bot 8de944d9f3 Merge "Adapt beta features icons for RTL" 2013-11-08 18:57:54 +00:00
jenkins-bot efac869499 Merge "Add <ref> tags to wikitext detection regex" 2013-11-08 18:56:24 +00:00
jenkins-bot 8a9ebd13b7 Merge "Slight refactoring of global VE language variables" 2013-11-08 17:32:27 +00:00
Amir E. Aharoni e7b3ff3f32 Slight refactoring of global VE language variables
Grouping multiple $out->getTitle()->getPageLanguage() calls 
and updating its use instead of the global $wgContLang

Change-Id: I1bc0e83cbd31a95b1716665314e082d5ed9113ea
2013-11-08 17:30:33 +00:00
Amir E. Aharoni 1ba0fe0e83 Adapt beta features icons for RTL
Split the current icons to rtl and ltr versions.

Rename all the current mentions of beta icons to ltr and rtl,
even those that don't yet exist or are commented out.

Change-Id: I96be20515cc9d84d2d71ac7e65d97d72d96636b0
2013-11-08 18:33:53 +02:00
cmcmahon f8d0cbded5 [browser test] one more variable string no longer hard coded
Change-Id: Ifa4917442707d0c83799ea7e018ae1c4aa7bb4c6
2013-11-08 09:19:30 -07:00
cmcmahon 53cb5a3ffd [browser test] edit string no longer hard coded
Change-Id: I8d9e9ae2cafa18a9a680abdca8c4224ef10a08b6
2013-11-08 07:35:38 -07:00
Ed Sanders 20063995b2 Add shortcut commands for underline & sub/superscript.
Underline is particularly important as CE will apply underline
formatting automatically when you press Ctrl+U but the
SurfaceObserver will not notice it, leading to inconsistency
between the view and the model.

For sub/superscript I've used the Google Docs key mappings as these
appear to have the fewest conflicts with existing browser shortcuts
and there isn't much consistency between desktop clients anyway
(Word and Open/LibreOffice use completely different shortcuts).

Bonus: reordered command lists to be consistent with UI layout.
Change-Id: I92998e42f9bcfb932d44e8f483811efd538e5981
2013-11-08 13:55:08 +00:00
Roan Kattouw 6f650d9a61 Add <ref> tags to wikitext detection regex
Bug: 56755
Change-Id: Ib7279401601147420441e77e4796b94fe91ac956
2013-11-07 17:47:33 -08:00
jenkins-bot d2da45ec36 Merge "Add a whole bunch of new ve.track() events for instrumenting loading and saving" 2013-11-07 23:57:57 +00:00
Roan Kattouw d6a00d689e Add a whole bunch of new ve.track() events for instrumenting loading and saving
Renamed events:
* performance.domLoad --> performance.system.domLoad
* performance.domSave --> performance.system.domSave

New events:
* performance.system.activation: total load time
* performance.system.domDiff: timing of paction=diff; like .domSave
* performance.system.domSerialize: timing of paction=serialize; like .domSave
* behavior.lastTransactionTillSaveDialogOpen: time from last transaction
  until user opened save dialog
* behavior.saveDialogOpenTillSave: time from save dialog opening to user
  clicking save
* behavior.saveDialogOpenTillReview: time from save dialog opening to user
  clicking review (skipped when a cached diff is shown)
* behavior.saveDialogClose: when user closes save dialog; duration is time
* performance.user.saveComplete: time from user clicking save to successful
  save completion; 'retries' indicates # of badtoken retries
* performance.user.saveError.*: time from user clicking save to failure;
  'retries' indicates # of badtoken retries
** performance.user.saveError.abusefilter
** performance.user.saveError.badtoken: token was bad and we prompted the user
** performance.user.saveError.captcha
** performance.user.saveError.editconflict
** performance.user.saveError.empty
** performance.user.saveError.spamblacklist
** performance.user.saveError.unknown
* performance.user.reviewComplete: time from user clicking review to diff showing
* performance.user.reviewError: time from user clicking review to diff failure
  since dialog was opened

Change-Id: I9815fa637d34c766c163e181d2f9527d3f32a7c3
2013-11-07 15:42:52 -08:00
jenkins-bot d3ea3835fd Merge "Fix image resize handles update on surface change" 2013-11-07 21:09:32 +00:00
jenkins-bot f93531a6e0 Merge "Restore selection when editor is refocused" 2013-11-07 20:38:53 +00:00
Translation updater bot 0aee2f7849 Localisation updates from http://translatewiki.net.
Change-Id: I4366816b15e4f477021a6f94c2eb3e25fd692715
2013-11-07 20:22:50 +00:00
Roan Kattouw 500570b4ca Restore selection when editor is refocused
When the editor is focused, the selection goes back to the start of
the document. This was remedied in the .focus() method, but not in
response to native focus events, so when external code blurred then
refocused the editor, the selection would move to the top.

This broke section editing on wikis where ULS is installed: the
selection would be initialized at the start of the section, but then
ULS would load and blur the documentNode (by focusing the pasteTarget)
and then focus it again, so the selection would move to the top.

Instead of restoring the selection only in .focus(), restore it in
response to focus events on the documentNode. When this is done,
saving and restoring the scrollTop is no longer needed.

Bug: 56651
Change-Id: I14700174ee092f9b208215d31a7d1871078a89bf
2013-11-07 12:09:02 -08:00
cmcmahon ca2a7ce38f [browser test] input string no longer hard coded
Change-Id: I361b3ea025e405d1fc5a2e12c3c85d177147b90d
2013-11-06 17:08:42 -07:00
Translation updater bot f60036a798 Localisation updates from http://translatewiki.net.
Change-Id: I98da6500d27ee875387677665cd5e1fce4b22395
2013-11-06 20:49:09 +00:00
jenkins-bot edb769814c Merge "[browser test] add a test to edit with utf8 strings" 2013-11-06 17:21:05 +00:00
jenkins-bot 372ef3aeeb Merge "Make sure all links have target=_blank in the save dialog" 2013-11-06 00:04:35 +00:00
Ed Sanders 2e0d642a11 Make sure all links have target=_blank in the save dialog
Anything that uses getParsedMessage could contain a link.

Change-Id: I523edd935c4989e5929fca8891651c2287af973a
2013-11-05 21:23:02 +00:00
Translation updater bot 900ec3f237 Localisation updates from http://translatewiki.net.
Change-Id: I684c1fb09fed13621a13ed63aee1451edd2b39af
2013-11-05 21:09:15 +00:00
jenkins-bot 71efc9c2cb Merge "Support private wikis by forwarding Cookie: headers to Parsoid" 2013-11-05 19:00:30 +00:00
cmcmahon 3754bc77e4 [browser test] add a test to edit with utf8 strings
Change-Id: I88e475ee98bc8f696c1a1d0ad108c12a48fe7eee
2013-11-05 07:45:06 -07:00
Roan Kattouw 3ed7bb16a6 Send the old category and language types to Parsoid for back compat
Change-Id: If67d822e1a22bc24aa0c816952081dc614f6e686
2013-11-04 19:41:19 -08:00
Moriel Schottlender 97d3f5143f Fix image resize handles update on surface change
The resizing handles under ResizableNode are created in the location of the image
but if the page is edited and the image moves relative to the document, the handles
remained where the image was previously and not where its updated location is at.

This code fixes that bug by changing the CE event listening to the model's 'transact'
instead of 'history', and clears the cached offset when a 'transact' event happens.

Change-Id: Id0e4296dd89b24839ba68a534ca77d73c23b7434
2013-11-04 18:04:53 -08:00
Translation updater bot 3469c01488 Localisation updates from http://translatewiki.net.
Change-Id: If3bfcb58e16a5296d50b674f8003b1d245219e07
2013-11-04 20:01:49 +00:00
jenkins-bot 64c4f47cc8 Merge "Work around crazy Chrome bug" 2013-11-04 19:12:01 +00:00