Commit graph

391 commits

Author SHA1 Message Date
Alex Monk e91fd07a5c Follow-up If67bab93: Try to unbreak content model checking more
Some code was expecting an associative array with content model IDs
as keys, and some wwas expecting a numeric array.

Make it work more like namespace checks.

Change-Id: I804db88ed4562a6eea2b6723cb5cc8ae39d7c08f
2016-06-01 02:59:13 +01:00
Alex Monk 1aeedf2f4b Fix fatal error in our SkinTemplateNavigation handler
I must've been testing with some state that didn't trigger this

Change-Id: I6e74ea8c23b0a37fd7e808a66484d5b547b1f844
2016-06-01 02:28:34 +01:00
Ed Sanders 796da84576 Allow extensions to support extra namespaces and content models
Change-Id: If67bab93da355da609b6df274514b5c72a6ed91a
2016-06-01 01:55:03 +01:00
James D. Forrester 0549dc0e47 Hooks: Replace AddNewAccount, AuthPluginAutoCreate with LocalUserCreated
The first two are deprecated. Take advantage of this to consolidate the
code and add comments. Note that these config options are not currently
used in WMF production, and might never be used again, depending on how
futher roll-outs go.

Bug: T135071
Change-Id: Ie7638b1aed9f71c19d0735e831956f853201902b
2016-05-26 18:09:22 +01: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
Aaron Schulz 2c877414c3 Do not call saveSettings() on anon users
Also actually check wfReadOnly().

Change-Id: I83e78532c66039e9764e70246bd6597a2bf4e60f
2016-04-21 08:28:27 -07: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
Alex Monk 9170bd8acd Try to make client and server code to get last editor work the same
On the client: getLastEditor in ve.init.mw.DesktopArticleTarget.init.js
On the server: VisualEditorHooks::getUserEditor in VisualEditorHooks.php

Change-Id: I9cc0f367aee2dda43cffc6918bfb042ac8ae3bb2
2016-04-11 23:58:31 +01:00
James D. Forrester e9af948c3e Hooks#onAuthPluginAutoCreate: Only act if not default
Change-Id: If52c23b523953aabf52ef3e889a77b422a149c63
2016-04-01 14:29:26 +03:00
jenkins-bot ec1f924c59 Merge "Defer the user save in onCustomEditor() to post-send" 2016-03-26 03:16:50 +00:00
Aaron Schulz 42943a49d1 Defer the user save in onCustomEditor() to post-send
Bug: T92357
Change-Id: Ifc71b57f006673b2ea62175976292ca0562fc787
2016-03-24 14:21:39 -07:00
Aaron Schulz 7fd0747ffd Avoid master queries on GET requests for blocking
Bug: T92357
Change-Id: I031d71a87d49e0a33eed7c0c520097770f14937e
2016-03-24 13:24:00 -07:00
Alex Monk 73969d74cd Simplify showtabdialog logic a little bit
Don't unnecessarily nest if statements, don't check tabs preference twice

Change-Id: I788d978b2e13030104be7ea295137a09abc032a8
2016-03-06 00:07:06 +00:00
Alex Monk ade0862db1 Give a useful message in the temporary blank edit screen
Bug: T128028
Change-Id: Ife0a9de96965a9848f362696fc403708fd344825
2016-02-27 21:42:10 +00:00
James D. Forrester e7a3ec43bf build: Update mediawiki-codesniffer to 0.6.0, add "composer fix"
Change-Id: Ic96081539c2ae98b5b239b59ca9b0362b337e522
2016-02-17 08:18:02 -08:00
Alex Monk 35d38ae13a Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set"
This reverts commit 5b083a7272.

