Commit graph

10216 commits

Author SHA1 Message Date
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
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
Ed Sanders 9921759456 Fix target rename merge conflict in CSS
Change-Id: I4ca015696d51c59a4c533127458bf5453d092bad
2015-07-30 09:47:55 +01:00
Ed Sanders 08a9551c84 MobileArticleTarget: Collapse text style buttons
B/I doesn't fit with link & cite on a iPhone 6

Change-Id: Ib23b2f8540425ee5d8265f369aea250e900a0c5f
2015-07-30 00:25:52 +00:00
jenkins-bot 2c7a42fff9 Merge "Settings dialog: Focus redirect target input when redirect is enabled" 2015-07-30 00:20:21 +00:00
jenkins-bot 9f20acfc9a Merge "[BREAKING CHANGE] Bring in some code from MobileFrontend" 2015-07-29 23:47:07 +00:00
Ed Sanders 3593184f42 [BREAKING CHANGE] Bring in some code from MobileFrontend
* Bring in back button & save button from MobileFrontend
  so they are properly styled OOUI widgets
* Accordingly, move toolbar save button code up into base
  MW target.

Bug: T96186
Change-Id: Ic89dd4efb831fc3b09980da16524276f6568619d
2015-07-29 16:16:39 -07:00
Alex Monk 45325e0db7 Settings dialog: Focus redirect target input when redirect is enabled
Bug: T106616
Change-Id: Ia635552825194908503b8e8eef61f5fa2733a9da
2015-07-29 23:58:43 +01:00
jenkins-bot f616edd310 Merge "DesktopArticleTarget-*.css: Placeholder CSS fixes for skins" 2015-07-29 22:14:05 +00:00
Translation updater bot 7ae8321366 Localisation updates from https://translatewiki.net.
Change-Id: I67fff722b4925649f82e2672f48871fce296d7d7
2015-07-29 21:52:32 +02:00
Ed Sanders 03449dca80 DesktopArticleTarget-*.css: Placeholder CSS fixes for skins
Change-Id: I8c7f98cc083c0811cd847a8b3874a586487658ca
2015-07-29 12:02:09 -07:00
Ed Sanders b4d22ee432 Remove mobileViewTarget alias hack
Was required to pass tests until MF fix got merged.

Change-Id: I15a4c7de8135f25aa729ae052583b803ca44570d
2015-07-29 18:50:04 +00:00
Ed Sanders bb57348a9e DesktopArticleTarget#activate: Rename pageTarget to target
Change-Id: Iae71a050058afb2c1111a99ede5b969afbf5aca6
2015-07-29 17:58:33 +00:00
Ed Sanders fecdc29a38 Replace ve-init-mw-desktopArticleTarget-* with ve-init-mw-target-*
Except in cases where it is only applied to desktop articles.

Change-Id: I40a9dabcd8454138f94affde809afee9c93732a4
2015-07-29 18:26:36 +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
Alex Monk 7b7219fcb6 When saving from review screen, swap to main save screen
Bug: T107251
Change-Id: I78fb0b8804ffa4b8accd4d2619d7bbd34e2c4f1e
2015-07-29 17:48:43 +01:00
jenkins-bot 85ca7d3e94 Merge "Close the wikitext switch confirmation dialog if serialisation errors" 2015-07-29 00:41:26 +00:00
Roan Kattouw 6d22fd1aa7 Follow-up 8250c8ad54: unbreak ApiResponseCache
.set() should not overwrite existing deferreds; instead,
it should resolve the existing deferred if it's pending.
This is necessary because .set() is used by processResult().
Without this, passing .get() a title that no information
is known for results in a promise that is never resolved,
because the associated deferred is overwritten as soon
as the API response arrives.

Still make .set() a no-op if data has already been set,
by checking if the deferred is pending. For .resolve() this
doesn't matter, but for modifying this.cacheValues it does.

Bug: T107212
Change-Id: I70e8c5450f23062db214ccc5c585624d41de6509
2015-07-28 15:10:21 -07:00