Commit graph

1669 commits

Author SHA1 Message Date
jenkins-bot 7f14f854c4 Merge "ve.init.mw.DesktopArticleTarget: Remove some hacks" 2017-06-26 20:27:09 +00:00
jenkins-bot ba3a5d85bd Merge "Show visual diffs on DiffPage" 2017-06-25 03:30:29 +00:00
Ed Sanders fd1adfb3b5 Keep TOC in correct place in document
Change-Id: I6ad8cd8cbd7ef902204408673eb096b7405abd24
2017-06-22 15:16:15 -07:00
Ed Sanders 11e6e25ac6 Clear all diff state when switching editors
Bug: T168618
Change-Id: I19ff5054b87568546bfe1202d67c5d863e1549be
2017-06-22 10:54:04 -07:00
jenkins-bot 7cd5a5d61f Merge "Add newline to end of wikitext documents" 2017-06-21 01:10:57 +00:00
Ed Sanders 09519a24d2 Add newline to end of wikitext documents
Bug: T156609
Change-Id: I80d82ad87464b1c6e0344b29123bb96fcc4cffad
2017-06-20 17:51:51 -07:00
jenkins-bot 115f8e7ae5 Merge "Move preview document filtering into MWSaveDialog" 2017-06-21 00:41:26 +00:00
jenkins-bot fc4e836d4b Merge "Fix getWikitextFragment shortcut to return a promise" 2017-06-21 00:40:46 +00:00
Ed Sanders 9dd638a5ab Move preview document filtering into MWSaveDialog
Also:
* Make mw-content-DIR nest inside mw-body-content
* Use ve.filterMetaElements

Change-Id: Ic70c7dff0f74b81f92b8bd48e8092549947990ba
Depends-On: I478fe1f39164b9fd7e71987b818b8f668d1a7020
2017-06-20 23:50:44 +00:00
Ed Sanders e1b4321b5a Return nothing from styleParsoidElements
The method modifies DOM elements in place, and the return
value is never used.

Change-Id: I6254389dbf8daa67795206cb508038b60e1a4761
2017-06-20 21:03:22 +00:00
Ed Sanders 585cf5f990 Fix getWikitextFragment shortcut to return a promise
Change-Id: Ide5c920332ba9dd0777a7c63e27ebbbc9a391172
2017-06-17 19:42:24 -07:00
Ed Sanders 0e6d8d5fff Show visual diffs on DiffPage
Only shown if VisualEditorEnableDiffPage is set, or query
string param 'visualdiff' is present.

Currently:
* All VE javascript is loaded (could be cut down to just DM code)
* The entire Parsoid HTML of both revisions being compared is loaded
* Both Parsoid HTML docs are parsed into VE DM trees and diffed

Bug: T167508
Change-Id: I151fc9bab3d3032f50c8d11be6b54e45a06fcc34
2017-06-16 19:29:19 +01:00
Bartosz Dziewoński 9dcf6dcddc ve.init.mw.DesktopArticleTarget: Remove some hacks
No longer needed after I2ede6c88be569224c0b2a4e388a133ad98b86a7b
in VisualEditor core.