Change-Id: Ief26646da34e88b6a32c782a8b0b40dd1ba53903
2016-02-13 02:17:54 +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 188ec0f5d2 Send users whose browsers support JS but are unsupported by MW to the WTE using venoscript=1
Bug: T123457
Change-Id: Ia7e6f4dc1b7dc15fa287bf6b2c4ea12eb4a7c4ba
Depends-On: Ice6ebb95bfcb2050f4813705467942f95f7e720c
2016-02-09 19:04:14 +00:00
jenkins-bot b7f710baa0 Merge "Set page title when we take over action=edit" 2016-02-06 15:38:39 +00: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
Ed Sanders 094555cb3c Remove mwReference tests, moved to Cite extension
Change-Id: I07a2bf45117c2d14c7b00875c0a710e20980a23a
2016-02-05 21:36:56 +00:00
Alex Monk eb1cab32ff Set page title when we take over action=edit
Bug: T125670
Change-Id: If2ac6457ba82fbd046649afb1e24eab3232c5d85
2016-02-05 02:26:14 +00:00
Alex Monk c2e792e334 SET: Set user's editor to wikitext if the browser doesn't do JS
Bug: T121257
Change-Id: I8c734934a76ac73ff943db1712e679a7e73aa1e1
2016-02-04 01:22:54 +00:00
Alex Monk d7183d7e64 Check user permissions for viewsource before loading VE on-load on action=edit/submit etc.
Clicking 'View source' should probably not cause VE to load

Bug: T124650
Change-Id: I236de38b0f90f1aaa5d04b57cb7759e5951baf2b
2016-01-26 16:47:26 +00:00
Alex Monk f6c2d234be Try to do a better job of matching user agent strings
Bug: T124264
Change-Id: Ieb51d97f46c478ee5527e4bc20a54c6929b54727
2016-01-22 02:32:32 +00:00
jenkins-bot dbad1e0495 Merge "SET: Browser blacklisting checks" 2016-01-15 20:59:19 +00:00
Alex Monk b0cadabcd8 SET: Browser blacklisting checks
Only basic testing done.

Bug: T121298
Change-Id: I3a3e2632916ce359d8f91f3f9404b86353b87d31
2016-01-12 17:16:18 +00:00
James D. Forrester ada58df361 build: Bump file copyright notices for 2016
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
2016-01-03 14:57:25 -08:00
jenkins-bot 6b7fc00f68 Merge "DesktopArticleTarget: Change tab text on server side when possible" 2015-12-16 19:51:03 +00:00
Alex Monk 27822d6612 SET: Always show wikitext editor on action=edit if multiple tabs are in use
VE tab will take you to veaction=edit then instead

Bug: T120987
Change-Id: I6e9bb24199e974435992c3b9a7b87c1b668187b3
2015-12-15 20:12:43 +00:00
Alex Monk c99a5b627e DesktopArticleTarget: Change tab text on server side when possible
Usually. Unless you load VE, because then you might be loading on
`action=edit` in remember-last mode and therefore the tab text needs to
be updated from "Edit source" to "Edit". Or "Create source" to "Create".
Or the equivalent with 'local description' in the case of pages from
foreign file repos, etc.

Bug: T120970
Change-Id: I8f07be6c8e415b40ad134ee82d0bda1d63cc4f96
2015-12-15 10:49:45 -08:00
Alex Monk 76a12f2f9b Try to actually resolve visualeditor-editor preference setting when switching editors
Seems we need to make sure this returns before navigating to the target page.
This reverts commit 40807a0743.

Bug: T121122
Change-Id: I4edf03bc0d57b03897d9f1802eabd8f0dd9962b9
2015-12-15 17:35:22 +00:00
jenkins-bot 33cbf199f1 Merge "Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set"" 2015-12-14 20:53:28 +00:00
Jforrester 40807a0743 Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set"
This reverts commit 5b083a7272.

Change-Id: Ieac905b80ea219075b4de498d645f22c3e86c5ca
2015-12-14 20:46:08 +00:00
jenkins-bot 51d493918b Merge "DesktopArticleTarget: Don't abort in SET mode if veswitched is set" 2015-12-14 16:46:02 +00:00
Kunal Mehta 7f02824ec4 Remove no longer needed ContentHandlerDefaultModelFor hook
As of 3b44da3261673 in MediaWiki core, all MediaWiki:*.json pages are
given the JSON content model, so our hook that does the same is no
longer needed.

