Commit graph

365 commits

Author SHA1 Message Date
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
jenkins-bot da577b21d5 Merge "mw.ViewPageTarget: Use .mw-body-content for content styling" 2014-04-29 22:25:53 +00:00
Trevor Parscal e0e08388ce mw.ViewPageTarget: Use .mw-body-content for content styling
* font-size and line-height differed between read mode and
  edit mode. This makes them match by using the same css class
  as MediaWiki core uses for the body content.
  Depends on I66c56c57 in MediaWiki core.

* Document padding / margin hack on surface, and sync the values.
  In edit mode, the text was being nudged to the right by a few
  pixels.

* Bump the wfUseMw call as this is a symptom of how VisualEditor
  now depends on MediaWiki 1.23.

Bug: 64599
Change-Id: I5818dce626545c4cbc8bd84fd551dc08baedbe32
2014-04-29 21:04:05 +00:00
Alex Monk a72da562a7 Add dynamically generated list of namespaces to visualeditor-enable preference
Bug: 51411
Change-Id: I9ce50f73159f832afcbd5c64e24554b69eb14bf7
2014-04-28 19:11:38 +00:00
jenkins-bot 27d3286362 Merge "Don't change section edit links on foreign file description pages" 2014-04-28 18:53:06 +00:00
Krenair e815d586cc Don't change section edit links on foreign file description pages
We have no proper way to check whether VE is enabled on the remote wiki.

Bug: 54259
Change-Id: I4b0edc00ee9736b282820d4a504f1702ab0590fc
2014-04-28 11:49:14 -07:00
Ed Sanders be36dfca25 Use core language search dialog
Depends on I21a9d7e in core.

Change-Id: I12cacf775b490d7c676011a5a154deeefe5527c5
2014-04-23 18:43:03 -07:00
jenkins-bot 003d3fb89a Merge "Add AnnotationAction.test.js" 2014-04-24 01:11:10 +00:00
jenkins-bot 931952cb95 Merge "Enable the language tool as a Beta Feature" 2014-04-24 00:55:15 +00:00
Ed Sanders 9041562ed3 Add AnnotationAction.test.js
Depends on I1868130 in core.

Change-Id: I13372efabe91212c10a75df20125365a422919d3
2014-04-24 00:54:02 +00:00
James D. Forrester 11dfcd269c Enable the language tool as a Beta Feature
Change-Id: I14560b758c664081110c76a709a7279c9840cc11
2014-04-23 17:46:27 -07:00
Ed Sanders 3da70b40b9 Update jquery.uls from 601a5256b8 To 1932de9e347d
f404bc9 Update to use jQuery 1.10.1
3571e77 Update jQuery version in examples to 1.10.1
5c6c24d RegionSelector: Scroll to appropriate area instead of rebuilding the list
6d92fa3 Update README.md
ab9b014 Update to latest grunt
078448a Update code formatting
adcc1ad Fix spelling mistakes
33ec928 Use events instead of callbacks for success or no results
e54d85a Use Autonym font for autonyms
d8fdcd4 Corrected the Unicode character in the Arab Kazakh autonym
7b8e43e Add lrc and ses
b1d01d9 Updated Autonym font
0e0cb89 Updated uls.data.js
658914a Update code formatting
9dddc41 Updated Autonym font
e83494c Formatting fixes
a48123e Update Autonym font
61f7bce Update Autonym font
ac8aa27 Remove non-existing "-ms-linear-gradient"
522b14f Use text() instead of html() to set language names
9ae403b Remove unnecessary object instance
a985d33 Use attr and prop consistently
5444e17 Avoid 'recalculate style' by conditionally change classes while scrolling
67cc85f Reduce data size a bit by using unescaped unicode
2247581 Move the autonym font to example instead of making part of jquery.uls
49497d7 Avoid overriding grid css for language list
a4276bb Optimize png images with optipng -o7
72c0bd2 Optimize language icon SVG
e43994d Optimize the search and worldmap svgs
623cdb6 Validate whether the language from API is known while trying to display
9d77cfb Fix typo
cfba32a Remove developer console logs when unknown language found
9b3d64e Remove stray character in example file
84d7636 Use a single var statement
520e1b1 Suppress JSHint double quote warnings in jquery.uls.data.js
09aeb8e Update the Autonym for 'cu'
902afa5 Add the missing closing paranthesis for Chinese Simplified Han
69f3256 Avoid title case
78e9b83 Make ULS language selector appear faster after clicking trigger
a93ad4b Remove comments from json
a1b5db4 Update README.md
50477e2 Update documentation about options
2d93a37 When clicking a region, scroll only the list and not the whole page
d8fc3d4 Remove double scrollTop call
02ebadf Apply /* @embed */ pragma to every image, not just the topmost in each block
d4ea222 Drop -moz-linear-gradient for images
99f1f86 Add rwr and ota to the languages supported by ULS
40e3a94 Updated jquery.uls.data.js file
83bd524 Add EU too for ota.
f00cf29 Optimize all SVGs
38b3780 added dxʷəlušucid [ISO:639-3:lut] to langdb.yaml and updated jquery.uls.data.js wuth ulsdata2json.php
6676222 Lojban to lower case
859bccd Test: Add lut to the list of languages in AM region
5b68627 Add rmf to langdb
61d0086 fixed autonym for Lushootseed
91f3906 updated jason file after modifications to langdb.yaml
0c11d38 Space before comment #
42733b5 Remove prefixed border-radius rules

