Commit graph

10282 commits

Author SHA1 Message Date
jenkins-bot f4192a7847 Merge "Make transclusions which are td/th elements behave as table cells" 2015-08-04 20:37:41 +00:00
jenkins-bot d103896e4a Merge "[BREAKING CHANGE] Target*: Replace target events with methods" 2015-08-04 20:35:35 +00:00
jenkins-bot ec771efc6b Merge "Update VE core submodule to master (15e5545)" 2015-08-04 19:48:48 +00:00
Ed Sanders b3972c1e26 Move theme style files to appropriate skinStyles sections
Bug: T107928
Change-Id: Icad7569f828409f53d6c744593a58f835ae70b9b
2015-08-04 20:43:12 +01:00
Ed Sanders 2c24efae29 [BREAKING CHANGE] Target*: Replace target events with methods
When you bind to your own events you're probably using the wrong
design pattern.

The events are kept (without arguments) for the purpose of tracking.

Change-Id: I6983319f9e0ca179e609afb00c821e3eab2161c9
2015-08-04 11:49:54 -07:00
Ed Sanders de98382a55 Make transclusions which are td/th elements behave as table cells
Depends on Ic94242c0 in core.

Bug: T85648
Change-Id: I0f65fca37fe94486d0a736d763270b3dc5503649
2015-08-04 17:52:13 +00:00
James D. Forrester ffe075f21e Update VE core submodule to master (15e5545)
New changes:
87c538a PasteRules#plainText: Fallback if rules.external is undefined
7155191 Localisation updates from https://translatewiki.net.
c2d03ea ToolContextItem: Use the target's command registry
d196838 DataTransferHandler: Improve aborting and resolution/rejection
009190e Allow the target to specify a DataTransferHandler factory
0ea9439 Split out basic functionality of tableCell so other nodes can behave as cells
999a5da ve.ce.TableCellableNode: Only apply title to nodes which are cellable

Change-Id: I56a73a26f21a6e22b6bafc850cdee35397e5d15d
2015-08-04 10:51:35 -07:00
Ed Sanders 529248f831 Target*: Remove 'on' from methods which aren't event handlers
Allows us to rename onSaveEvent back to onSave.

Before this change,
* ve.init.mw.Target.prototype.save ->
* ve.init.mw.Target.prototype.onSave, emit save event ->
* ve.init.mw.DesktopArticleTarget.prototype.onSaveEvent (or MF equivalent)

With this change,
* ve.init.mw.Target.prototype.save ->
* ve.init.mw.Target.prototype.saveSuccess, emit save event ->
* ve.init.mw.DesktopArticleTarget.prototype.onSave (or MF equivalent)

Change-Id: I016262b38a941c93c0978391491baa6d5a32fe28
2015-08-04 17:47:05 +00:00
James D. Forrester 86212df814 Follow-up fd2ef3e: Keep passing data.isRedirect in #onSave
Also fix ve.init.mw.DesktopArticleTarget#onSave to #onSaveEvent to avoid clash.

Change-Id: I5efb1884f9626e5da72b226cc8ca596bb6db4a40
2015-08-03 18:41:58 -07:00
jenkins-bot c89795c49e Merge "Revert "Revert "For empty / whitespace-only headings, output <p> instead of <h#>""" 2015-08-03 22:57:28 +00:00
jenkins-bot 5a5ec053b6 Merge "Follow-up fd2ef3e: Call prototype., not ve.init.mw.Target#onSerialize" 2015-08-03 22:57:06 +00:00
Jforrester dbe11c3b14 Revert "Revert "For empty / whitespace-only headings, output <p> instead of <h#>""
It's seemingly still needed.

This reverts commit 924c58a893.

Change-Id: Ib9428865fbab2669153bd23cf239717080eb8291
2015-08-03 22:49:16 +00:00
James D. Forrester d6541e1e8d Follow-up fd2ef3e: Call prototype., not ve.init.mw.Target#onSerialize
Change-Id: I9fd86b91c8b7fa3c09758b492332c56d10c39a95
2015-08-03 22:42:51 +00:00
Alex Monk 871a0a288f Unbreak meta dialog cancel button
Don't try to apply page settings changes to meta list unless we're actually
applying. "Cancel" shouldn't apply changes, we have another button for that.