Change-Id: I8b39edf36b479ca22d74481c3d571d15db69aa1e
2015-12-12 13:34:11 -08:00
James D. Forrester 5b083a7272 DesktopArticleTarget: Don't abort in SET mode if veswitched is set
Bug: T121122
Change-Id: I6dca85361be0c1c1c0d39b12b167af813706ae0b
2015-12-11 18:15:25 -08:00
Alex Monk 98a456b189 Single edit tab: Fall back to the wikitext editor when certain parameters show up
We can't handle these yet. There's also 'preview' but I think we probably
qualify as supporting that.

Bug: T121126
Change-Id: I4602992a77f460b9bfcbad0eac1bdd79d67df04d
2015-12-10 23:13:25 +00:00
James D. Forrester 705199753c Let the feedback tool be configured for a remote wiki
Bug: T92661
Change-Id: Id48729c89db208714f67fec1eabafe577a834b51
2015-12-10 12:12:59 -08:00
jenkins-bot 0d9643e9e2 Merge "Single edit tab: Update preference value" 2015-12-10 01:33:25 +00:00
Alex Monk bca222912c Hide VE tabs preference when user has disabled VE
Bug: T120965
Change-Id: I846124f762d811be4fbfb32c08063fc57a029cb4
2015-12-09 22:54:28 +00:00
Alex Monk e8a682f567 Single edit tab: Update preference value
It's all Timo's fault for suggesting the new values in I65d96627 PS21, obviously.

Bug: T120969
Change-Id: Ib0309342a831ec1950c1be8c7a0c79a31c413163
2015-12-09 22:51:16 +00:00
jenkins-bot 2efbdc670c Merge "Single edit tab and section links" 2015-12-09 00:40:46 +00:00
Alex Monk 748db015b0 Single edit tab and section links
In addition to the couple of TODOs inline, we should do the following in
follow-up commits:
* Prevent FOUC due to changing things only on the client
* Make section link behaviour sensible

Bug: T58337
Change-Id: I65d966270491ffe017cb11a0daa915628fadf65c
2015-12-08 17:47:16 +00:00
Ed Sanders be45a9172e Update VE core submodule to master (d6f2d75)
New changes:
94f2edb Paste sanitization: Check for whitespace *before* newlines
c981b96 Fix-up Ie5414f62c: Fix call to non existant method
d6f2d75 FindAndReplace: Implement whole word matching

Local changes:
* Message and config for FindAndReplace whole word matching

Change-Id: I103b9b1ec92c0aae1e51e1a94db6b8b5e759dbea
2015-12-03 09:40:12 -08:00
Bartosz Dziewoński 9be5c85db4 Provide a tool to insert a signature in namespaces that need it
VisualEditor is usually not enabled in talk namespaces... but
sometimes it is. And when users see the button to edit with VE,
they're going to click it and expect to be able to sign their posts.

This tool is only loaded on talk pages and pages in additional
namespaces defined in $wgExtraSignatureNamespaces.

Code adapted with small tweaks from my own gadget
<https://meta.wikimedia.org/wiki/User:Matma_Rex/visualeditor-signature.js?oldid=13461327>,
which is already available under the MIT license.

Changes include:
* The tool is now always visible if the wiki allows signatures in any
  VE namespaces, but disabled when not allowed in the current namespace.
* Register '~~~~' sequence to insert the signature.
* Code style tweaks for stricter lint checks in this repository.
* Documentation corrections.

Swedish translation provided by André Costa (already credited
as a translator as Lokal_Profil).

Depends on changes in VisualEditor core:
* I89fe53890ab59d12260ea6b41de802c38c24e8b9
* I14cd7efac521687ea38580341ae08ddc522edeeb

