Commit graph

318 commits

Author SHA1 Message Date
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
Timo Tijhof 87f2d0bc2a Make ext.visualEditor.mwalienextension mandatory (no longer experimental)
This module is required in order to alienate all extension blocks
by default. Otherwise they are interpreted as plain divs which
allow content editable.

Bug: T103455
Change-Id: I08f6b9a516ba6bee6ed18256222108116eceee1e
2015-06-23 03:45:50 +01:00
Roan Kattouw b3d2e9013f Account for MWTitleInputWidget having been moved into MW core
Depends on I43fb412ff6 in MW core.

Change-Id: Ia189e19f0ccb71adf9f3eeba4d600c2bcb360037
2015-06-01 17:24:52 -07:00
Aaron Schulz a948624dda Use more appropriate RecentChange_save hook for tagging
* At this point the IDs are all known so there is no need
  to re-query what was written in the transaction
* This works when recent change insertion is deferred
* Also deferred tagging in ApiVisualEditorEdit to after
  the RC row is saved

Bug: T100439
Change-Id: Ic4c7d8d89b8cfeee57eda867c0ff74fa9682ffc8
2015-05-27 13:28:01 -07:00
suchetag 3963b1daf2 Link inspector images and descriptions
Fetches images from PageImages extension and descriptions
from Wikibase.

Bug: T93693
Bug: T93694 (partial)
Change-Id: I1bea6b7b57ab951e79468cfa00e9eecddc113d18
2015-04-28 00:23:40 +01:00
Jforrester 995ba18a58 Revert "[TEMPORARY] Re-point A/B testing preference for test"
This reverts commit 1a42383cdd.