Bug: T97682
Change-Id: I9eae20c3946b315413340268e44537cdbec2e455
2015-08-03 22:36:53 +00:00
Translation updater bot daa87a3651 Localisation updates from https://translatewiki.net.
Change-Id: I5e096e96395b6df698aa210fabdb91a6fd3e59c1
2015-08-03 22:06:38 +02:00
Ed Sanders a4b250c790 MWImageModel#insertImageNode: Separate out linmod generation
Change-Id: Idee01e2e59f2a68481476f3d784502d3ebdf015b
2015-08-03 01:11:50 +00:00
Ed Sanders 322d1f54c6 MWMediaDialog: Remove redundant check of this.imageModel existence
The fact it has to exist for the two previous statements to
not fatal is a bit of a clue. I assume this made sense at
some point in the past.

Change-Id: Ic9c04395408301f514ff7e9a224b8e2c30d64896
2015-08-03 01:09:03 +00:00
Ed Sanders 022fa98856 Use target-specific command registry for lookup
Only use was in MWHelpPopupTool#onKeyboardShortcutsClick.

Depends on Ie24369b9 in core.

Change-Id: I630d3e55057ddf6f87e39ab2e99e93a71bd1d8bb
2015-08-03 01:07:47 +00:00
Ed Sanders dedc107507 MWCommandRegistry: Move commands' registrations to their code
By moving the registration to the code which introduce the commands, if any
module such as 'media' is omitted from an integration, we don't register a
command which is never used.

MWCommandRegistry.js remains to be used for over-rides of core tools' exact
commands, such as insertTable.

Change-Id: I84b4351b980a764d3c72a564f605821ae1c761f9
2015-08-02 17:55:09 -07:00
Ed Sanders 4ab947d336 MWSaveDialog: Remove unnecessary <br /> from diff panel
Change-Id: I430794d781c91886abb4802c7f53ad4e0ff14c3b
2015-08-03 00:43:51 +00:00
Ed Sanders 92cc1d1b53 Use super constructors in ArticleTargets
Change-Id: I58041de7421232dabe4541d438dd7cc66e3c8d92
2015-08-03 00:35:01 +00:00
jenkins-bot e98412bbec Merge "ve.init.mw.Target#save: Bind this#onSave, not #onSave" 2015-08-03 00:33:10 +00:00
Ed Sanders adcfb56761 ve.init.mw.Target#save: Bind this#onSave, not #onSave
Change-Id: I62fbb6f31c0ddd17a1179fb4c2d8f13e44e9c9bb
2015-08-03 00:30:06 +00:00
jenkins-bot 44eeb5c8c1 Merge "Revert "Revert "Replace wgVisualEditorNamespaces with an associative array""" 2015-08-02 23:50:44 +00: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
Translation updater bot 132caa7c43 Localisation updates from https://translatewiki.net.
Change-Id: I95a7d246d51437effb52ca2a17edc1979ccad6d7
2015-08-02 21:54:59 +02:00
James D. Forrester d32c390523 Update VE core submodule to master (d9d4e33)
New changes:
288b060 Use frameless buttons in mobile process dialogs
b7deb26 Fix typo in TargetWidget.css
62c63d7 Localisation updates from https://translatewiki.net.
ac0c49a Remove duplicated commands for 'code' and 'strikethrough'
c4120fc Make setExcludeInsertions chainable, like all other SurfaceFragment methods
d2e86df Use super constructors in Desktop/MobileSurface
a1364f4 Have getLinearFragment call getFragment
842b322 Use overridable factory methods for creating surface model and view
8e729f7 Localisation updates from https://translatewiki.net.
479095c Make 'plainText' a paste rule, rather than a named parameter
744c633 Allow the target to specify command and sequence registries

Change-Id: Ie312412d5af350e7b1478393ad288bbe14a7a43a
2015-08-01 15:46:47 -07:00
jenkins-bot a15c54f4db Merge "MWSaveDialog: Make a FragmentDialog now that's available" 2015-08-01 22:44:18 +00:00
jenkins-bot b46bd69c49 Merge "Move toolbarSaveButton init to base class" 2015-08-01 22:43:25 +00:00
jenkins-bot c98038d258 Merge "MW target: Make 'static' methods either static or be instance methods" 2015-08-01 22:41:53 +00:00
Ed Sanders dc71b4849b MWSaveDialog: Make a FragmentDialog now that's available
* Make save a FragmentDialog and open with WindowActions so
  the selection is restored automatically.
* Pass in some information in setup data.

Change-Id: I254b71f252adce064b9c2d2bf2cb6c8d0018e31f
2015-08-01 22:41:17 +00:00
Ed Sanders fd2ef3e4cd MW target: Make 'static' methods either static or be instance methods
MW target has 'static' methods, some of which aren't attached
to the static property, the rest of which should be instance methods.