* 'transform: none' from 049a32c60a
  (that change does not describe what the issue was, but clearly
  it wasn't a complete fix and I see no problems without it).
* 'z-index: 4' from 6fff13b898 (I can't
  reproduce the issue there after removing it).

Bug: T167616
Change-Id: I7e0d603af2668269e5587eaa5e4761166a1b4097
2017-06-14 22:25:25 +02:00
Ed Sanders 75d583a0d9 Use static parseDocument method
Change-Id: I545a58ffcbf1c7c57c197f4858958de835a40394
Depends-On: I5b36e187a5e8bb68b47b2fccf5b46c08b81b01d9
2017-06-08 14:43:09 +01:00
Ed Sanders f178061117 [DEPRECATING CHANGE] Make Target#createModelFromDom static
Change-Id: I019689f87ac0f7f40a8a7600029b5ce1bc92e77f
2017-06-08 14:35:31 +01:00
Ed Sanders 4484f5c316 Don't try to i18n-parse JSON string
Bug: T167051
Change-Id: Idf07ba51d2681f0f5d275f2a732d77cd85e63d03
2017-06-06 11:12:41 +01:00
Bartosz Dziewoński 4f55d8066e Update for deprecation of OOjs UI openWindow/closeWindow promise
Bug: T166729
Change-Id: I95b85a8c0d488993c11da74e1d856fef6cf0ebb4
2017-06-02 00:21:58 +02:00
Timo Tijhof a9ce695f75 mw.DesktopArticleTarget: Use require() for mw.page.watch
Add 'require' to eslint global whitelist for this extension,
since ResourceLoader provides this in all contexts now.

Bug: T166254
Depends-On: I0e6a95bd4fbaba06eae5137ac7af84f62bebf6f0
Change-Id: I6b2fe57317dcff18ec6d9ea0cd9e4eb9c894c169
2017-05-24 21:17:02 +00:00
Ed Sanders 1a577b668d Move getWikitextFragment up to Target from ArticleTarget
Any MW target may want to get a wikitext fragment, not just
ArticleTargets. Requires us to move refreshEditToken up as well.

Change-Id: I27d30e20fefd5ba266d3d8e5f99383e9b4d4993a
2017-05-21 07:57:49 +00:00
jenkins-bot 526d1ba71e Merge "Enable edit tab setup on appropriate Special pages" 2017-05-18 16:18:49 +00:00
Bartosz Dziewoński d687e01208 Do not check for visual editor availability when loading source editor
Follow-up to fefb76eebc. Prior to that
change, the condition for this looked like this:

  // … if on a ?veaction=edit/editsource page
  (
    isViewPage &&
    uri.query.veaction in editModes &&
    (
      uri.query.veaction === 'editsource' ||
      init.isVisualAvailable
    )
  )

In the refactor, the `uri.query.veaction === 'editsource'` check was
lost.

Since that code is pretty messy (probably predating the source editor
and hastily adjusted), instead change the check for `isVisualAvailable`
to just `isAvailable`. If the requested mode turns out to not be
available later, the editor will not load.

Bug: T165146
Change-Id: Idfaf9115dd20cec8f8e044a704b93b07984cdcee
2017-05-16 18:57:56 +02:00
Ed Sanders 63c36c87da Always prefer wikitext for action=edit on non-SET wikis
Ideally we could use the preferred editor, but this breaks
tab switching to the old editor.

Bug: T165238
Change-Id: I5f5ee5566cdd2080ba7c89d43cf127b457537768
2017-05-15 12:48:30 +01:00
Ed Sanders 9342e45f7b Fix action=edit links for NWE
We added support loading NWE from action=edit in I35208cce069
but missed this check in the front-end.

Bug: T165238
Change-Id: I2732eaa81a3f968b34c4e878b2ad36de981dd567
2017-05-15 11:52:06 +01:00
James D. Forrester 57aad56a7b Enable edit tab setup on appropriate Special pages
Using the forthcoming wgRelevantPageIsProbablyEditable.

Bug: T165010
Depends-On: I6c6ca1cfd93e7be917952980f1e1d57aec3a1292
Change-Id: I6c6ca1cfd93e7be917952980f1e1d57aec3a1229
2017-05-15 11:14:29 +01:00
Ed Sanders debcd678b5 Generate visual diff only after switching to visual diff tab
Bug: T164724
Change-Id: I48e49d4b68cc769b3e9d061983de4c78b5ad5c34
2017-05-09 10:09:39 +00:00
Ed Sanders 54fc920622 Captcha improvements
* Fix focus and resize/scroll into view after the
  captcha has loaded (so after the image has loaded
  for FancyCaptch).
* Add margin between input and captcha
* Enable enter-to-submit on captch input field.
* Unify code for simple/math/questy and correctly
  render math as HTML (by looking at the mime type)

Change-Id: I10433cefbfea8569674c120dde5b489570e20966
2017-05-02 17:49:12 +01:00
Ed Sanders 998ae22b2d Follow-up I488fd7e74: Adjust saveFail calls for new function signature
Bug: T164157
Change-Id: I41b946af5a8b80211b0672d7012835f2c9e1dc2b
2017-05-02 16:39:04 +01:00
jenkins-bot 68d00a6a42 Merge "init: Fix checks for required skin elements to avoid false positives" 2017-05-01 22:37:16 +00:00
Bartosz Dziewoński a02e68374e init: Fix checks for required skin elements to avoid false positives
* Do not try to load the editor on protected pages, or if the user
  doesn't have permission to edit pages.
* Move the check for required DOM elements after the check for
  pages without the editor (T162411) and after DOM ready (T163307).

Bug: T162411
Bug: T163307
Change-Id: I8149694ba8155682701f2cda6ca212d60f446caa
2017-05-01 11:24:01 +00:00
Ed Sanders 7c0fc8d3b9 Fix minor lint errors and typos
* Commas that should be semicolons
* Unnecessary 'call's

Change-Id: I11a80702b5396a36e3deecc6e706a397cc354bd8
2017-04-29 12:36:17 +01:00
Ed Sanders cd8b059e7d Synchronise VE availability checks in frontend and backend
Adds better support for NWE loading on action=edit.

Change-Id: I35208cce0696607377378a1b58d426e914a3ba7d
2017-04-28 17:45:27 +01:00
Ed Sanders fefb76eebc Rewrite logic for choosing initial editor
Expanding from a single if-expression lets us make the
code much more readable, and reveals some minor bugs.

Change-Id: I49e57bfc093e019c837a73eab5c25fdbd14de0af
2017-04-26 12:07:51 -07:00
jenkins-bot a93888afd5 Merge "EditModeTool: Use state-describing, not action-describing labels" 2017-04-26 18:42:42 +00:00
Ed Sanders d1017bfd48 EditModeTool: Use state-describing, not action-describing labels
Follows-up 914eb1cde3; reverts the logic to have the label change, but
sticks with new "-current" i18n messages, so the "X editing" instead of
"Switch to X editing"; the old i18n messages are now dropped entirely.

Bug: T162864
Change-Id: Icdad6c5bb06ff86e9b8976840bb1a94b939609a8
2017-04-26 11:33:14 -07:00
David Lynch e1e89e8b14 DesktopArticleTarget: only destroy notices tool if it exists
Bug: T163813
Change-Id: Ib957eac2d3d407f8e683082938ec51d882c2d041
2017-04-26 18:03:39 +00:00
jenkins-bot b268b4f80f Merge "ve.init.mw.ArticleTarget: Only retry once after a 'badtoken' error" 2017-04-24 19:48:35 +00:00
jenkins-bot 67d6ac38e6 Merge "Show a different label for the current mode in the editor mode selector" 2017-04-21 15:56:04 +00:00
jenkins-bot 1862f74f11 Merge "ve.init.mw.ArticleTarget: Use a simpler error message when site is read-only" 2017-04-20 22:34:33 +00:00
Bartosz Dziewoński 371ac353cf ve.init.mw.ArticleTarget: Use a simpler error message when site is read-only
Sites like to customize 'readonlywarning' with things that we can't parse.
Instead, use 'apierror-readonly'. The old message is still shown in edit
notices.

Bug: T163455
Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
2017-04-21 00:08:57 +02:00
jenkins-bot dd6113bb76 Merge "Load notices when switching, just don't show them" 2017-04-20 21:05:40 +00:00
Bartosz Dziewoński 91a75e3fef ve.init.mw.ArticleTarget: Only retry once after a 'badtoken' error
If we retry and get another 'badtoken' error, something is very wrong,
and trying again and again is probably pointless. This behavior also
matches how mw.Api#postWithToken handles bad tokens.

Bug: T163493
Change-Id: I488fd7e74e37922044491695d6c9025a45531281
2017-04-20 22:42:10 +02:00
Ed Sanders c02c529537 Load notices when switching, just don't show them
Previously we completely disabled the loading of notices
when switching, instead of just not showing them (so they
don't clash with the "switched" popup).

Bug: T162812
Change-Id: I3f8e787630e196cee1dbb1aa449b3558b74fcd04
2017-04-20 21:20:10 +01:00
James D. Forrester 914eb1cde3 Show a different label for the current mode in the editor mode selector
Bug: T162864
Change-Id: I2242f85f8c4607411e65b64c8e43181bb139945f
2017-04-20 13:00:34 -07:00
James D. Forrester bef15b7a1e Update VE core submodule to master (bfb35aaef)
New changes:
57f8064b6 tests: Enforce dm unit test coverage at 20% per file and 80% globally
6f757c670 LinkAnnotation: add a getFragment method for consistency with MWInternalLinkAnnotation
c40a3f152 Drop the classList polyfill for IE9
d1af6c6bb Update OOjs UI to v0.21.1
bfb35aaef Localisation updates from https://translatewiki.net.

Bug: T162277
Change-Id: I5146bc421bb88e56bafadccefc7bbdee106504ea
2017-04-20 09:48:46 -07:00
Esanders eeab63d2c7 Revert "Dropping IE9: Remove disableUneditableContent from DesktopArticleTarget"
IE10 also lacks pointer events support.

This reverts commit 5266776953.

Change-Id: I42c9530c45ad98657b403bdb266188368085716b
2017-04-14 13:53:56 +00:00
James D. Forrester d989de5c09 DesktopArticleTarget.init: Don't call setEditorPreference twice
This is run after the targetPromise completes (via the platform-agnostic
setDefaultMode proxy), which is the correct time to do so. We should not
do this twice, and we definitely shouldn't do this before the target has
successfully loaded, lest a user ends up with us setting their option to
"prefer" an editor that they actually can't load. Whoops.

Bug: T156316
Change-Id: Icf4b5ddd9c8265ade55f43328f807344b41db350
2017-04-13 04:38:07 +00:00
David Lynch d5ac18a466 LinkCache: don't treat a link with a fragment as a selflink
This matches the rendered output for the page.

Bug: T162669
Change-Id: I1ea0ab37a2751c0b4669da8a23adf0ce271facea
2017-04-11 12:19:01 -05:00
Ed Sanders a6b4258f47 ArticleTarget: Refactor savedialog/target interaction
* Pass a wikitext promise, instead of wikitext
* Handle writing of content to the dialog from within
  the dialog.
* Handle diff errors within the dialog.
* Never disable the 'Return to save form' (approve) button
* Remove redundant messages

Change-Id: Ibd76e8951998f751abfb4f407682202c2f73ac7e
2017-04-10 10:29:41 -07:00
jenkins-bot 4110bdfd26 Merge "VisualDiff: Fetch original doc from Parsoid if fromEditedState" 2017-04-10 17:09:46 +00:00
jenkins-bot 77987b976d Merge "Remove #wpTextbox1 fallback from ArticleTargetLoader#requestPageData" 2017-04-10 17:05:03 +00:00
jenkins-bot edb911ef71 Merge "Dropping IE9: Remove disableUneditableContent from DesktopArticleTarget" 2017-04-10 16:50:59 +00:00
jenkins-bot 40265bd807 Merge "stylelint: Drop no-unsupported-browser-features references" 2017-04-10 16:49:15 +00:00
jenkins-bot c0361ab40e Merge "Update VE core submodule to master (da9c49395)" 2017-04-10 16:49:13 +00:00
Ed Sanders 5266776953 Dropping IE9: Remove disableUneditableContent from DesktopArticleTarget
Bug: T162277
Change-Id: Ibb38284573078098c2173232239e9836a8161f56
2017-04-10 08:37:03 -07:00
James D. Forrester f51a6d5020 stylelint: Drop no-unsupported-browser-features references
The rule hasn't been applied for a while, as it was deprecated upstream.

Change-Id: I7877d0e3bdcd05a609d61add2dc62d7598e348cb
2017-04-10 08:36:37 -07:00
James D. Forrester d1c24ce226 Update VE core submodule to master (da9c49395)
New changes:
dc0cad28c tests: Factor out ve.dm.TestRebaseClient/Server into their own files
98061108b Convert RebaseServer tests to data provider
3e746a51b Update OOjs to v2.0.0
16231a812 [BREAKING CHANGE] Drop support for Internet Explorer 9
64daeb4b5 Localisation updates from https://translatewiki.net.
3310e876c Update DOMPurify to 0.8.5
579033a83 Follow-up 16231a81: Drop IE9 support in createDocumentFromHtmlUsingIframe

Bug: T162277
Change-Id: If17c6a3fac0920db29f80069f344ffd6be46c3c9
2017-04-10 08:32:51 -07:00
Ed Sanders 939a1f4005 VisualDiff: Fetch original doc from Parsoid if fromEditedState
Bug: T160741
Change-Id: Ied0641cc868a8dd4cf540eba75e1b248277a96b0
2017-04-09 22:28:53 +01:00
Ed Sanders ddf6a89c72 Remove #wpTextbox1 fallback from ArticleTargetLoader#requestPageData
Makes the API clearer and the method re-usable.

Change-Id: If79afb262e0c8c8e2193c07fef6bb0712496a4d9
2017-04-09 22:28:03 +01:00
Ed Sanders 97f6bdd79a Make Target#getVisualDiff async
This will be required later when we have to fetch the original
document from the server before running a visual diff.

Change-Id: I351688f4d1fec892bc297f40c209939cbb2ccf95
2017-04-09 13:26:22 +01:00
Ed Sanders 981dd6c250 Don't set oldid if it is equal to curId
Change-Id: I0fff55ab1e8d9c5c24b39526aa5d8a893cd99a2a
2017-04-07 11:49:30 +01:00
Roan Kattouw 1e7e9044c9 MWVESwitchPopup: Follow-up 445f8b76a0: apply adjustment to anchor instead
Otherwise the anchor isn't correctly aligned below the icon.

Change-Id: I73a9db9be63354f1fa459e844eb40be1d3130189
2017-04-06 16:33:53 -07:00
Roan Kattouw 445f8b76a0 MWVESwitchPopupWidget: Fix alignment by removing margin
Since the PopupWidget rewrite, margins for aligning popup anchors
should be set on the anchor itself, not on the popup.

Change-Id: If8237ae5edbc2e8c5cb99147f392aae52e642765
2017-04-06 11:50:43 -07:00
jenkins-bot d4438549e5 Merge "ArticleTarget: building summary in source mode, strip links from section titles" 2017-04-05 23:57:18 +00:00
Bartosz Dziewoński c45ad46433 Allow loading progress bar to appear on skins other than Vector and MonoBook
The styles are not specific to the Vector and MonoBook skins, but rather
to the MediaWiki and Apex themes of OOjs UI. Rename them to reflect that.

Change-Id: I757e8d96625feb8290cbf7837b5d801961cda344
2017-04-05 20:13:28 +02:00
David Lynch 758b2fd689 ArticleTarget: building summary in source mode, strip links from section titles
Bug: T162017
Change-Id: I76e96d1e36f7bad0b3e17d8bb842c6ad1172f8cc
2017-04-05 11:16:11 -05:00
James D. Forrester 8463524e18 MWSaveDialog: Run links through a render function for preview & visual diff
Provide a utility funcition in ve.init.mw.LinkCache to do this.

Also use this in ve.ce.MWTransclusionNode/ve.ui.MWPreviewElement, and
introduce to ve.ce.MWExtenionNode

Bug: T73900
Bug: T153535
Change-Id: Ieb9a0274b8c5ae1932c431546f09d18000fa6dd9
2017-03-31 10:51:35 +01:00
jenkins-bot 9e69bd360f Merge "WikEditor switch widget: Fix styling regression since OOui 0.20.1" 2017-03-30 21:31:37 +00:00
Ed Sanders 1b1b95acd4 WikEditor switch widget: Fix styling regression since OOui 0.20.1
Change-Id: I489e45a587e2c10cfb60ade2b5f180f872495324
2017-03-30 22:18:54 +01:00
Ed Sanders 003800f75a Follow-up I88d45aad2: Fix selflink detection
data.title is not set in the cache, use the query title
instead.

Bug: T52497
Change-Id: I6a3047d3c18110052c70277781bc7be6ead2e7b4
2017-03-30 11:56:13 +01:00
jenkins-bot 1dc16af006 Merge "Render self-links as if they were <strong>s" 2017-03-30 09:17:00 +00:00
James D. Forrester cb875a6ccc Render self-links as if they were <strong>s
This is a little inelegant, but it works in both CE and transclusion
content.

Bug: T52497
Depends-On: If058843924c3b30c116df2520aef93a004d98a5d
Change-Id: I88d45aad2aaa45e71b433350986b19764603a1f2
2017-03-29 23:47:01 +00:00
jenkins-bot da05545faf Merge "Replace $wgVisualEditorSupportedSkins with a check for required elements" 2017-03-29 23:14:53 +00:00
Ed Sanders 6d891dc049 Pass section when resolving conflicts in NWE
Bug: T154217
Change-Id: I61f69df228fcbe25840b166a2081cacdb0417431
2017-03-29 22:21:17 +01:00
Bartosz Dziewoński ae8b0a1f36 Replace $wgVisualEditorSupportedSkins with a check for required elements
The bare minimum of elements that must be present on the page for
VisualEditor to start and mostly work is:

* '#content' to attach our interface (toolbar etc.)
* '#mw-content-text' to replace with the editing surface
* '#ca-edit' to start up the editor

When those elements are missing (and we expect them to be present,
e.g. we're not on a special page), we print a console warning.

For example, VisualEditor now launches on Timeless and CologneBlue.
It does not launch and prints a warning on Modern and Erudite.
(It is actually possible to edit and save pages on CologneBlue,
although various pieces of the interface look funny.)

This does not change which skins we claim to support: these are still
currently only Vector, MonoBook and Apex. But it allows third-party
skin developers to more easily test the editor and fiddle with their
CSS to make it look right.

Bug: T161373
Change-Id: I97c786f3c8c795c238b10bef332a129ea26f86c2
2017-03-29 18:13:05 +00:00
jenkins-bot 11f562c4e2 Merge "Don't use '#content #firstHeading', unnecessarily specific" 2017-03-29 18:02:22 +00:00
Bartosz Dziewoński 645eb8e543 Don't use '#content #firstHeading', unnecessarily specific
Simply '#firstHeading' does fine.

Change-Id: I7c72496f0d58b86582bd33c018b618e1b75f2c7a
2017-03-29 17:37:29 +00:00
Bartosz Dziewoński 38db8bbe0e Consistently use #catlinks to refer to category links container
The element has both the class and the id set to 'catlinks'. This is
just for consistency, I have no preference on which to use.

Change-Id: Ic96b0f21fe790d0aa03bfd6366ba246e8493a038
2017-03-29 17:36:58 +00:00
jenkins-bot 16918a08cf Merge "ve.init.mw.ArticleTarget: Don't construct element IDs dynamically" 2017-03-28 17:23:11 +00:00
Bartosz Dziewoński 6a9f8a1417 ve.init.mw.ArticleTarget: Don't construct element IDs dynamically
Easier to find the usages this way.

Change-Id: I38ce1389af1d30ff1f5e0214b68d094a67da046f
2017-03-28 19:01:46 +02:00
jenkins-bot d3df69ee99 Merge "ve.init.mw.DesktopArticleTarget: Refactor redirect interface handling" 2017-03-28 16:41:40 +00:00
jenkins-bot 3d9b2fbd8a Merge "DesktopArticleTarget: Make the waiting module list extensible" 2017-03-28 15:59:02 +00:00
jenkins-bot 0dfe429a1e Merge "ve.init.mw.DesktopArticleTarget: Hide redirect subtitle if we cancel editing" 2017-03-28 15:43:09 +00:00
Bartosz Dziewoński 0462b6ed8f ve.init.mw.DesktopArticleTarget: Refactor redirect interface handling
Redirect pages have two extra things not present on normal pages:
* Redirect subtitle: the "Redirect page" shown under the page heading.
* Redirect page content header: the "↳ Foo" at the beginning of content.

Our handling was pretty messy and had some bugs (T161614).

Notable behavior changes:
* Update 'wgIsRedirect' in mw.config after saving the page.
* Use #mw-content-text rather than .mw-jump for inserting the fake .redirectMsg.
  .mw-jump is not guaranteed to exist on the page (it's a skin feature).
* Never replace the real .redirectMsg existing on the page, except by the
  new HTML after a page is saved. Our fake is separate now.

Bug: T161614
Change-Id: I96a5e45a71bf10bf6a2b501dc0cf81e6c37060ec
2017-03-28 17:40:23 +02:00
Bartosz Dziewoński d905d705ce ve.init.mw.DesktopArticleTarget: Hide redirect subtitle if we cancel editing
To reproduce: start editing a page, turn it into a redirect,
cancel editing and go back to view mode. The "Redirect page"
subtitle under the page title should disappear.

Note that #redirectsub is correctly spelled all lowercase,
unlike #contentSub.

This reverts commit 0e1bc7309b
and fixes the code instead.

Change-Id: Ibacd73122dfec63268a77794bc77c4b88876d3ee
2017-03-28 01:31:29 +00:00
jenkins-bot 57d57cdbbf Merge "ve.init.mw.DesktopArticleTarget: Remove unused code" 2017-03-28 00:50:50 +00:00
Bartosz Dziewoński 0e1bc7309b ve.init.mw.DesktopArticleTarget: Remove unused code
As it happens, #redirectsub is correctly spelled all lowercase,
unlike #contentSub. This line does nothing. We remove #redirectsub
correctly elsewhere; I don't think this was ever meant to be here.

Follows-up 96421b283c.

Change-Id: I3e4c6eb2ff94f363b488477b3ddd248e571e723a
2017-03-28 00:39:38 +00:00
Ed Sanders b756199dc7 Use ve.targetLinksToNewWindow
Depends-On: I3088e8b95d9032b8e8fd5bff58a8b97ffaa15f98
Change-Id: I07ec10841b62ed1e8c3b3cf82b42653327618cb0
2017-03-24 21:34:47 +00:00
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
jenkins-bot 21ec4e87a9 Merge "Section editing: strip links from heading text used for edit summary" 2017-03-23 18:45:07 +00:00
jenkins-bot 0869a70cfa Merge "Fix typo in surfaceReady documentation" 2017-03-23 18:09:40 +00:00
Ed Sanders ae780f43ed Fix typo in surfaceReady documentation
Change-Id: I4ae5552000eb6dc160acc4fd2e2b218bf2c7411f
2017-03-22 20:35:42 +00:00
David Lynch 1dc18b6703 Section editing: strip links from heading text used for edit summary
Stops us including "[edit]" in the summary when people have marked whole
headings for translation.

Bug: T160911
Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
2017-03-22 02:00:24 -05:00
Ed Sanders 1adedfbd8b Disable clickable categories bar in wikitext mode
Bug: T160733
Change-Id: I79b7c880e63675a322b2ada053819b36a175ccbe
2017-03-20 11:07:52 +00:00
David Lynch 217640624a DesktopArticleTarget: Make the waiting module list extensible
So that GlobalCssJs and other extensions can hook in.

Bug: T156899
Change-Id: I045c7b045ce28047298b28a05e77ef27749c1ee1
2017-03-16 17:48:03 -07:00
jenkins-bot 0ae808913c Merge "Introduce visual differ in the save dialog" 2017-03-16 21:28:41 +00:00
jenkins-bot 85736d5a7b Merge "Follow-up eb8ba26a: Make MWNoticesTool#setNotices() display its own popup" 2017-03-16 20:14:05 +00:00
Ed Sanders 12c73bc01f Update VE core submodule to master (ef5dc965f)
New changes:
4b94f212e Add tool to change directionality of document view

Bug: T153356
Depends-On: I1e3d89e8250b75d0b6992cf4664e84de66d99bc0
Change-Id: Ic832cc661a0899b1668eb650fb09b66ada54d1ef
2017-03-16 12:42:42 -07:00
James D. Forrester ec5590418e Follow-up eb8ba26a: Make MWNoticesTool#setNotices() display its own popup
Running setNotices( [] ) makes MWNoticesTool run this.destroy() to avoid taking
up extra space in the toolbar when not needed.

Also, make setNotices() bail earlier.

Change-Id: I492fd59a1e15e8f296bf7f03d9b0035c40dafa59
2017-03-16 11:29:34 -07:00
David Lynch eb8ba26adf DesktopArticleTarget: Only try to show notices if some exist
This avoids an OOui deprecation warning for trying to toggle a popup which
isn't connected to anything.

Bug: T160161
Change-Id: I9ad97785f0de4ecf81d189985459689644e25923
2017-03-16 11:35:10 -05:00
Ed Sanders 335b56728a Introduce visual differ in the save dialog
Bug: T143350
Change-Id: I1297d0f4bb87e69be3b50220c1830a22dac1bbae
2017-03-16 15:33:54 +00:00