mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
6c5c2dc6cb
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 |
||
---|---|---|
.. | ||
i18n | ||
images | ||
.eslintrc.json | ||
ve.ce.MWReferenceNode.js | ||
ve.ce.MWReferenceNode.less | ||
ve.ce.MWReferencesListNode.js | ||
ve.ce.MWReferencesListNode.less | ||
ve.dm.MWReferenceModel.js | ||
ve.dm.MWReferenceNode.js | ||
ve.dm.MWReferencesListNode.js | ||
ve.ui.MWCitationAction.js | ||
ve.ui.MWCitationContextItem.js | ||
ve.ui.MWCitationDialog.js | ||
ve.ui.MWCitationDialogTool.js | ||
ve.ui.MWCitationDialogTool.less | ||
ve.ui.MWCitationNeededContextItem.js | ||
ve.ui.MWReference.init.js | ||
ve.ui.MWReferenceContextItem.js | ||
ve.ui.MWReferenceContextItem.less | ||
ve.ui.MWReferenceDialog.js | ||
ve.ui.MWReferenceDialog.less | ||
ve.ui.MWReferenceDialogTool.js | ||
ve.ui.MWReferenceGroupInputWidget.js | ||
ve.ui.MWReferenceResultWidget.js | ||
ve.ui.MWReferenceResultWidget.less | ||
ve.ui.MWReferenceSearchWidget.js | ||
ve.ui.MWReferenceSearchWidget.less | ||
ve.ui.MWReferencesListCommand.js | ||
ve.ui.MWReferencesListContextItem.js | ||
ve.ui.MWReferencesListDialog.js | ||
ve.ui.MWUseExistingReferenceCommand.js |