Commit graph

904 commits

Author SHA1 Message Date
jenkins-bot 1ac5ede187 Merge "Don't try to JSON stringify load error messages that are already strings" 2017-01-03 20:22:50 +00:00
jenkins-bot 4abdf21413 Merge "Also allow opening in source mode if VE is unavailable on action=edit" 2017-01-03 20:19:09 +00:00
jenkins-bot a973528d67 Merge "Don't block VE/NWE from loading if 'editintro' is specified" 2017-01-03 20:13:29 +00:00
jenkins-bot 945d3d4cbc Merge "After saving a specific section, scroll to it" 2017-01-03 18:49:19 +00:00
Alex Monk 5c2773539e After saving a specific section, scroll to it
Bug: T153297
Change-Id: I233e5226abc44d5d0bf8e56957a133d595e7be6f
2017-01-03 18:38:55 +00:00
jenkins-bot f439843964 Merge "Factor out preferred editor check" 2017-01-03 17:50:42 +00:00
jenkins-bot f89a6a3880 Merge "build: Bump file copyright notices for 2017" 2017-01-03 17:11:04 +00:00
jenkins-bot 24d26f5e19 Merge "Move translate extension hack up to 'isAvailable'" 2017-01-03 17:04:11 +00:00
jenkins-bot 7c790f8d12 Merge "Use preferred number casting method" 2017-01-03 17:04:10 +00:00
James D. Forrester 122f49b2dd build: Bump file copyright notices for 2017
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -08:00
Ed Sanders fe85ee1ba6 Don't block VE/NWE from loading if 'editintro' is specified
Later we should actually show the edit intro, but that is a
separate issue (T56029).

Bug: T153481
Change-Id: I97622a3d86b975866305aaa745bac51f6b55f217
2016-12-31 15:22:11 +00:00
Ed Sanders 9eebfbcac5 Fix NWE-only edit tab
Change-Id: I5d08e30f43fbe08eb8809692728a8ab37f3a1491
2016-12-30 16:42:54 +00:00
Ed Sanders 3f47aec20b Use preferred number casting method
Change-Id: I77215f2bdb6eb055375e5b803d23b6f26df2d8d1
2016-12-29 20:33:15 +00:00
Alex Monk 4af862e6d3 Also allow opening in source mode if VE is unavailable on action=edit
Bug: T153508
Change-Id: I5678d3b417c93707edc90bbb76ce4dafcd2098c6
2016-12-29 20:32:58 +00:00
Ed Sanders c963b73e71 Factor out preferred editor check
Change-Id: Ic2e2e2e1d24dba8854315dff068ea9ce5d409c5a
2016-12-29 20:17:55 +00:00
Ed Sanders 7de023caee Allow switching between 'edit source' and 'add topic'
Also between section editing and full page editing
by clicking on 'edit source'.

Change-Id: I9165a7ad4ac2a588a09532c7181ba72b6fd2f811
2016-12-29 15:48:38 +00:00
Ed Sanders 827d4185c4 Move translate extension hack up to 'isAvailable'
All modes of VE should be disabled on these pages.