Bug: T53154
Change-Id: I6be5fb2118cf3eef5098d4c5320228aa81411ccb
2015-11-16 18:06:32 +01:00
Alex Monk b550323b53 Use mw.loader.using instead of weird hacks to load OOjs UI on action=edit
Change-Id: If03dab6130aed7662b04000b809884a514bb2762
2015-11-03 23:55:17 +00:00
Alex Monk f71a5a5bca Dialog for switching between wikitext and visual editing
Change-Id: I7046ffbe318d046b4baee11f4148ab77fc2af7fd
2015-11-03 01:36:29 +00:00
jenkins-bot a0a0f0e2c0 Merge "Allow switching from wikitext to VE" 2015-11-02 23:18:33 +00:00
Alex Monk 85b745666f Allow switching from wikitext to VE
Just by pressing the VE tab for now

Requires a relatively new version of restbase

Bug: T49779
Change-Id: I2a5294345f5e0f469c1dd1bdd29dbce211571a4e
2015-11-02 20:55:19 +00:00
Alex Monk 9f3864723f Register the preference to hide education popups
This is needed for logged in users

Bug: T117083
Change-Id: I8e214ef2f043c97e387b65f47db6b8d234c55339
2015-10-30 02:10:46 +00:00
jenkins-bot 81a89952ef Merge "Educational popups and highlights for links+citations" 2015-10-14 21:52:50 +00:00
Alex Monk 9d6fbc894e Educational popups and highlights for links+citations
Bug: T108620
Change-Id: I42b0e06f50aca5cb783d88f79a080461e745ceee
2015-10-06 14:33:57 +01:00
Ed Sanders 6c1891c150 Find and replace: Add pref keys for find/replace text inputs
Adds support for storing find and replace text inputs added
in core in I8ae8d49.

Change-Id: I78dea87025e2bfa1b3ff977b16986e8431ddfb22
2015-10-04 13:39:58 +01:00
James D. Forrester 01bd73c808 Update VE core submodule to master (ca4bd8c)
New changes:
8c917a7 Add focused class to surface when focused
04d7f8c Localisation updates from https://translatewiki.net.
dfc71e6 Move cursor offset calc from CE Surface to DM Document
02040d0 Localisation updates from https://translatewiki.net.
7d6d49e IME tests: Add IE11 Win8.1 Korean; name specific Windows versions
7ce9d64 Localisation updates from https://translatewiki.net.
ca4bd8c Update OOjs UI to v0.12.10

Change-Id: I7c04d72cb6bf1d21eb257e2a6cf42c61c7d34eba
2015-09-29 15:14:02 -07:00
Roan Kattouw 28fbf2bcda Update autodisable logic
* Make betatempdisable appear checked if autodisable is true
* Set autodisable=false only if betatempdisable is also false
* On wikis where $wgVisualEditorTransitionDefault=true, set
  autodisable=true when the user disables VE

Change-Id: I3415af4a735afb10cf246f4b22b9d84ef98c882f
2015-09-28 18:19:56 -07:00
jenkins-bot ce8107ec0b Merge "Autodisable preference" 2015-09-28 23:46:59 +00:00
Alex Monk 97e70ba3cc Autodisable preference
We want to flip the default of visualeditor-enable to true, but don't
necessarily want to turn it on for users who already have contributions but who
haven't already enabled it. Therefore we're considering adding such users to
this autodisable preference which they can self-remove (by explicitly enabling
VE) or we can target later, separate from betatempdisable users.

Bug: T112352
Change-Id: I1ce5e6c92055e30fdc82bc912a767e913b190ef6
2015-09-29 00:30:27 +01:00
James D. Forrester c0c5a028cf Add MediaWiki version requirement to extension.json
Remove the now-empty ::onSetup hook.

Change-Id: I67fe9cf9d05a16199a507f99f5ec295ae7e64dc2
2015-09-26 14:27:44 +00:00
eranroz 051066ead6 Server-side replace Edit=>Edit Source on talk NS
If VE is enabled for consistency edit section links become edit source in all NS.
This patch fixes it to be done on the backend for namespaces where VE is not enabled
(instead of user side) to avoid noticeable flickers on page load.

