Commit graph

21 commits

Author SHA1 Message Date
Ed Sanders cf95dbd4be Move var declarations inline
Change-Id: I824a65e72a72e5acf65c54a63299469f7acb649d
2021-11-03 16:38:31 +00:00
Adam Wight 53d055d1e4 Only the "show/hide options" button should be hidden
We added this line in order to make the sidebar show/hide behavior
the same as the new VisualEditor template dialog, but it should have
only affected this one button.  When additional actions are added,
such as Citoid's "change reference type" button, these should still
be available.

Bug: T293280
Change-Id: I6b2c716fff991781e36ba21b541ea2ff918cfeb3
2021-10-15 13:42:48 +02:00
jenkins-bot ecf603a5fd Merge "Make citation dialog behave more like VE" 2021-09-28 09:14:05 +00:00
Thiemo Kreuz 8902cea828 Use .containsValuableData() method from transclusion model
This is even more reliable because it also considers auto-values,
for example.

Depends-On: I522b888e366f066b28983a18041a8728d11623df
Change-Id: If83b9da65be9a759a82e8512ae171f802da9f597
2021-09-27 11:19:28 +02:00
Adam Wight ca2ffa4853 Make citation dialog behave more like VE
Applies new sidebar features to the Cite dialog, according to the VE
feature flags.

Bug: T291241
Change-Id: I1b7c191ae8fd1fa01808ea1e84ba72551f3d2331
2021-09-20 11:44:51 +02:00
David Lynch ba9b0c280b Tracking for change events in citation-templates
Bug: T221305
Change-Id: I4aa099ae1f7a6a2bb49b28c6d1452d077ffa61b7
2019-07-22 12:03:34 -05:00
Bartosz Dziewoński a3ef5fdab5 ve.ui.MWCitationDialog: If the selected ref is not using the template, clear it
Bug: T208981
Change-Id: I344331f1b2a5a8456d064039086623f67d9c0ea9
2019-02-26 00:30:56 +01:00
jenkins-bot 7c5906bcdf Merge "Use new upstream defaults for actions" 2019-02-22 14:53:52 +00:00
Ed Sanders e4efddbd0d Use new upstream defaults for actions
Allows us to remove action lists identical to the parent,
and also the default this.actions.setMode call.

Rename #canApply to #isModified for consistency.

Change-Id: I026feb291cd64474557d1f9df30604a7bbbb0bd2
2019-02-22 14:12:52 +00:00
Ed Sanders 89dd1faa11 Remove generated cite-dialogs stubs
We generate stub MWCitationDialog sub-classes for each citation
type, e.g. cite-web, cite-news. The only override these sub-classes
provide is for the dialog title, providing "Website" instead of
"Cite web", however because of code in MWTemplateDialog, this override
isn't even used.

1. Make the 'citation' dialog (now 'cite') concrete by registering
   it, and allow a 'title' argument to be passed it.
2. Actually override the title, using the passed in argument.
3. Remove the stub generated citation dialogs.

This will also fix our tracking data. Current we are getting
window-open actions with the argument being a localised citation
type name, e.g. cite-Literatur, cite-אתר.

These will now all be tracked as 'cite' as we use the parent dialog.

Bug: T216248
Depends-On: I355e7fe4c2ea965f2ca91f0ab0430cfb95e56e0a
Change-Id: I661707b5f9d3d810e9391ad63bef546d4fcb29e4
2019-02-15 22:44:17 +00:00
Bartosz Dziewoński adc64b3002 ve.ui.MWCitationDialog: Unbreak the logic to enable/disable actions
This code was written in 2014 and it seems that some change to
ve.ui.MWTemplateDialog since then made it not work. No idea why or
when it broke. But we can implement the functionality much more easily
now by overriding #setApplicableStatus, which works correctly.

Bug: T210796
Change-Id: I6e87ca979a96785fc74f1a57f7d80ba4b43705f2
2018-11-29 22:39:55 +00:00
Bartosz Dziewoński b7bdcaeccc ve.ui.MWCitationDialog: Remove unneeded code re-setting insert label
This sets the label to be the same as the default value inherited from
ve.ui.MWTemplateDialog. Looks like it's no longer needed since change
Ia8fb88d3501ffa2c26add4419da5463a926f45d1 in VE-MW (2014).

Change-Id: Icd64d22aef29a3791352e1839993ea8462a147f3
2018-11-29 23:09:23 +01:00
Bartosz Dziewoński 7f6ae77b3c ve.ui.MWCitationDialog: Fix condition for enabling insert/apply action
The method #hasUsefulParameter has been accidentally made to always
return false in fdde5b71af.

Bug: T210686
Change-Id: I215924c2f693842abd8026404d17c725192272c3
2018-11-29 04:02:44 +00:00
Ed Sanders fdde5b71af Update eslint-config-wikimedia to 0.9.0
Change-Id: I7883af1f56c7f2f3eeff1f7a51b640a303bcab78
2018-11-27 22:23:57 +00:00
Bartosz Dziewoński ec55fa3ce8 Use changed ve.dm.Selection interface
Bug: T208228
Bug: T208913
Change-Id: Ifb1a77a5f07b9e257c6e0477e23316f80c7a4791
2018-11-07 16:51:51 +01:00
Thiemo Mättig bbc1f2c91d Use standard form for @license tags
See https://spdx.org/licenses/

Change-Id: Ic091ebc3844abcd6de90b3241382fb4732200a6d
2018-03-20 03:18:37 +00:00
James D. Forrester 0999d771b6 doc: Bump copyright year
Also make the overly-terse statement clearer.

Change-Id: I752bb82444bf7cb41480076bace42331dc35a598
2018-01-02 17:05:50 -08:00
James D. Forrester 0d20873fa6 doc: Bump copyright year notice, 'team' name
Change-Id: Ia090c417a1aa716b255613199b5e49616bf0517a
2017-04-20 16:50:43 +00:00
Ed Sanders 24939dd424 Explicitly insert transclusion as inline
This keeps the insertTransclusionNode method in synchronous mode.

Logically depends on Ibc2fc66e68 but should be merged before it.

Change-Id: Iec17ea65d38fec7ca7ffcf81032c7346635218d9
2016-05-15 12:16:51 +01:00
Ed Sanders 8a278dbb82 Remove icon properties from windows
Windows stopped supporting icons a while ago.

Change-Id: I2651a8e1e6b22515701d35a4684d1ed7bd858658
2016-03-29 12:33:13 +01:00
Ed Sanders 18f616b9b8 VisualEditor: Move code for Cite into this repo
This code has been developed over three years now in the repo of MediaWiki's
integration of VisualEditor. It has grown and developed significantly during
that time, but now is pretty stable. A number of hacks inside the MediaWiki-
VisualEditor code base have been used to prevent this code from being loaded
on wikis where the Cite extension is not deployed, but this state of affairs
is and always was meant to be temporary.

This code is under the MIT licence which is a tad messy, but not impossible.
It's clearly labelled as such. The list of authors has been updated to take
into account the influx of new functionality.

Bug: T41621
Bug: T104928
Change-Id: I39936ed83d5a60471a0a75da753f498e80aef234
2016-02-04 08:41:54 -08:00