Repo is https://github.com/wikimedia/jquery.uls.

Change-Id: Ibef36df5fa476725f3f3307888ed368381a70ea5
2014-04-23 18:32:39 +00:00
jenkins-bot a1fd95e522 Merge "Don't change tabs on Education Program pages" 2014-04-17 03:38:50 +00:00
Krenair e3be4a6588 Don't change tabs on Education Program pages
Unfortunately the best way I've come up with to do this so far is
checking the namespace.

Bug: 53477
Change-Id: Ib2dbe91aff516f2d2408e07ff3f73ea861bfcbe2
2014-04-16 20:33:24 -07:00
Krenair 99640bf1a7 Use updated tab labels on description pages for files in foreign repos
See I4a43b759

Bug: 63666
Change-Id: Ie4aeddde4909f455472dc5239156c23200033ee8
2014-04-09 00:26:29 +01:00
Siebrand Mazeland f8d56e6804 Move VisualEditor disabling from now-scrapped preferences section
'editing/beta' section stopped being used by anything other than
VisualEditor in 3c0aa26a0da68a9 in June 2013, and the section was
removed from MediaWiki core in ief2c7d1df876fb04.

This is a follow-up to 799e11ca7e which omitted one occurrence.

Change-Id: I05a6cce89d71808d82c12f54beb6b7a6730b265f
2014-04-07 11:42:41 +02:00
James D. Forrester 799e11ca7e Move VisualEditor disabling from now-scrapped preferences section
'editing/beta' section stopped being used by anything other than VisualEditor
in Id8b9a47a in June 2013, and the section was removed from MediaWiki core in
I76667a15cc today.

Change-Id: Ida16f714c28c46d552b92c05b07b63f5d6dd361e
2014-04-06 16:53:25 -07:00
Krenair e3b7827c44 Give the edit tab <li> closest to the collapsed tabs menu class=collapsible
Bug: 50225
Change-Id: Ib2e6237483338c8072d5f7919c6459bf7418946a
2014-04-03 02:16:13 +01:00
James D. Forrester da381da76d Switch Beta Features hook to use new ltr/rtl screenshot style
Change-Id: I48f5ca54130e4d9c9e3745c89e561b06ccd94a83
2014-03-22 20:54:04 +00:00
James D. Forrester aea64bf2df Remove the math inspector code
Moved to the Math extension in I8e582ee6deadc2750