Bug: T112366
Change-Id: Iba090bfc1b2ff4886fb0cf2b37db7870b6be792d
2015-09-16 00:39:13 +03:00
James D. Forrester f6a706c5f4 Hooks: Respect VisualEditorDisableForAnons for section edit links too
Change-Id: I662652e6a2ae6d04c0e6086240fc5ee63194da3a
2015-09-11 18:23:25 -07:00
jenkins-bot 3a15ef608c Merge "Use RESTBase v1 API" 2015-09-10 20:14:35 +00:00
jenkins-bot 8502d3ea05 Merge "Specialized inspector for ISBN magic links" 2015-09-01 18:34:23 +00:00
C. Scott Ananian 7cc23367f6 Specialized inspector for ISBN magic links
Implement a special node type, context item, and inspector for
ISBN/PMID/RFC magic links.  Add buttons to the link inspectors
to convert back and forth between "simple" links, and magic links.

Depends on I5d000d8b63dafdfe0a2753069d3f0ac5b03b8829 in Parsoid
for clean round-tripping of localized ISBN magic links.

Bug: T63558
Change-Id: Id5b7a2ae3c80b0e5eed598f0bd024d3e94f7e9aa
2015-09-01 14:25:59 -04:00
James D. Forrester 1aab5a2322 Update VE core submodule to master (62cf769)
New changes:
62cf769 Store find and replace toggle states in user config

Local changes:
* Register new visualeditor-findAndReplace-* options

Change-Id: I5934882f25614bd79488fff7e8fa0af5ede0af38
2015-09-01 10:50:06 -07:00
C. Scott Ananian 96e330650d Use RESTBase v1 API
This requires https://gerrit.wikimedia.org/r/214351 in core, which adds
support for emulating the RESTBase v1 API to the
ParsoidVirtualRESTService.

$wgVisualEditorPrefix is now deprecated.  Parsoid is configured using
VRS (preferred) or $wgVisualEditorDomain, which defaults to
$wgCanonicalServer.

This bumps our MW-core dependency to 1.26wmf21.

Bug: T110780
Change-Id: I9175ac8db8310f0c9574c8272b5e39932557d57e
2015-08-29 02:12:29 +00:00
jenkins-bot c010450e08 Merge "Move MWReferenceSourceSelectWidget out to Citoid" 2015-08-26 15:40:19 +00:00
James D. Forrester ea950aba3f Hooks: Don't show the tab just to hide it when 'DisableForAnons' is true
Change-Id: I11cca7e0acbce52335dfadcead97303329d9a33f
2015-08-25 15:55:04 +00:00
Timo Tijhof d97f85019c Fix flash of bad ve-edit tab on non-wikitext page in enabled namespacea
E.g. when viewing User:Example/common.js there was previously
both Edit and Edit source (or Create and Create source) and the
client-side JavaScript then removed the ve-edit tab after checking
the content model for 've.isAvailable'.

Change-Id: Ic2daeefa439648ef0602f8606773655cf9ab188a
2015-08-25 15:45:06 +02:00
Timo Tijhof 7825293849 Fix flash of wrong Edit tab in non-VE namespaces
Follows-up 6bc797f which added an early return in namespaces
where VE is not enabled. However, just like the init-init JS code
does already, we should still update the Edit tab message to say
"Edit source" regardless of whether VE is enabled.

After 6bc797f this started to cause a flash where the tab first
says "Edit" and then becomes "Edit source" client-side.

And since the Title::isKnown logic is not available client-side,
this actually exposed a bug with regards to MediaWiki-namespage
messages. Currently the client-side considers these "Create source"
when they are in fact "Edit" (or "Edit source").

Change-Id: If88d648b657d8a571beb7991805f8af8bd547975
2015-08-25 05:50:16 +02:00
Ed Sanders a67965a888 MWInternalLinkAnnotation: Override new getDisplayTitle method
This allows the URL paste handler to use the normalized title
as the text content. Add a test to cover this behaviour.

