mediawiki-extensions-Cite/modules/ve-cite
thiemowmde 6c5c2dc6cb Remove separate private deferDoc property in ve.dm.MWReferenceModel
This is a direct follow-up for what I started in I3c9b9bb. Again all
this does is moving existing code around. The separate this.deferDoc
property is never used anywhere:
https://codesearch.wmcloud.org/search/?q=deferDoc&files=%5C.js%24
Instead I store the deferred function directly in the target property
this.doc and resolve it when needed.

Note that the concept of a parentDoc still exists. I tried to make
this as obvious as possible via comments and by arranging the code
accordingly:
1. A lot of code calls setDocument which directly sets this.doc. The
   parentDoc is never used in this case.
2. The parentDoc is only needed to auto-generate the (empty) document
   for the reference when a new reference is created.

That's also why the existing code always calls the constructor with
the parentDoc, even if this ends being unused in many cases: It's a
simple fallback.

Bug: T363096
Change-Id: I7874f187b2b397ed511b695ca9ff95838fcff302
2024-05-13 22:25:06 +02:00
..
i18n Localisation updates from https://translatewiki.net. 2024-05-06 09:25:14 +02:00
images
.eslintrc.json
ve.ce.MWReferenceNode.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ce.MWReferenceNode.less
ve.ce.MWReferencesListNode.js Merge "ce.MWReferenceListNode: Only open dialog on unmodified left clicks" 2024-03-28 16:14:32 +00:00
ve.ce.MWReferencesListNode.less Group and nest stylesheets now they are .less files 2024-01-21 15:59:20 +01:00
ve.dm.MWReferenceModel.js Remove separate private deferDoc property in ve.dm.MWReferenceModel 2024-05-13 22:25:06 +02:00
ve.dm.MWReferenceNode.js Don't call things "attrs" that aren't mw.attrs 2024-05-13 18:37:17 +02:00
ve.dm.MWReferencesListNode.js Don't call things "attrs" that aren't mw.attrs 2024-05-13 18:37:17 +02:00
ve.ui.MWCitationAction.js Merge "Remove obsolete @method annotations" 2024-03-18 10:00:17 +00:00
ve.ui.MWCitationContextItem.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWCitationDialog.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWCitationDialogTool.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWCitationDialogTool.less
ve.ui.MWCitationNeededContextItem.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWReference.init.js [lint] Satisfy max-len rule 2024-01-30 12:18:52 +01:00
ve.ui.MWReferenceContextItem.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWReferenceContextItem.less Group and nest stylesheets now they are .less files 2024-01-21 15:59:20 +01:00
ve.ui.MWReferenceDialog.js Add tracking for VE Cite re-use interaction 2024-05-07 12:47:37 +02:00
ve.ui.MWReferenceDialog.less
ve.ui.MWReferenceDialogTool.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWReferenceGroupInputWidget.js Add initial QUnit tests relevant for reference re-use in VE 2024-03-21 09:37:26 +01:00
ve.ui.MWReferenceResultWidget.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWReferenceResultWidget.less Group and nest stylesheets now they are .less files 2024-01-21 15:59:20 +01:00
ve.ui.MWReferenceSearchWidget.js Consolidate duplicate "is reference list empty" code paths 2024-05-07 15:51:12 +02:00
ve.ui.MWReferenceSearchWidget.less
ve.ui.MWReferencesListCommand.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWReferencesListContextItem.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWReferencesListDialog.js Clean up and fix some jsdoc annotations 2024-02-29 13:05:42 +01:00
ve.ui.MWUseExistingReferenceCommand.js Consolidate duplicate "is reference list empty" code paths 2024-05-07 15:51:12 +02:00