Rename success/fail functions to remove 'on' as that is reserved for
actual event listeners.

Change-Id: I63e68dbe1923906208b180abfc4a9a280b4d098e
2015-08-01 22:38:49 +00:00
Alex Monk d6306d8a16 Don't error when we try to close a reference/media dialog with inspectors still open
Bug: T96630
Change-Id: Ie148149c9681a883116df12a23ae6e4c3b470daa
2015-08-01 22:44:34 +01:00
Translation updater bot b61ce1bb1b Localisation updates from https://translatewiki.net.
Change-Id: I0c6c26e8530944e904a351bbae82ac7b3e74611a
2015-08-01 21:49:37 +02:00
jenkins-bot 437d69d4a5 Merge "Revert "Only change edit tab text if the current text is as expected"" 2015-08-01 00:32:24 +00:00
Jforrester 37b50a273f Revert "Only change edit tab text if the current text is as expected"
Apparently doesn't work in English.

This reverts commit 8239437a3f.

Change-Id: I03a375c85b32058992d5956b6801605fa997dd7d
2015-08-01 00:29:51 +00:00
jenkins-bot c8ab0003f3 Merge "Stop removal of only template placeholder from transclusion" 2015-07-31 21:58:58 +00:00
Alex Monk 8239437a3f Only change edit tab text if the current text is as expected
Otherwise we end up colliding with other extensions like Translate

Bug: T94386
Change-Id: Ib48ce33b8db9639400415cf778cd42e2d47070f1
2015-07-31 22:41:01 +01:00
Translation updater bot d319952727 Localisation updates from https://translatewiki.net.
Change-Id: I24ab62aea021891835bbc297966502ee574655e6
2015-07-31 21:50:11 +02:00
Ed Sanders e9b7f4c029 Move toolbarSaveButton init to base class
Change-Id: I145c4029f9e1a6e46591134a7756dada1251551b
2015-07-31 12:03:14 +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
Translation updater bot 1635ac7c53 Merge "Localisation updates from https://translatewiki.net." 2015-07-30 19:14:52 +00:00
Translation updater bot ba6fca03cd Localisation updates from https://translatewiki.net.
Change-Id: I0de5d945fbf3b21e91be2270166a675e0e3c440c
2015-07-30 21:13:45 +02:00
jenkins-bot 16357376d0 Merge "When saving from review screen, swap to main save screen" 2015-07-30 19:13:23 +00:00
jenkins-bot 616d98ead5 Merge "Follow-up Ieb4e4eb3: Remove @until jsduck tag" 2015-07-30 17:45:42 +00:00
jenkins-bot 1bd8ecf61d Merge "Bring in code from MobileFrontend" 2015-07-30 17:25:14 +00:00
Ed Sanders d2c15e9eb5 Bring in code from MobileFrontend
* Use local edit source tool, and emit event to MF
* Bring in toolbar styles, bonus: remove old desktop style hacks

Bug: T96186
Change-Id: I89351e409aa4e9d626edd7151ae05bdcd58f1cee
2015-07-30 17:13:00 +00:00
Ed Sanders 915a82d2da Remove empty DesktopArticleTarget-shared.css
DesktopArticleTarget.css serves the same purpose and is non-empty.

Change-Id: Ieb2c41cdd774fac09537597b0bf9315aa446020c
2015-07-30 17:58:54 +01:00
James D. Forrester 2fdb1bb07e Follow-up Ieb4e4eb3: Remove @until jsduck tag
Change-Id: Ia8a76d8011145ef11720ccd242b354299bc67434
2015-07-30 08:39:45 -07:00
Ed Sanders cf191f5fa8 Update VE core submodule to master (8feab4e)
New changes:
11953f7 Localisation updates from https://translatewiki.net.
0dbafb0 Update OOjs UI to v0.12.2
cbd0982 Replace placeholder color with opacity
087365c Support other types of 'empty' document placeholders
7692890 Make scrollIntoView a VE utility function
5a1a159 Localisation updates from https://translatewiki.net.
8edf71e [BREAKING CHANGE] Kill ve.indexOf and thus @until
bb02b02 build: Bump various devDependencies to latest
cb5b2cd Fix scrollIntoView util binding
8feab4e [BREAKING CHANGE] Use config object for Target constructors

Local changes:
* Use config object for Target constructors

Bonus:
* Add CSS classes to MW targets
* Use 'super' calls

Change-Id: Ieb4e4eb3663aab2706c0f3ecc8b82e00555df1d5
2015-07-30 08:28:48 -07:00