Depends on Ica48fea69cc in core.

Bug: T109980
Change-Id: I2784adaf2949a73256049921227dde0917ef9aef
2015-08-24 14:29:49 -07:00
Alex Monk b0507f692d Move MWReferenceSourceSelectWidget out to Citoid
Merge after Iaca69f17

Bug: T109988
Change-Id: I80c1be419e545aecdc9f7db98133776d4b4cc326
2015-08-24 15:24:17 +01:00
Ed Sanders e59ee87887 Add spacer above basic reference option
Also add classes to basic/reuse so they can be differently styled.

Bug: T108725
Change-Id: I4d128afe86c7fae2d8cbd8a57749970942e39e76
2015-08-23 20:06:35 +01:00
C. Scott Ananian a6775796fe Detect paste of wikitext and convert it
This invokes Parsoid to convert likely wikitext pastes.

This addresses about 20% of the <nowiki> insertion quantified at
https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:%C3%89diteurVisuel/Avis/Nowiki
for 2015-04-08 which were due to inadvertent pastes of wikitext.

For a better user experience, suppress Parsoid's P-wrapping if the
output consists of a single top-level P element.  This ensures that
pasting '[[Foo]]' won't add an unexpected newline before the paste.

Bug: T54204
Bug: T109449
Change-Id: I26a4cd8dc5b7e7caf16ca081dbe7baf6a7db8e5c
2015-08-18 15:16:06 +00:00
C. Scott Ananian 550a979fdb Update VE core submodule to master (0bf4ce7)
New changes:
44f8204 Autolink pasted links

Local changes:
* Add UrlStringTransferHandler from core

Change-Id: I7eae6da2739fa47b22ed1e7fbf53e9473e037c5b
2015-08-18 07:20:29 -07:00
C. Scott Ananian c197d0b075 Update VE core submodule to master (d020898)
New changes:
985edd2 Localisation updates from https://translatewiki.net.
9883b44 Follow-up 985edd24: Fix build for added language 'shn'
b0d5ee2 Localisation updates from https://translatewiki.net.
18ca837 Localisation updates from https://translatewiki.net.
f6a0945 Don't include trailing punctuation in autolinked typed text

Local changes:
* Add MW-specific trailing punctuation rules for autolinking

Change-Id: Iaa620142222f47e9fde2d03b935f38c24d38800b
2015-08-17 10:01:54 -07:00
James D. Forrester 1d6085b801 Update VE core submodule to master (e61ebf2)
New changes:
61d20a1 Hide on-screen keyboard when selecting nodes on all mobile platforms
e5aff79 Localisation updates from https://translatewiki.net.
a99a897 Update OOjs UI to v0.12.3
3c01a14 Make DM nodes sensibly hashable
a611eb9 Make ve.dm.example.postprocessAnnotations fluent
496c895 Update ve.dm.ElementLinearData#hasContent documentation
fcaa035 Support RegExp sequences; trigger sequence matcher after newline
edda1d4 Add a mechanism to wait until ve.init.platform has been created
e174155 Autolink URLs when typing
ac9248f Allow drag and drop of links (and subsequent autolinking)
c88fad6 Localisation updates from https://translatewiki.net.

Local changes:
* Define `ve.init.platform.getUnanchoredExternalLinkUrlProtocolsRegexp`.
* Make `ve.ui.MWLinkAction` extend `ve.ui.LinkAction`.
* Override `ve.ui.LinkAction.getLinkAnnotation` so auto-links use the proper
  `ve.ui.MWExternalLinkAnnotation` type.

Change-Id: I934f76158512e2e89b614ed92fef6481f70728e7
2015-08-12 14:31:06 -07:00
James D. Forrester 6bc797f34e Only add tab on the server-side if we're in a VE-namespace
Prevents flash-of-unwanted-VE.

