Alex Monk
4a288a5866
Try to make MW->VE switching failures break less things
...
* Try to hide loading bar on failure
* Don't set wgAction back to 'view' if we're dropping the user back to the
wikitext editor
Bug: T125580
Change-Id: I13058ae131a1dda3b172e78d9b143d70831c47f1
2016-02-11 02:39:06 +00:00
Ed Sanders
80124c88a6
Edit mode switch: Show popup next to VE switch button
...
Only show if the user came from VE.
Change-Id: Ic362ba534d135fca5516c8ba401f6b2a22886ff1
2016-02-10 01:36:32 +00:00
Alex Monk
8cc034b9af
Run VE->WTE modification checks regardless of how the user got into VE
...
I think this fixes a bug similar to the one described in the bug below.
Bug: T124708
Change-Id: I61558227315bec36b71dac281b8da311a3d6bb1a
2016-01-30 03:06:46 +00:00
Ed Sanders
0ed45dbf61
MWTable: use new sanitization method
...
This prevents tables from getting sanitized even on
VE to VE copy. Also by calling ClassAttributeNode sanitize
extra CSS classes are removed.
Bug: T97462
Bug: T125220
Depends-On: Ia3ce386b2a03bc227818b10423bca72c736c0656
Change-Id: Ifd91e00b40665b446bbdcdf8859d2bb641bc0e67
2016-01-29 10:29:19 -08:00
jenkins-bot
f78dd8ad72
Merge "MWWelcomeDialog: Let the user switch editors"
2016-01-27 00:20:10 +00:00
James D. Forrester
d8769edd01
MWWelcomeDialog: Let the user switch editors
...
Change-Id: If88942d866278f3012dae7972d464a3d2a6a4f82
2016-01-27 00:14:07 +00:00
James D. Forrester
2c76dc5b50
MWEditingTabDialog: Use 'small' size
...
Change-Id: Icb30d4fbea21653cf2fb6c782a4314be97a3e0a2
2016-01-26 14:51:55 -08:00
jenkins-bot
75b0a8de63
Merge "Don't try to load VE over the top of the wikitext editor we just switched to"
2016-01-26 17:01:24 +00:00
Alex Monk
589437a772
Don't try to load VE over the top of the wikitext editor we just switched to
...
(if we discarded changes)
Bug: T124316
Change-Id: Ic5e6ee8f4b6e75c3ae877021bcb29733b881e6d2
2016-01-26 16:49:50 +00:00
Alex Monk
d7183d7e64
Check user permissions for viewsource before loading VE on-load on action=edit/submit etc.
...
Clicking 'View source' should probably not cause VE to load
Bug: T124650
Change-Id: I236de38b0f90f1aaa5d04b57cb7759e5951baf2b
2016-01-26 16:47:26 +00:00
Alex Monk
bfa15c44a5
Check user preferences before loading VE on-load on action=edit/submit etc.
...
Bug: T124743
Change-Id: I2e8a19014464a2b7fb76de08676e7cb808e06956
2016-01-26 02:48:27 +00:00
jenkins-bot
d29524c8b3
Merge "When loading VE from action=edit/submit, replace the title shown"
2016-01-22 20:43:02 +00:00
Alex Monk
38180b5d4d
When loading VE from action=edit/submit, replace the title shown
...
Bug: T117643
Change-Id: Ice21389d02ea10adc668c5b0a64ba2b0b9cf5744
2016-01-22 20:27:01 +00:00
jenkins-bot
ee70cc5c44
Merge "Single Edit Tab: simplify logic; make 'prefer-wt' just disabled"
2016-01-18 21:28:26 +00:00
James D. Forrester
aa08d34318
Single Edit Tab: simplify logic; make 'prefer-wt' just disabled
...
Change-Id: I090375933656f29636c355c4d2ce358dd7f7f074
2016-01-18 11:23:59 -08:00
James D. Forrester
68ea08cd5e
Drop support for adding prefix/appendix labels to edit tabs/links
...
Depends-On: I264599a1c4f60b37a46d49c808cf271ba0a8f882
Change-Id: Icebc378f5c00aac57ad361f8ba85da93b8178650
2016-01-18 03:06:33 +00:00
James D. Forrester
ada58df361
build: Bump file copyright notices for 2016
...
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
2016-01-03 14:57:25 -08:00
James D. Forrester
4a781a3a16
EditingTabDialog: Shorten the copy to make snappier, drop 'Edit' tab name
...
Change-Id: Idd5f373d9fef364318efddcc98ea2de5e91860a8
2016-01-03 13:44:54 -08:00
Alex Monk
85bb085418
DesktopArticleTarget: Preserve oldid when switching from WTE into VE
...
Change-Id: I8682a2a2b90ae2e42f1a8e01e16d0f9f3d66a2d5
2016-01-03 10:59:21 -08:00
jenkins-bot
26e3c0ad1d
Merge "Preserve oldid when switching from VE into WTE"
2016-01-03 06:35:58 +00:00
jenkins-bot
3231220774
Merge "SET: Don't try to do any client-side section link magic if we're not supposed to."
2015-12-23 23:18:57 +00:00
Alex Monk
76cb69ecec
SET: Don't try to do any client-side section link magic if we're not supposed to.
...
Ugh.
Bug: T121599
Change-Id: I47a93d5dbedc5ae989a2973fb793ac99edfb139a
2015-12-23 22:10:20 +00:00
Ed Sanders
2afd7c903d
DesktopArticleTarget: Improve teardown sequence
...
* Ensure activating classes are removed by rejecting activatedDeferred
as soon as teardown starts.
* Try to teardown surfaces is surfaces exist, not just if the target is active.
* Remove noop teardownDebugBar. The debugbar lives inside the surface now.
* Ensure progress bar is always reset, even if target setup is aborted.
Bug: T99139
Change-Id: I16a071c0d4bc8bbc6af2e03e63ee0ffc18d55c75
2015-12-23 12:13:50 +00:00
Alex Monk
c10236cc58
Preserve oldid when switching from VE into WTE
...
Bug: T120898
Change-Id: I51774fd7ca5be7373d8aec55cb420a874bc7d531
2015-12-18 00:47:03 +00:00
jenkins-bot
607878e2ba
Merge "MWTarget: Only add ve-init-mw-target-surface to the main target surface"
2015-12-16 20:06:33 +00:00
Ed Sanders
a689caa762
MWTarget: Only add ve-init-mw-target-surface to the main target surface
...
Avoid adding it to TargetWidget surfaces.
Bug: T121450
Change-Id: I7c43b07c5bade3a778ad423e39b25616e03aa888
2015-12-16 14:36:06 +00:00
Alex Monk
c99a5b627e
DesktopArticleTarget: Change tab text on server side when possible
...
Usually. Unless you load VE, because then you might be loading on
`action=edit` in remember-last mode and therefore the tab text needs to
be updated from "Edit source" to "Edit". Or "Create source" to "Create".
Or the equivalent with 'local description' in the case of pages from
foreign file repos, etc.
Bug: T120970
Change-Id: I8f07be6c8e415b40ad134ee82d0bda1d63cc4f96
2015-12-15 10:49:45 -08:00
Alex Monk
76a12f2f9b
Try to actually resolve visualeditor-editor preference setting when switching editors
...
Seems we need to make sure this returns before navigating to the target page.
This reverts commit 40807a0743
.
Bug: T121122
Change-Id: I4edf03bc0d57b03897d9f1802eabd8f0dd9962b9
2015-12-15 17:35:22 +00:00
jenkins-bot
b08c8bd682
Merge "Fix up "Simplify some SET logic""
2015-12-15 02:56:45 +00:00
Alex Monk
39af893c75
Fix up "Simplify some SET logic"
...
By 'simplifying', I broke stuff.
This reverts commit b7227f96fe
.
Change-Id: I46fdcf336f556680fa72df0893447b6850cc4b1d
2015-12-15 02:50:15 +00:00
jenkins-bot
d3d851f394
Merge "Simplify some SET logic"
2015-12-14 21:17:15 +00:00
Alex Monk
b7227f96fe
Simplify some SET logic
...
Change-Id: Ie89260607f0253dd7d749af7426702985a0340f4
2015-12-14 21:11:15 +00:00
jenkins-bot
33cbf199f1
Merge "Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set""
2015-12-14 20:53:28 +00:00
Jforrester
40807a0743
Revert "DesktopArticleTarget: Don't abort in SET mode if veswitched is set"
...
This reverts commit 5b083a7272
.
Change-Id: Ieac905b80ea219075b4de498d645f22c3e86c5ca
2015-12-14 20:46:08 +00:00
jenkins-bot
d750417545
Merge "Take pageCanLoadVE into account when figuring out whether VE will load in-page or not"
2015-12-14 17:14:41 +00:00
jenkins-bot
04d8089db6
Merge "Fix setEditorPreference call"
2015-12-14 17:08:42 +00:00
Alex Monk
774034b553
Take pageCanLoadVE into account when figuring out whether VE will load in-page or not
...
Bug: T121342
Change-Id: I84ade6e2ab062597fbfd859a90a864c7607547da
2015-12-14 16:58:26 +00:00
Alex Monk
a3148a1559
Fix setEditorPreference call
...
Added brokenly in I82e39752
Bug: T121343
Change-Id: Ie7b228e94458b17d6ec7c23be264144dec9563be
2015-12-14 16:49:28 +00:00
James D. Forrester
5b083a7272
DesktopArticleTarget: Don't abort in SET mode if veswitched is set
...
Bug: T121122
Change-Id: I6dca85361be0c1c1c0d39b12b167af813706ae0b
2015-12-11 18:15:25 -08:00
James D. Forrester
2368171fb7
DesktopArticleTarget: Consolidate editor preference setting code
...
Change-Id: I82e3975233eee0473b513d0931a2d6770fc0f86d
2015-12-11 17:12:28 -08:00
Alex Monk
0774bdf924
Try to clean up the WT->VE prompt opened -> closing -> closed data callbacks
...
To use
.then( function ( opened ) { return opened; } )
.then( function ( closing ) { return closing; } )
.then( function ( data ) {
etc. instead of nesting them in .done functions
Change-Id: Ic8cee9639b90cb378ce0b7e58dc04eab0ff4cbc7
2015-12-11 23:43:13 +00:00
Alex Monk
155d0240a4
Remember switching into VE from WT when discarding changes
...
Bug: T120966
Change-Id: I9a7b87cb2561416b72f53afa5140e9d2a4330cfe
2015-12-11 23:35:59 +00:00
Alex Monk
9e5a01aa6b
Check that we really want VE before loading it for section edits
...
Bug: T121189
Change-Id: I34371bf78d34e9d362e9cf5c64bdd108478969b9
2015-12-11 23:19:07 +00:00
jenkins-bot
e24e2ed7cf
Merge "[BREAKING CHANGE] Create ve.init.mw.Target base class"
2015-12-11 18:16:22 +00:00
Ed Sanders
fbb05fb8ed
Use upstreamed actionGroups functionality
...
Depends on I272175dff3 in ve core.
Change-Id: I94cef0f3d8c1b903780890934c2c4963cbe05989
2015-12-11 16:43:48 +00:00
Ed Sanders
21d5856000
[BREAKING CHANGE] Create ve.init.mw.Target base class
...
Move over logic which isn't specific to the article
implementation of VE (e.g. nothing related to loading/saving).
Refactors setupSurface to use an abstract tracking method (which
does nothing by default), and moves surface CSS classes to #createSurface.
Breaking change:
* Rename onSurfaceReady to surfaceReady. We shouldn't need to listen
to our own events.
* Rename onReady to documentReady. onReady is not a listener.
Bug: T97166
Change-Id: I7242b1bb5501b7755a18a13d13e166c30cac9cdd
2015-12-11 16:41:47 +00:00
Ed Sanders
672c91f41b
DesktopArticleTarget: Fix signature of editNotices
...
Also ensure it is always an array.
Change-Id: I8498463d3131817b90fa91404289c839110bdeaa
2015-12-11 16:41:47 +00:00
Alex Monk
98a456b189
Single edit tab: Fall back to the wikitext editor when certain parameters show up
...
We can't handle these yet. There's also 'preview' but I think we probably
qualify as supporting that.
Bug: T121126
Change-Id: I4602992a77f460b9bfcbad0eac1bdd79d67df04d
2015-12-10 23:13:25 +00:00
Ed Sanders
29f33a57d5
Rename mw.Target to mw.ArticleTarget
...
This makes way for a base mw.Target class which is
not specific to articles (e.g. Flow boards).
Bug: T97166
Change-Id: If72650bdf87aa9f195b004da0a4d815f1a8063a3
2015-12-10 16:26:20 +00:00
Alex Monk
128901866a
Don't check editor preferences etc. if user wants veaction=edit
...
Bug: T120978
Change-Id: I39e28c80440260959b7f1c25b82a057c21de43be
2015-12-09 23:04:02 +00:00