Bug: T153445
Change-Id: I5adfae940ee35c5ee6712e620a0ddda967a542ad
2016-12-27 13:56:10 +00:00
jenkins-bot d5f66e4fe9 Merge "Preserve checkbox data when switching from VE to NWE" 2016-12-22 12:37:37 +00:00
Ed Sanders aee5e665f1 Preserve checkbox data when switching from VE to NWE
Bug: T153889
Change-Id: Ifc41ea9320c9f2627efff6f33d4ad87c59fad496
2016-12-21 22:35:52 +00:00
Alex Monk 101b0ff45c Don't try to JSON stringify load error messages that are already strings
Change-Id: Ib180c3ac7eb62d351e05153defd6330c3397c478
2016-12-21 04:00:05 +01:00
Bartosz Dziewoński 72569159b8 Add comments in some places where we really want to treat messages as HTML
Change-Id: I439338dabd4b031ed1c4cfc9d89af5a6f2971676
2016-12-20 10:50:15 +00:00
Alex Monk 96b8d35bff Wrap localStorage.getItem calls in try { ... } catch () {}
Bug: T153291
Change-Id: Ic4f8c390bfe6936bd182b28b1f2c6d19bf459eba
2016-12-15 23:08:30 +00:00
jenkins-bot ee2cb3048d Merge "DesktopArticleTarget: Generate the original page title if needed" 2016-12-15 16:50:47 +00:00
Ed Sanders 17a164363b Properly clear this.section when switching from VE
Bug: T153276
Change-Id: Idc251c73c03bf87b6e6ca716be98b38d4fb68c5e
2016-12-15 01:34:30 +00:00
Ed Sanders 856d480f7d Follow-up Ic1f1de26: Fix typo in edit tab selector
Change-Id: I0ac685f1d942a7d40c6926b8ae8d751db04e1474
2016-12-14 17:35:09 +00:00
jenkins-bot 593474912f Merge "Fix logic for create accesskey=v, and bind to onEditTabClick" 2016-12-14 01:30:17 +00:00
David Lynch b1aed096cb DesktopArticleTarget: Generate the original page title if needed
When switching from the old wikitext editor to VE, we stored "editing..." as
the original page title. Then restored that when saving / switching to "read".
Instead, detect if we're on top of the classic editor, and use the pagename
message to make a plausibly-correct title.

Bug: T126077
Change-Id: Ib0289de71c3ae947ca0a3e45fe1e620378689c35
2016-12-13 19:28:15 -06:00
jenkins-bot 16c5d489fc Merge "Don't restore scroll position when doing real section editing (NWE)" 2016-12-13 16:33:16 +00:00
Ed Sanders db447733b0 Fix logic for create accesskey=v, and bind to onEditTabClick
Change-Id: I69020652f2946626c443ef5b724cf92e7905f247
2016-12-13 16:06:57 +00:00
Ed Sanders d2ea716902 Don't restore scroll position when doing real section editing (NWE)
Bug: T152946
Change-Id: I969a8edd4f23bbe6c73855aac059df732102c560
2016-12-13 15:44:54 +00:00
Ed Sanders 69c0fb189a Fix action=editsource URL rewriting
Always look for links unless the only tab is VE.

Bug: T153054
Change-Id: Ic1f1de26fb77098fe62f6263a25c8a40de0e09a7
2016-12-13 15:36:34 +00:00
Ed Sanders 1f3bb5c9e5 Add section= param to URL after loading target
This wasn't such a big deal in VE because we load the full
page anyway, but in NWE it is more annoying if you reload the
page and are dumped in a different edit area.

Change-Id: If49569cbe1a2759d8cbbd7ee42dd1b88da39a946
2016-12-13 15:31:57 +00:00
jenkins-bot a962e7de3b Merge "Support section=new in NWE" 2016-12-13 13:55:33 +00:00
Ed Sanders 5a8106773c Support section=new in NWE
Bug: T150709
Change-Id: I1002b97060d642df0988da15860a36c13712bade
2016-12-13 12:20:55 +00:00
Ed Sanders 2d645d1631 Use Surface#setDisabled instead of deprecated #disable
Change-Id: Idf998ddc0b95efbf6befbcfa493c42b4c3ba1bfc
2016-12-10 20:03:07 +00:00
Ed Sanders d555b5ba33 Cleanup handling of 'section' param
Provide a common function to parsing, and always pass
section to the target, instead of having the target
re-compute it itself.

Change-Id: If9fc24ffa51507cd969fa1b4dfc1519a0b50a572
2016-12-08 20:24:19 +00:00
Ed Sanders cd87e7483b Expand dummy surface to be at least valid
Change-Id: I3888dd2f72858bbe79c61fa4a6f7967f21c5cb7c
2016-12-08 19:36:57 +00:00
David Lynch d720041fd7 DesktopArticleTarget: clear out originalCategories when they're updated
Bug: T152571
Change-Id: I41b5d5aeea0a01cf922924fa1320369d54fef8cf
2016-12-07 09:48:26 -06:00
David Lynch af8aad0483 DesktopArticleTarget: Rebuild the category links when they're edited
This has to go to the API, because it's skinnable. Also, separates out a few
of the initial page setup functions so they can be re-applied to the new
content inserted.