Change-Id: Ic39f75101b2ab98ce83edcd1bc49561851c73f40
2015-04-22 00:32:34 +00:00
James D. Forrester 1a42383cdd [TEMPORARY] Re-point A/B testing preference for test
Instead of writing to the visualeditor-enable preference (which is
user-facing), write to the visualeditor-testabpreference one (which
is made up and won't impact anything), so that we can test that the
A/B bucketing code works as expected.

This patch will be reverted once bucketing is confirmed to be working.

Change-Id: Ia738146c5bf68795bf812d64847ba74498888cd5
2015-04-21 01:23:35 +00:00
James D. Forrester 96aa5c9145 Re-add A/B testing framework for new accounts
Change-Id: I987bdee636a4659783bd492ac149e1d1c55f4df3
2015-04-17 14:05:04 -07:00
Alex Monk 5af4564097 Support an "other" page for special characters
Change-Id: I9a1404dff1a970fbbc7bdf822398dbb7057159bf
2015-03-30 03:02:10 +01:00
Alex Monk e084df2df6 Load all of WikiEditor's special characters
Relies on If9c5cdbe and I8fafd734

Bug: T91608
Change-Id: I3fafc561ceae969e4ecc12881154cd8a3568bebb
2015-03-27 22:13:38 +00:00
Roan Kattouw b19104ed04 Send requests to RESTbase directly when so configured
Also introduces paction=metadata in ApiVisualEditor which
doesn't hit Parsoid but gets all the other information we need.

Bug: T90374
Change-Id: I71edbc0f8dc15a6f8d3672c10ca3c641cc172be7
2015-03-26 16:00:54 -07:00
Kunal Mehta 80bdc3e620 Use ResourceLoader::isModuleRegistered()
Change-Id: I3e26b9b0400251cfb290935f97f28b4860bd1b75
2015-03-15 16:54:51 -07:00
Roan Kattouw d371014e5d Load RL modules in one load.php request, rather than in two stages
This introduces TargetLoader, which manages plugins and RL modules
in a slightly more generic fashion so that Targets themselves don't
have to. This allows us to load all RL modules in one load.php
request, rather than first loading ViewPageTarget which then
loads the other modules.

TargetLoader loads in the bottom queue, so it will be loaded
as part of the main load.php request, but in VPT.init.js we
still have to wait for it with using() because it might not
have arrived yet. This also degrades gracefully on cached pages
where TargetLoader isn't in the bottom queue: it'll be loaded
as a separate request instead, which is suboptimal but no
worse that what we were doing before.

Right now TargetLoader is small enough that it could also be in
the top queue, but in the future we want to add things like
the action=visualeditor API request to it, and mw.Api is
relatively big.

Note: this also makes a breaking change to the plugin API:
plugin callbacks no longer receive the target instance
as a parameter, as they're now executed before the target
has been constructed rather than after. In the long term,
if we want to give plugins access to the target instance,
we could give them the target promise somehow. For now,
I've killed this feature because nothing used it and
the change from a direct object reference to a promise
would have been a breaking change anyway.

Also fixed incorrect documentation index for ve.init.mw.ViewPageTarget.init.

Bug: T53569
Change-Id: Ibfa6abbeaf872ae2aadc6ed9d5beba7473ea441a
2015-03-15 03:43:05 +01:00
jenkins-bot 9a8366a53e Merge "Use the RESTBase back-end if available" 2015-03-10 22:23:49 +00:00
Marko Obrovac b46a2bd105 Use the RESTBase back-end if available
Change I4d4043e5052327bbd789331f1c05b607c45fe7cb introduces RESTBase's
virtual REST service in the MW core, as well as $wgVirtualRestConfig,
which represents the first step towards central VRS configuration.
This patch modifies VE to use RESTBase instead of Parsoid, if
available. RESTBase's virtual REST service transparently maps Parsoid
URIs to RESTBase's, so there is no need to change them in VE for now.

Note that the patch keeps full compatibility with systems/domains that
do not have $wgVirtualRestConfig declared (or even with those that do
not include the RESTBase virtual REST service class). This allows us
to use RESTBase as the back-end only on selected domains.

Bug: T89066
Change-Id: Ie7488f64868a41f28ec24ab1217c12c6249b5523
2015-03-10 21:41:39 +01:00
Alex Monk b396bc4af0 Use new SkinEditSectionLinks hook instead of DoEditSectionLink
So we don't overwrite stuff other extensions do and duplicate core code.

Depends on I5a7a2370

Change-Id: I83122694525fe124df914209e281c560ba9d12b7
2015-03-10 12:36:04 -07:00
Moriel Schottlender ae72184c8f Work with the new mw.Feedback and add UserAgent checkbox
Add the new feature for user agent checkbox for the mw.Feedback
dialog. This bumps our MediaWiki dependency to 1.25wmf20.

Change-Id: I741ded83de4f575777a15cb20735e351039dc81f
2015-03-03 10:58:34 -08:00
James D. Forrester bddd84b1e9 Promote the Language tool Beta Feature to always-on status
No complaints in over nine months. Time to just make this available.

Change-Id: I601699573c0d50384720e5a1f0098c7f780de8cf
2015-03-01 17:15:48 -08:00
jenkins-bot bd4289241a Merge "Adjust Queue and Provider to work with generalized parents" 2015-02-24 18:42:40 +00:00
jenkins-bot d9734f56ad Merge "mw.ViewPageTarget: Remove workaround for cascading defaultUserOptions" 2015-02-23 16:51:12 +00:00
Ori Livneh 4cf393da54 Update VE core submodule to master (032c9a4)
New changes:
dc3b1f8 Replace ve.dm.Model#matchesAttributeSpec

Local changes:
Replace ve.dm.Model#matchesAttributeSpec

Change-Id: I2a107999974309304b59697dad0f7374110b9ab5
2015-02-18 16:32:19 -08:00
Moriel Schottlender 093cf012ea Adjust Queue and Provider to work with generalized parents
Generalize MWResourceQueue and MWResourceProvider so they are
extending the general classes from ve-core. This also allows for
tests in ve-core on the resource queue system.

* Depends on ve-core change I5346081317e *

Change-Id: If34cd99334f4ccb93015c3646f68ae3040b9c5d7
2015-02-17 17:22:21 -08:00
Roan Kattouw 237bb053d6 Remove the sanity check
It's slow, especially on large pages, and it's triggered
very infrequently these days, and only for known bugs.

In the future we should replace this with a debugging
interface that displays the DOM diff between the original
DOM and the round-tripped DOM, as opposed to the boolean
interface we have now.

By extension, this also means the visualeditor-needcheck
tag won't be applied to new edits any more, although
its registration and messages are kept around because
edits with this tag still exist in page histories.

Bug: T87161
Change-Id: I909153492a5786b4b69fccd42ce3c1d4bdb3a059
2015-02-17 17:14:34 -08:00
Timo Tijhof 7f05f8877e mw.ViewPageTarget: Remove workaround for cascading defaultUserOptions
Originally added in 5036099906.

* Account for bug T89513 for 'tempdisable' (was done for 'enable' in 9cba9910c6).

* MediaWiki core now loads user defaults in a separate module not
  subject to page caching, making our workaround obsolete.

  Keeping defaultthumbsize as that is intentionally ignoring the user's
  preferences.

Change-Id: I07a7aa8e08c728ddeba67f36a98e989c220dcb50
2015-02-14 03:20:59 +00:00
Timo Tijhof 5bf0ac251a Move svgMaxSize and namespacesWithSubpages to site config
These are currently in page-specific mw.config. As these are
not related any page, they should be in the global export.

This is needed to have our tests (and code base) run error-free
without a MediaWiki page.

Bug: T89434
Change-Id: Ic42bcd14028772ff0c06e28c76ffaf156f8b985f
2015-02-13 08:20:26 +00:00
Kunal Mehta 55d9e76188 Add extension.json
Needs Iff1523b86f754ca in mediawiki/core to work properly.

Bug: T87992
Change-Id: I869873eef6d19fdaee75201b87d8c4a8d4d05f3f
2015-02-02 16:31:00 -08:00
Alex Monk 9841d1012c Update "Watch this page" option when necessary
On load and change the user presses the button

Bug: T78694
Change-Id: I1df2836f8ba4ae647bfb142513e5de9f32ecd0fe
2015-01-31 02:43:59 +00:00
jenkins-bot 071b344353 Merge "Change uses of LookupInputWidget to LookupElement" 2015-01-30 00:44:08 +00:00
This, that and the other ca9f22bac3 Implement ChangeTagsListActive hook
This allows users to visit Special:Tags or use the API to see
which change tags are still in active use.

The ChangeTagsListActive hook was introduced to core in
I77f476c8d0f32c80f720aa2c5e66869c81faa282

Change-Id: I18d921617ccd5eb19068bd4e4a202dabd73a3a17
2015-01-29 15:02:37 +11:00
Jforrester a1293e5161 Revert "Temporarily disable JSON content type on visualeditor-cite-tool-definition.json"
This reverts commit 74a3933572.

Now that the issue is fixed in MW-core, this is not longer needed.

Change-Id: I4d3468a5abfed9299ba180342e1a8d904d06e723
2015-01-16 22:04:10 +00:00
Bartosz Dziewoński 6de4ed2f26 Change uses of LookupInputWidget to LookupElement
Also moved around some code from MWCategoryInputWidget to
MWCategoryWidget to be a bit less evilly interdependent.

Change-Id: I0b8a58fb669e232a990b19c4b7f872a320bfab58
2015-01-15 18:26:30 -08:00
James D. Forrester 74a3933572 Temporarily disable JSON content type on visualeditor-cite-tool-definition.json
Change-Id: I606db30d706c8a051b9b090deff23044ae05ad10
2015-01-15 18:18:01 -08:00
James D. Forrester 2f8b3e0d96 build: Bump copyright notices to 2015
Change-Id: Ie92dab7411116d3410195c3fb0a3513c664c0c30
2015-01-12 20:34:19 -08:00
James D. Forrester 152a507e11 Follow-up I2342fa5b: Bump wfUseMW to 1.25wmf14 for ParsoidVirtualRESTService
I2342fa5b added a dependency on Id658d925 in MediaWiki core which will first
be available in 1.25wmf14.

Also fix a spelling error.

Change-Id: I20a850f5da58b377b3c208d86b7f5c56f518fdb8
2015-01-07 02:25:45 +00:00
Marielle Volz 5bad19324c Update comment to indicate TD uses jquery.uls.data
Comment updated to indicate that the TemplateData
extension may also register the jquery.uls.data
module.

Bug: T85733
Change-Id: I161662e91148eff515d473ebe5d49d784b21a7a2
2015-01-03 17:31:24 +00:00
James D. Forrester 20c53d53bf Follow-up I64f5e2f6c: Bump wfUseMW version given breaking OOjs UI dependency
Change-Id: I2fddaab73d0c10286276de994c791af2cbb27595
2014-12-12 14:12:48 -08:00
James D. Forrester baffe9d7e1 Update VE core submodule to master (32397d8)
New changes:
5e60f12 Ensure clipboard key is removed from paste target
32397d8 Update OOjs UI to v0.4.0

Local changes to compensate for new OOUI version, and updated wfUseMW call.

Change-Id: I005f7b23a36e04f1305d4aa037c19a5c7db9a699
2014-12-06 12:28:07 -08:00
Roan Kattouw db5ed76ea1 Update VE core submodule to master (673cf05)
New changes:
6cfcc85 Set ready delay to animation duration in VE WindowManager
fd9219c Refactor WindowAction to include close and toggle methods
5b175bb Update PapaParse to 4.0.6
21754e2 Move toolbar scroll hack to surface
68499c9 Switch to personal fork of Papa Parse
3d60460 Allow empty IME test suite

Local changes:
* Comment out the last remaining IME test, because it broke in PhantomJS

Change-Id: Idac659323b3e612a77b03f449dc8c89618e00f87
2014-11-26 01:06:16 +00:00
James D. Forrester d065bceebf Follow-up Ic704b95: Bump wfUseMW number as OOUI dependency changed
Change-Id: Ic74ff2f94e4d2460f37db13455e3a75c1210444f
2014-11-12 11:46:37 +00:00
James D. Forrester 33d43066f4 Update VE core submodule to master (0dd43dc)
New changes:
93e42f0 Fix documentation
b4574e4 MobileContext fixes
312cf30 Switch mobile demo from deprecated Minerva to MediaWiki
8656c51 Localisation updates from https://translatewiki.net.
3c51598 Stage slugs
ed9a456 Get rid of trigger-happy slugChange event
1074bab Replace pawns with unicorns for pre-annotations
de5cb90 Make slug animations work again
54c711d Localisation updates from https://translatewiki.net.
c05bf65 build: Update karma and switch from PhantomJS to Chrome
d172dcc Update OOjs UI to v0.1.0-pre (837b2f733e)
d8bffa0 Fix icon opacity
22a25bc Localisation updates from https://translatewiki.net.

Local changes:
* Disable most IME tests in VE-MW because they fail

Change-Id: I475a83eac76d9c20b206113bbd0e2a4c352fdb66
2014-10-14 10:57:53 -07:00
Kunal Mehta 0121c68b50 Display JSON configuration options in NS_MEDIAWIKI as JSON
Change-Id: Ie033b8bd42beda769dd499a9d02d488bfffb0fa0
2014-10-06 12:02:55 -07:00
jenkins-bot 64b2568465 Merge "Use mw.Title#getRelativeText to deal with titles relative to specific namespaces" 2014-09-26 02:50:43 +00:00
Alex Monk ef1cebd111 Use mw.Title#getRelativeText to deal with titles relative to specific namespaces
Added in MW core in Ie554adef, was backported to 1.24.

Change-Id: Iedc0319042529d41d29846d1734b5481850e9552
2014-09-26 02:47:18 +00:00
Kunal Mehta 1470d7cf39 Clean up various PHP hook functions
* Add type hints
* Use $skin->msg instead of wfMessage where available
* Minor doc fixes
* Use Title::inNamespace()

Change-Id: I406a0a40e785947fbdc09707597ccf9c50d6f9be
2014-09-24 22:11:47 -07:00
Seb35 8029ffb16b Check the existence of BetaFeatures before adding the 'visualeditor-enable' preference
To avoid adding it two times.

Bug: 71088
Change-Id: I687b2344731188133d32faac48e36245e9b03e76
2014-09-20 20:05:42 +02:00
Roan Kattouw 34ec304ec7 Update VE core submodule to master (d6904b5)
New changes:
925ed5c Move sluggability methods to model
a618491 Calculate slug positions in the model
b8fb05e Make the trigger demo kind of work again
e41d22e Update OOjs UI to v0.1.0-pre (ec785c2c64)
4119470 build: Make headers atop dist files suitable for distribution
fca4fec Follow-up cc657c4: Change strikethrough key command to not clash with Macs
a29a561 Add hasSlugAtOffset to DM document
9f47efb Move getRelativeOffset, getRelativeRange, getNearestFocusableNode to model
aa35e96 Remove hard coded types from canHaveSlugBefore and fix logic
49a239b Emit 'position' and 'contextChange' events correctly
3c50321 Refactor out finding of CE focusedNodes
d6904b5 Update OOjs UI to v0.1.0-pre (f2c3f12959)

Local changes:
* Move ce.Document tests to dm.Document

Change-Id: Ifa5abd0341e858b20e73e9071d597a25112cadfb
2014-09-18 17:03:46 -07:00
Alex Monk 216e3088a3 Followup I35e55658: Update wfUseMW call
Required I5d894f8a, which was added in 1.24wmf20

Change-Id: I7ecb0bbcf855179bf7107c95c939c0f9bec51fa8
2014-09-17 21:23:37 +01:00
James D. Forrester 92a6fdbb02 Make <visualeditor-preference-enable> message respect plural rules
Change-Id: I4660a530cd50a179c06a82295b6a24cae1b741b6
2014-09-16 10:35:57 -07:00
Kunal Mehta 11ff6096bf Make message loading for 'ext.visualEditor.viewPageTarget.init' module less hacky
Rather than modifying $wgResourceModules at run-time, use
a subclass of ResourceLoaderFileModule to add the messages
in the constructor.

Change-Id: I9cf99891ed186afb6aa63501edced692117a7c50
2014-09-07 23:59:11 -07:00
James D. Forrester 53dd7de095 Drop references to magnify-clip-{ltr,rtl}.png file
This is now embedded via CSS in MediaWiki core's Linker as of 1.24wmf18.

Change-Id: Ib095740611de3f84f1aad229939b92d788b537c2
2014-08-19 17:18:18 -07:00
addshore ef1c12e445 Fix @returns >> @return phpdoc
Change-Id: Ibff7dfb5e870a35e5e932658490de1923f9233ad
2014-08-17 20:43:56 +01:00
jenkins-bot 14e4a915d7 Merge "Use Config instead of globals" 2014-08-15 22:55:02 +00:00
Kunal Mehta 5575bed67c Use Config instead of globals
Change-Id: Iecf6358fcd15fe578b3e0dcdfa6022e0a1a763c8
2014-08-15 15:50:26 -07:00
Roan Kattouw 924e3c026d Update VE core submodule to master (03975f8)
New changes:
a28e085 Restore QUnit web UI
8e2477c [BREAKING CHANGE] Move modules to src and tests and i18n, UnicodeJS to lib
26adfaf Fix path prefix for tests/index.html so it actually runs
d87dab5 Work around getSystemPlatform() race condition
6682ebc Make getParsedMessage() test actually test getParsedMessage()

Local changes:
* Update paths from lib/ve/modules/ve to lib/ve/src or lib/ve/tests
* Update paths from lib/ve/modules/unicodejs to lib/ve/lib/unicodesjs
* Rename unicodejs.wordbreak module to unicodejs
* Update code for getSystemPlatform() and isInternetExplorer()
  being made static

Change-Id: I7bb3bb74addfd3fbb64795c5ac3ff791b8874a4f
2014-08-15 14:42:08 -07:00
Kunal Mehta 58aabdcc7f Remove unused globals, add some type-hinting
Change-Id: I9d257c6b149b0734a5b7ae312b16f109534923d3
2014-08-12 22:57:21 -07:00
Kunal Mehta 4b1a3eb059 Don't use RequestContext::getMain() if a context is available
Change-Id: I2b16cf8f437ccda7cb0feb137710394e4a90d3b5
2014-08-12 22:54:51 -07:00
Roan Kattouw 4d9cf59db0 Update VE core submodule to master (426f9e4)
New changes:
1b7b23b Tests: Move …/test/… to …/tests/… to be the same as other repos
cd3fc66 Update OOjs UI to v0.1.0-pre (9cd400e3d5)
81be252 Deprecate 'live' event in favor of 'setup' and 'teardown'

Change-Id: I71277d0a3fc85541cf3a0859f58d6d522ad1db6d
2014-07-23 01:23:02 +00:00
Roan Kattouw c1eab5d52a Stop conditionally registering oojs and oojs-ui
We already have wfUseMW( '1.24wmf6' ) so we don't need this any more.

The messages list for oojs-ui had gotten out of date, and rather than
fixing it I figured we should just remove this conditional registration
code altogether.

Change-Id: If0610beb2df8bd85aeba136530a84a793e3dda64
2014-07-22 16:49:06 -07:00
Željko Filipin f850ddf73b Rename "test" folder to "tests"
All other repositories have tests in “tests” folder. For more
information see:

http://lists.wikimedia.org/pipermail/qa/2014-July/001663.html
http://lists.wikimedia.org/pipermail/qa/2014-July/001667.html
http://lists.wikimedia.org/pipermail/qa/2014-July/001672.html

Change-Id: Ib1e4fa4b7203bd8217615db1ceac23a329c081f1
2014-07-15 18:00:32 -07:00
Moriel Schottlender 537e751abe MWImageModel unit tests
Change-Id: I87d1383b383e2a7cd6cb38ed51710cc36a59f63e
2014-07-15 12:47:32 +01:00
Ed Sanders 840264e85d Remove Hiero extension code from VisualEditor extension
It doesn't belong here.

To be added in the wikihiero extension in If55af2ad.

Change-Id: Id8b026ac07cfb31e4c25f81fb67f531448454ee0
2014-06-23 09:18:42 +02:00
Ed Sanders c70d32c017 Use registered target, instead of ve.init.Target
Depends on I468d4eb4 in core.

Uses various hacks to trick the test runner into thinking
an MW target is in use, when in fact we still use SA targets.

Change-Id: If4611307d5d7aaee4af84f86ef82faf9078043b6
2014-06-17 20:41:01 +01:00
Ed Sanders 8bbd8f6d47 Add targets missing from jquery.i18n libraries
Bug: 66594
Change-Id: I6e1024b0f636b3a18d1073f5c38b9feea340b583
2014-06-13 18:53:02 +01:00
Krenair 894b63d06a Suppress redirects if veaction=edit is requested
The user probably wants to edit the exact title they requested, rather than
following redirects. This matches the behaviour of the source editor and
action=edit.

Bug: 65926
Change-Id: If2183008b5acaaaf495f35e21ee61c3da1ba3110
2014-06-10 12:28:49 +00:00
jenkins-bot 55952a32b3 Merge "Use subpage only for media search string" 2014-06-04 22:10:29 +00:00
Moriel Schottlender cb35312c0b Use subpage only for media search string
In namespaces that allow for subpages, use the subpage part of the
page title for the initial search string in the MediaInsertDialog
search widget.

Bug: 51290
Change-Id: I31db88b484eee2206719dc337fbd7c70aef93b3a
2014-06-03 16:54:46 -04:00
James D. Forrester a3d51c0382 Bump the MW required version to 1.24wmf6
As of I87e93777 VisualEditor-MediaWiki now use the new MediaWiki core RL
module of mediawiki.skinning.content.parsoid, introduced in 1.24wmf6,
which has bumped our dependency to an alpha of 1.24.

Change-Id: I33db154980ec207edab75751d60cb4764144f32b
2014-06-03 13:46:12 -07:00
Matthew Flaschen a50e5c6fd6 Preserve veaction, vesection on special redirects to wiki pages
Bug: 50877
Change-Id: I61fcc9109105ea25f30f89ec18d8fa0d13dcde82
2014-05-22 13:05:23 -04:00
Krenair 204554a567 Swap from using native confirm() to using an OOUI dialog when cancelling
Relies on:
* I292fb34d in OOjs UI to add the confirmation dialog
** I67329820 in MediaWiki core to use the messages added in OOjs UI
** I38f5bb63 in VisualEditor core to register the confirmation dialog

Bug: 50955
Change-Id: I98f9a03d780556b360b57c018c05a27cc1b3862e
2014-05-14 23:00:35 +00:00
James D. Forrester 80fc16a57e Follow-up Ica9e5a9284: Actually make visualeditor-hidebetawelcome work
Three 'minor' points:

* You have to declare even hidden preferences. Whoops.
* There's no such thing as an "optionsToken", use "editToken".
* You need to POST action=options API calls.

Ahem.

Change-Id: I9c4358107af7bcfca157bd014de49882914e990c
2014-05-10 20:02:40 +00:00
jenkins-bot 65ed605741 Merge "Generate PHP VE edit section with correct parameter, vesection" 2014-05-05 17:58:56 +00:00
James D. Forrester 087d49e4a4 Point language Beta Feature links to the right messages
These were erroneously:

* visualeditor-preference-experimental-info-link and
* visualeditor-preference-experimental-discussion-link;

should have been:

* visualeditor-preference-language-info-link and
* visualeditor-preference-language-discussion-link.

Whoops.

Change-Id: Ic2780c1d7a0fb5bc5673d1d3a7277661fd759bb3
2014-05-05 09:22:51 -07:00
Matthew Flaschen e5f79c81b9 Generate PHP VE edit section with correct parameter, vesection
Bug: 52566
Change-Id: I504c44dbe9bf953acf17508788b7b60d099aa04e
2014-05-04 23:04:35 -04:00
Timo Tijhof 2364e35ad5 Preserve pre-existing css classes on edit tab link
Follows-up Ib2e6237483338c8.

Note that the potentially dangling space is cleaned up by the
Html class in MediaWiki which recognises this as a space-separated
attribute. It also supports an actual array, if MediaWiki core
were to expose 'class' as an array, we could just cleanly push an
extra into it (as well as easily removing items). But this hook
maintains this array item as a string for backwards compatibility
with hook listeners that expect a string.

Bug: 64646
Change-Id: Ib74ecf93fc4fc4bbb1af43efdf325edc7fb2d85f
2014-04-30 13:02:17 +00:00