Commit graph

183 commits

Author SHA1 Message Date
James D. Forrester 79b7d0305a *ArticleTarget: Don't trust oldid in the query string, it lies
Bug: T156998
Change-Id: Iacb94710c8f2f5fbd8d3de9c8a44424aba0c7d02
2017-03-24 00:30:00 +00:00
James D. Forrester c07a6df74c Don't load VE or NWE on lint-targetted pages (until that works)
Bug: T160102
Change-Id: Ibb364ff2d89975d5907fa887cca666eee6e78d37
2017-03-15 14:23:17 -07:00
Ed Sanders e163a09105 Use more specific event name for switching editor from the toolbar
As we are in the global toolbar event namespace, 'switch' could
mean anything.

Change-Id: I66751faa249710af634ed0fd0c2f2a0bcd872db3
2017-02-28 23:07:54 +00:00
Ed Sanders 109a136bd6 Use pencil icon for editor switcher dropdown
Pencil is the icon we use for 'edit' elsewhere in the UI.
Use the eye icon for the VE tool to specify 'visual'.

Bug: T116417
Change-Id: I12b6bab2a52758685abde04579b274a32d651174
2017-02-28 22:59:51 +00:00
jenkins-bot 2e2a5e452c Merge "Use list tool group for editor switching" 2017-02-28 18:33:44 +00:00
Ed Sanders cb60db4c7f Use list tool group for editor switching
Bug: T116417
Change-Id: Iadf5a81e2733ab81fe25c686dcd6dad8eac3885c
2017-02-28 15:06:48 +00:00
Ed Sanders a3433e67fd Move modules loaded from DAT.init/TargetLoader to ResourceLoader
This will make it easier for third parties to load the required
modules for an article-like target.

Also cleanup mobileArticleTarget to better match desktopArticleTarget.

Change-Id: Idb75e2bd99d8cf2c298e101cf92e8af4f85f5ad5
2017-02-27 16:48:56 +00:00
David Lynch b1d68872b0 DesktopArticleTarget.init: Don't hardcode single-tab accesskey
Bug: T156141
Change-Id: I1312283437714bf338a8ee3cf63e93ac67db1c45
2017-02-14 11:24:50 -06:00
Ed Sanders 6bd650d50a Check for 'veaction' when clicking section edit links
Such as in the 'add topic' link.

Bug: T157104
Change-Id: Ide2d4cf8c23a5d0db24456d15b4312f7c0a5f922
2017-02-08 17:48:04 +00:00
WMDE-Fisch a0af0b0529 Disable VisualEditor in the TwoColConflict extension
As for the Translate extension this will read a global set by the
TwoColConflict extension to disable the VisualEditor and its hooks
on the modified edit conflict page there.

Bug: T156251
Change-Id: I164d1546c9d98d8715650e13c63a01d06c76315d
2017-01-30 14:06:59 +01:00
Ed Sanders 1df022a6d6 Ignore section edit links when no action present
BUg: T156282
Change-Id: If3d039da36db946dcbba123d3cdc4e99c45f6a4e
2017-01-25 18:13:56 +00:00
Ed Sanders 171286c120 Fix typo in target config
Change-Id: I5815ce5b0e05ce166e02bfcced520e3770f5453d
2017-01-20 23:15:23 +00:00
Ed Sanders b7dd6077b8 Allow 'T-' prefixed sections, and redirect if section link title isn't current page
Bug: T153176
Change-Id: Ic6fda78d00715777df4a273e7d3e150f20185185
2017-01-04 16:53:03 +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 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
Alex Monk 96b8d35bff Wrap localStorage.getItem calls in try { ... } catch () {}
Bug: T153291
Change-Id: Ic4f8c390bfe6936bd182b28b1f2c6d19bf459eba
2016-12-15 23:08: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
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 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 5a8106773c Support section=new in NWE
Bug: T150709
Change-Id: I1002b97060d642df0988da15860a36c13712bade
2016-12-13 12:20:55 +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 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
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 ff4761bbd9 Fix handling of failure to load visual mode
Reject the activating deferred making handleLoadFailure
redundant.

Fix logic for switching back to OWE aware of NWE.

Change-Id: I328fc944bb6b9152752742fe35c56b95e3255b88
2016-11-15 12:44:38 +00:00
Ed Sanders b4ff55a38c Always set mode when activating the target
Otherwise if the target was already loaded the mode will
not be changed, which can cause the wrong editor to load
in multi edit tab mode.

Change-Id: I64071dfdfc8511cce51bda20b9c62d7fc126c528
2016-11-15 12:44:38 +00:00
jenkins-bot cf3c972a3a Merge "Move NWE URL changes into JS" 2016-11-12 00:02:50 +00:00
Alex Monk 807cb6b54e Move NWE URL changes into JS
Bug: T148077
Change-Id: Ic9b94184a48026254cf4a0a812fe6fc8455841b5
2016-11-11 18:31:22 +00:00
jenkins-bot 28787b0f3c Merge "Rename methods used for setting up multiple edit tabs" 2016-11-09 00:45:01 +00:00
jenkins-bot efb4133119 Merge "Use onEditTabClick handler in SingleEditTab" 2016-11-08 17:10:06 +00:00
Ed Sanders 55fcded32e Replace non-standard whitespace in comments
This is required to pass eslint:recommended.

Change-Id: If8c4876a366e5c021c414e54328ed1913b679969
2016-11-08 14:15:12 +00:00
Ed Sanders 2fa4cfef16 Rename methods used for setting up multiple edit tabs
Change-Id: I71d6dd0848e9cc3ee8531b0b914c29219b4697bd
2016-11-08 12:47:30 +00:00
Ed Sanders f6a205d77f Use onEditTabClick handler in SingleEditTab
Gives us extra functionality like  checking for
isUnmodifiedLeftClick which makes CTRL+click on SET
not change the current page, as expected.

Change-Id: Icb37d7383374ee63798443659a2bcb2f1545c8c5
2016-11-08 12:39:15 +00:00
Alex Monk 7c80976f5b Remove 'vesection' parameter
Just use the normal section parameter, haven't been able to figure out why VE
would need to be special about that.

Bug: T149958
Change-Id: I9338d0f1498fbb579fa8c340d6e7274c6d48155b
2016-11-05 02:08:13 +00:00
jenkins-bot b6d3dabfbf Merge "Add binding for when only tab is new wikitext editor" 2016-11-02 21:36:21 +00:00
jenkins-bot 65236ae67f Merge "Try to make client and server code to get last editor work the same" 2016-11-02 20:07:07 +00:00
Ed Sanders 3fb757c307 Add binding for when only tab is new wikitext editor
Bug: T149796
Change-Id: I675c5876fbb9ca8427983e9d4252cccda35775f9
2016-11-02 19:10:28 +00:00
Ed Sanders 7db58ab3d8 Fix binding of onEditTabClick to section links in SET
Bug: T149797
Change-Id: I0f753718ccddb9c2b68cdc82ff379bd59d7006ad
2016-11-02 15:50:30 +00:00