Change-Id: Iecc3eba39fb10ee3aa3efd70630867a4c53fef77
2015-08-11 01:33:11 +01:00
Alex Monk ea34d938c8 Revert "Revert "Replace wgVisualEditorNamespaces with an associative array""
This reverts commit 7ca1afbbd2.

Bug: T104898
Change-Id: I061c1fd9ab8ec6b2afac92feef888ba207e1a9b1
2015-08-02 23:13:24 +01:00
Alex Monk 7ca1afbbd2 Revert "Replace wgVisualEditorNamespaces with an associative array"
This reverts commit 647a5597bb.

Change-Id: Idaf4960f5df2fbb426162830a15383ecfc96118e
2015-07-31 04:41:28 +01:00
Ed Sanders b5de6fa575 [BREAKING CHANGE] Rename (View|Mobile)PageTarget to (Desktop|Mobile)ArticleTarget
Change-Id: I6a8fa76dc4d70cc04722e30e3fea6a6112d56b40
2015-07-29 18:26:36 +01:00
Florianschmidtwelzow 4981a8253d Allow skin developers to set an offset for toolbar floating
Usage:
In a skin, that needs this offset, e.g. because it has a fixed header, it should add
this config var somewhere before the hook BeforeOutputPage is called:

$wgVisualEditorSkinToolbarScrollOffset['vector'] = 60;
(if 60px is the offset to use)

Depends on: I2e10c12df8277c84d948e48c6a132c03d6324693

Bug: T95528
Change-Id: Iaa86c2f68afa6403fcc4f5b7c655704512beead4
2015-07-28 11:18:07 -07:00
Ed Sanders 29116355e1 Change reference context title from 'Basic' to 'Reference'
'Basic' only makes sense in the context of other reference types.

Change-Id: I8137af3481e4ccbd2589e917e24898ff204440b6
2015-07-24 12:03:05 -07:00
Ed Sanders 97e0cd28a5 Make missingref references uneditable, not uninspectable
Depends on I1ba8978dd in core.

Bonus: remove not-allowed-cursor & highlight title (which was
broken) now that we can display this information properly.

Bug: T106810
Change-Id: I1800490ba1b8e10ff54b26372a8a78661c1c7d68
2015-07-24 12:03:05 -07:00
jenkins-bot 38d9a0a1f8 Merge "Load the jquery.i18n library from MediaWiki, not lib/ve" 2015-07-24 00:21:07 +00:00
James D. Forrester 382762107f Load the jquery.i18n library from MediaWiki, not lib/ve
Change-Id: I5d868791b9e5101c4ae719a6ca635766f6f42537
2015-07-23 16:52:43 -07:00
Alex Monk 647a5597bb Replace wgVisualEditorNamespaces with an associative array
Bug: T104898
Change-Id: Ibf4812caeaa9290959bc757fc49a151854bff337
2015-07-23 18:49:21 +00:00
James D. Forrester 074eb0de61 Hooks: Support auto-enabling for a proportion of new accounts
Change-Id: I07fb4dc6137efe8f533e0077cf1805923e8b80df
2015-07-16 09:14:57 -05:00
James D. Forrester 2429c5fcb2 Hooks: Support auto-enabling for auto-created accounts
Change-Id: Ibe1ba94e4478a637367b303b479586f45e85cfa4
2015-07-16 09:13:41 -05:00
James D. Forrester 4af8e9e159 Update VE core submodule to master (e628ef0)
New changes:
950d65b Update UnicodeJS to v0.1.5
139eab2 Localisation updates from https://translatewiki.net.
801eb2d Localisation updates from https://translatewiki.net.
f002650 Localisation updates from https://translatewiki.net.
0ca48d8 Update jQuery.i18n to v1.0.3
651465a Follow-up 0ca48d8: Actually load jquery.i18n.emitter.bidi.js too
e1505f8 Localisation updates from https://translatewiki.net.
1b929e6 EventSequencer: fixes and unit tests