Change-Id: Iab0c56246626de1e0f6ab770e777c0a28756fa75
2014-03-19 19:27:25 -07:00
jenkins-bot fbdc55dc78 Merge "Table of contents widget" 2014-03-14 22:31:10 +00:00
Rob Moen eba7d58dd1 Table of contents widget
TOC Widget is created in the mw target view class.
Adding and removing a heading rebuilds the TOC Widget based
on the the order of the page heading nodes.

TOC Widget considers TOC page settings and displays in the default manor
unless forced or disabled.

TOC Widget still needs to be finalized by being placed in the surface.
This could be a problem until we have a CE node for it to live in or
have some DM work added.  Roan and I have discussed how to go forward.

To enable the widget you must add the following to LocalSettings.php:
$wgVisualEditorEnableTocWidget = true;

Change-Id: I488cfbbdb060e50d81f51e0f757e67d0114b8936
2014-03-14 15:20:19 -07:00
Krenair 6b2d30c259 Rename 'wasve' parameter to 'veswitched'
Per Krinkle's comment on I1426d300

Change-Id: Ic99efe9488c98a7f6703142d6061bd2cdbac833b
2014-03-12 18:10:17 +00:00
Krenair f8685d94a7 Fix fatal when user switches from VE to the old editor and makes a null edit
$revision can be null if the user makes a null edit, I have changed the doc
page to reflect that.

Change-Id: I40c1412dbd3f8e023bd4fa65d86d3d5092870ad4
2014-03-12 00:01:54 +00:00
James D. Forrester a78a8b458e Update VE core submodule to master (48dd09a)
New changes:
48dd09a Update OOjs UI to v0.1.0-pre (8ac38a5c31)

Add OOjs UI's new Apex theme to the module definition (for users on
older versions of MediaWiki that do not have it available).

Change-Id: Ia79c2380aa2368d58e5980131cf70c91576dfd49
2014-03-04 11:45:12 -08:00
Ed Sanders b14326624b Consistency in DM MW test naming and comments
Move MWConverter to Converter and fix some comments.

Change-Id: I8b73d064c890e9cdae61f8118b092e5041febaa5
2014-03-03 14:34:08 +00:00
Trevor Parscal cbd3419dfb Update VE core submodule to master (ac4b49a)
Also update template/transclusion code for OOJS UI
OutlineControlWidget changes, and uses some of the new
functionality.

New changes:
ac4b49a Update OOjs UI to v0.1.0-pre (51f922ba17)

Change-Id: Id7a1f60cd6ce3bdaba7ccb8774563b9e81c75cad
2014-02-28 16:41:42 -08:00
jenkins-bot 66df1ec1b5 Merge "Track edits where user switched into wikitext editor from VE" 2014-02-27 01:35:56 +00:00
Krenair 952a239866 Track edits where user switched into wikitext editor from VE
By adding a tag called 'visualeditor-switched'.

Bug: 56465
Change-Id: I1426d300499b59ca55c9b97fc1560f4adbfa9295
2014-02-27 01:33:40 +00:00
James D. Forrester 0f45399082 Split up ext.visualEditor.mwcore into smaller parts
Core retains core functionality, including text styling and architectural
items like dialogs.

The new modules are:
* mwformatting
* mwimage
* mwlink
* mwmeta
* mwreference
* mwtransclusion

The new modules are loaded in ViewPageTarget (for desktop), except for
mwlinks which is included from MWTarget (for desktop and mobile), per the
needs of the Mobile team.

Also, mwgallery was moved to desktop-only loading status.

Some styles which were loaded in mwcore but only used in modules is now
loaded in said modules.

This does not split up ext.visualEditor.core yet, which is left as an
exercise for the fool-hardy.

Bug: 61075
Change-Id: I6374854eaa13af824c11078d2f7004dc8a211a30
2014-02-26 16:31:15 -08:00
Moriel Schottlender b54575a797 Set up wiki-default image size
This commit makes several adjustments to make sure default size is being
handled correctly:

* Add wiki's default size configuration parameter to the
  VisualEditor.hooks.php file so it can be called from VE.
* Make sure new images are inserted with default size and are
  marked 'defaultSize = true' for the DM to handle.
* Force default size if 'defaultSize=true' in the DM
* Add a 'default|custom' switch to the media edit dialog for size
  inputs. When 'default' is chosen, the media size widget will be
  emptied, displaying its placeholders (default size)
* When the size widget's values are 0 it will automatically turn to
  default size values. If the value started default and the user
  typed in a size, it will automatically override default and use
  custom size.

Bug: 47804
Change-Id: Ib973ea2afa96090a4ba61b2b55ee63457f1329c1
2014-02-25 16:26:15 -05:00
James D. Forrester 0390da9dbc Remove SyntaxHighlight code
Unused. Will move instead to the SyntaxHighlight extension.

Change-Id: If4d786b55aca45a517c098f3282ba553da0ceb9c
2014-02-20 11:59:37 -08:00
Roan Kattouw 038fe128fe Clean up onResourceLoaderRegisterModules() to make it more data-driven
Bonus: it's now half the size.

Change-Id: I0946eaa8794b49e44a2791befe024e1bc475c0b8
2014-02-14 15:19:21 -08:00
Ed Sanders d169108eeb Implement SVGMaxSize
wgSVGMaxSize sets the maximum size for the shortest edge of a
vector image. Pass this through to MWImageNodes.

Change-Id: I6410e7cda137cf4828d12280cb1e5cfc27805859
2014-02-06 00:59:25 +00:00
James D. Forrester 9a2fb3cfe1 Set wfUseMW down to MW 1.22
Our only dependency on MW was backported from MW 1.23wmf2 to 1.22 before
it was released, so this has been unnecessary.

Change-Id: I6652e6a0a783d33fc8a10eff62128e87923c2510
2014-02-05 08:46:11 -08:00
Trevor Parscal 7994eae8c2 MediaWiki language inspector updates
* Add ULS, which was removed from VE core
* Add experimental mwlanguage module which adds ULS integration
* Hook in ULS to the existing language widget

Also update VE core submodule with changes:
* 1e92abe Generic language inspector

Bug: 47759
Change-Id: I325a4dcc316d0334fadfcaa46ad3acd45c6bf84b
2014-01-18 01:02:23 +00:00
Trevor Parscal 0916b68ed5 Remove unused OOUI messages
Change-Id: I0ce895cb7982fa2e320885b22808b857dc59ca47
2014-01-17 12:49:27 -08:00
Roan Kattouw dc882baab6 Refactor extraModules to $wgVisualEditorPreferenceModules
Instead of having a hard-coded array of preference-triggered modules
that we need to maintain in multiple places, manage this data in one
place in a configuration variable, and explicitly declare the preference
and module names rather than interpolating both of them from a name.

This allows extensions to add preference-triggered modules, and it
allows them to have preference names and module names that aren't
prefixed with 'visualeditor-enable-' and 'ext.visualEditor.' respectively.

Change-Id: I9eb14349cd39125d5c11ffb44c962cc5febb6ba0
2014-01-06 16:57:45 +08:00
James D. Forrester 0ffd654bed Bump copyright like it's 2014
Change-Id: Ic469ebda2c061dc7da0b4c1625f43a7be55da4fa
2014-01-05 20:06:50 +08:00
Roan Kattouw ee743f869d Use submodule for VisualEditor core
* Add lib/ve.
* Remove modules provided by VisualEditor core.
* Update paths.
* Remove VisualEditor core specific things from Gruntfile.
* Remove entries from external.js already in lib/ve/.docs/external.js.
* Implement build script to compose a jsduck index that includes
  all of VisualEditor core. Right now it includes VisualEditor's
  index as-is, and because those patterns (e.g. ve.dm.*Node) will
  also MW subclasses this means our category page will include
  MW classes under "VisualEditor (core)" (before the repo split,
  this was intentional).
  This is inevitable unless we list every class individually, or
  (the plan) until we move the MW subclasses out of the ve.*
  namespace and into mw.* somewhere.