Bug: T151651
Change-Id: I8d5a6504edc2e0486a0b4f016d8ee6d9a6228de9
2016-12-06 11:28:08 -06:00
Ed Sanders aa7dba9bdb Follow-up Ifaf6a2607: Display correct message when switching
Use new mode, not old mode for choosing switch message.

Change-Id: I1ad0913b4a23fd6fbf5cdeb07d1a58ec72398d57
2016-12-04 15:51:57 +00:00
jenkins-bot 36d976c4c0 Merge "Save Dialog: add shortcut for opening to the review panel" 2016-12-02 00:36:40 +00:00
David Lynch 2bd34cebd4 Save Dialog: add shortcut for opening to the review panel
Create a new MWSaveDialogAction, which can be hooked up to triggers. Switch
the existing save dialog accesskey to just use the trigger system.
(Maintaining all the accesskey logic, so we don't change the shortcut on
people.)

Bug: T149914
Change-Id: I9b4ef8504148703556f802b266a517dd5098c06b
2016-12-01 18:16:18 -06:00
jenkins-bot e3c0a05b84 Merge "Prevent endless error loop if falling back to wikitext (after a load failure) fails." 2016-12-01 23:17:42 +00:00
Ed Sanders 218742d806 Update VE core submodule to master (ae30d71)
New changes:
f58ddea DiffElement: Use document slices with full internal lists
83800c0 DebugBar: Remove hard-coded i18n
b4f89e1 Update OOjs UI to v0.18.1
40c7bf6 Factor out active node functionality from SectionNode for captions
2d967be Move 'mode' property to surface, rename target property to 'defaultMode'
5d8c214 wrapAllNodes in sourcefragment
dd3d9e5 Refactor ve.dm.Transaction
9d61aca Use canonical ve.dm.TransactionBuilder.static.newFrom* methods
df4f72a Make table caption node an active node
b79f72d Core source mode
7533ac4 Localisation updates from https://translatewiki.net.
ae30d71 SourceSurfaceFragment: Check range is not collapsed

Local changes:
Get edit mode from surface where possible

Depends-On: Iec758c1892d518ad4bc2c0d1aaf6ca00fa354323
Change-Id: Ifaf6a26078b2731b374aaad2cb40c08928de9c84
2016-12-01 10:40:01 -08:00
jenkins-bot 3d8a749cf2 Merge "init: Initialise 'active' property in mw.Target instead of subclass" 2016-11-22 23:35:10 +00:00
jenkins-bot 8370b98e3f Merge "Move around code that sets up edit notices to ensure it runs after we receive the notices to display" 2016-11-22 23:27:26 +00:00
Alex Monk 16e294fba7 Move around code that sets up edit notices to ensure it runs after we receive the notices to display
Bug: T151236
Change-Id: I63ab27cb236169f300295b2ed4c88e01048092e7
2016-11-22 19:16:09 +00:00
Timo Tijhof cde3d2a7f8 init: Initialise 'active' property in mw.Target instead of subclass
This is set to 'true' in mw.Target#setupSurface(), but not initialised or
used there in that class.

It was previous initialised in an indirect subclass (DesktopArticleTarget).
Move this to the parent class instead for clarity.

Change-Id: Ie3e12d254aa4b689fdce64620e110164311bc60a
2016-11-21 18:06:52 -08:00
Ed Sanders 7f2d5b5bee Don't re-bind edit tab in DAT when using SET
In SET the tab's events are already bound in DAT.init.

Bug: T151258
Change-Id: I04529dbdea2d2ff5e52b0f11035a4ac11946617b
2016-11-21 22:09:26 +00:00
Ed Sanders e1a887ccf8 Migrate DesktopWikitextArticleTarget code upstream
Change-Id: Icca4715411737a561302b44b127d91d117e7e29b
2016-11-20 02:52:14 +00:00