Change-Id: I82f420bb694c4a0d10f4a61ac07b7d0bb05ed547
2015-07-06 17:55:25 -07:00
Marc Ordinas i Llopis 7a33613d23 Use Parsoid's new Cite HTML and CSS
Starting with I21fbbd3247bf7801e5ef9bd5312f95777f4dd6ef, Parsoid
will emit a new HTML for its Cite extension, which enables CSS
styling. In I487095df8a7c4241a14f7b4480360f6774130bec the new
module 'ext.cite.style' is added to the Cite extension to style
this new HTML format.

This patch
* Loads the ext.cite.style module if the Cite extension is
  present.
* Uses the new HTML format for the internal structure of
  reference and reference list nodes, so they are correctly
  styled.

Backwards compatibility: Only new HTML is used internally in VE,
so as long as ext.cite.style can be loaded the new styles will be
used. It does not depend on which format Parsoid returns, so this
patch only depends on the Cite extension patch, not on the Parsoid
one.

Note: The only way I've found of adding a ext.cite.style dependency
only if Cite is present is to register the whole
ext.visualEditor.mwreference module in the
onResourceLoaderRegisterModules hook. Maybe someone can point to
a better way?

Bug: T86782
Change-Id: Ibf333a502d64d2ed6e029221458b7c606554e414
2015-07-06 14:23:18 -07:00
Kunal Mehta 1202e8fece Don't always override $wgVisualEditorNamespaces
Change-Id: Ibdba57ddc86962066228294554b9bdb27334b960
2015-07-06 12:02:02 -07:00
James D. Forrester 57a86aa0e2 Delete the never-used 'MW alien' Beta Feature hook/i18n
The feature is now available for all, so this won't be needed.

Change-Id: I553c9473953651c0963609dd22a895e17c2e2af5
2015-07-03 12:41:20 -07:00
James D. Forrester 59199de1c4 Update VE core submodule to master (5268def)
New changes:
49f66aa Localisation updates from https://translatewiki.net.
ff1250e Update jQuery Client to v2.0.0
9186ae4 Revert "Update jQuery Client to v2.0.0"
0886bf1 Localisation updates from https://translatewiki.net.
1908c66 Follow-up 0886bf1: Re-fix the build by adding the new 'cjy-hant' language
cc6e96a EventLogger: fix output duplication and add jshint format flag
1194b70 IME tests: Make compliant with our code style
fe4a7ae IME tests: Add OS X native Japanese Hiragana & Katakana
325c743 Localisation updates from https://translatewiki.net.
05788b1 Update paste target selection hack to use focusedNode text when possible
7b43b34 Set default context cursor to 'default'
5c5a80f Add #hasContent method to ElementLinearData
6625cd3 Add placeholder functionality to the surface

Local changes:
* Add new IME tests to the hooks file

Change-Id: I132ad2627c6d54236848812c404731c5c9d4183a
2015-06-29 14:42:41 -07:00
James D. Forrester 2b3dfdfe13 Set file permissions correctly for *.php files
Non-executable files should have permissions set to 644 – touching:

	ApiVisualEditorEdit.php
	VisualEditor.hooks.php
	VisualEditor.php

Bug: T104044
Change-Id: I73fcee410fa1d538e05a7f494871f20531665701
2015-06-26 18:41:01 -07:00
James D. Forrester dce09d82ba Run the faked IME unit tests in VE-MW too
Change-Id: Ie48caeb4943de1ab4ce20677e61a4123fdffbb7b
2015-06-26 11:10:29 -07:00
jenkins-bot ee6c0fb892 Merge "Use new MediaWiki core TitleInputWidget" 2015-06-25 00:23:44 +00:00
Ed Sanders 52cb066dc7 Use new MediaWiki core TitleInputWidget
All link input/title input functionality has been moved to core, so
we can replace the link widget, redirect widget and template search
widget with it.

Depends on Ib463e60cad96 in MediaWiki core.

Change-Id: I452f3b86ead403307072cf904f0553c9771f4300
2015-06-24 17:06:00 -07:00