Bug: 45342
Change-Id: Iff45cd555430634c9fc341fd3b177c1e0625300b
2013-12-20 09:18:41 +00:00
Roan Kattouw c41b60021d Move libraries to the lib/ directory
Didn't move unicodejs because it doesn't have its own repo
and is currently mastered in this repo

Change-Id: I14ab4bd641077d993ac235d8bcdcf8e50a1a72a7
2013-12-19 23:02:52 +01:00
Roan Kattouw 21dd4e411a Update jquery.i18n to f6102aa4feddf3623c9fba3a3d31592c58204b58
From f6102aa4fe

Also rename jquery.i18n.messages.js to jquery.i18n.messagestore.js ,
somehow these files are named differently between the version in ULS
and the version in github and I didn't pick up that change when
switching between them.

Change-Id: Icd78c1374969f1ea539938237d405a8aeecd1dd7
2013-12-13 12:16:53 -08:00
Roan Kattouw 3955ceeafa Combine ResourceLoader::register() calls
Build an array of modules to register, then call register() once.

Change-Id: I2040ff12e2660260698bca783a7be50308687011
2013-12-12 00:59:38 +00:00
Ed Sanders 6c231be8ab Organise Flat/ElementLinearData methods and tests
Move containsElementData to FlatLinearData next to isElementData. Move
tests for both methods to FlatLinearData.test.js.

Change-Id: I07a192f5925da7cc763efe5e41427f1f47d85850
2013-12-10 17:51:36 +00:00
Roan Kattouw e1a404e68f Add jquery.i18n files and RL module
Imported 09f7c9e40fc3bd502 from
 https://github.com/wikimedia/jquery.i18n/tree/09f7c9e40fc3bd502

Change-Id: I9bc4759202a0475bcf52230e0c57a877cc848773
2013-12-06 22:50:43 +00:00
Roan Kattouw 3b82dc5cf3 Use proper conditional registration for jquery.uls
Previously worked by checking for the UniversalLanguageSelector
extension, now actually checks for the modules themselves.

Change-Id: I99b1bfabb1953579d3aaa661ab0a4d824a7fe656
2013-12-05 22:02:40 -08:00
Roan Kattouw 0f01f951bb Conditionally register oojs and oojs-ui
Only register them if they aren't already registered, so we're compatible
with versions of MW core with and without oojs.

Change-Id: I5dbb480e8330ceaf0531c194b8ef6cc6c65f537e
2013-12-04 18:28:59 -08:00
David Chan b4f4eeb4b6 Event Logger: collect IME functionality info
ve/ce/SurfaceObserver.js
* Do not setTimeout if frequency === null

demos/ve/eventLogger.html
* Standalone event logging script

ve/test/ce/imetests/*.js
* JSON event logs for various tests/browsers/IMEs

ve/test/ce/ve.ce.test.js
* Add an IME test

VisualEditor.hooks.php
* Add test files

Change-Id: I50e89d5a289f3fcb4fe2a6835a2ec96fb497242c
2013-11-25 16:56:09 +00:00
Timo Tijhof 4cbf220bd8 Use __DIR__ instead of dirname( __FILE__ )
Change-Id: I7ea4cb82ec7b3c6077a7485b0fb618d4c1dd00f9
2013-11-20 09:39:02 +00:00
Timo Tijhof de979ff293 Replace raw oojs-ui files with v0.1.0-pre (0267100ab3)
Change-Id: I792bc0335269976ff29433227b6fa562a1026aeb
2013-11-20 10:27:48 +05:30
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 8de944d9f3 Merge "Adapt beta features icons for RTL" 2013-11-08 18:57:54 +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