From eb6624a6f977c5b909c2823f3d57d3f9386f6b83 Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Thu, 18 Jul 2024 20:34:29 +0200 Subject: [PATCH] Remove static leftovers that moved to MWReferenceEditPanel When Citoid uses these from the new class they can be removed here. Bug: T369005 Depends-On: I46fa9fe72b4d095291a01c208cac6c98df2ec088 Change-Id: I1aef5d6a05308191d7d8608902a38c801039af7e --- modules/ve-cite/ve.ui.MWReferenceDialog.js | 79 ---------------------- 1 file changed, 79 deletions(-) diff --git a/modules/ve-cite/ve.ui.MWReferenceDialog.js b/modules/ve-cite/ve.ui.MWReferenceDialog.js index 8d220b9d7..f614e832b 100644 --- a/modules/ve-cite/ve.ui.MWReferenceDialog.js +++ b/modules/ve-cite/ve.ui.MWReferenceDialog.js @@ -56,85 +56,6 @@ ve.ui.MWReferenceDialog.static.actions = [ ve.ui.MWReferenceDialog.static.modelClasses = [ ve.dm.MWReferenceNode ]; -ve.ui.MWReferenceDialog.static.includeCommands = null; - -ve.ui.MWReferenceDialog.static.excludeCommands = [ - // No formatting - 'paragraph', - 'heading1', - 'heading2', - 'heading3', - 'heading4', - 'heading5', - 'heading6', - 'preformatted', - 'blockquote', - // No tables - 'insertTable', - 'deleteTable', - 'mergeCells', - 'tableCaption', - 'tableCellHeader', - 'tableCellData', - // No structure - 'bullet', - 'bulletWrapOnce', - 'number', - 'numberWrapOnce', - 'indent', - 'outdent', - // References - 'reference', - 'reference/existing', - 'citoid', - 'referencesList' -]; - -/** - * Get the import rules for the surface widget in the dialog. - * - * @see ve.dm.ElementLinearData#sanitize - * @return {Object} Import rules - */ -ve.ui.MWReferenceDialog.static.getImportRules = function () { - const rules = ve.copy( ve.init.target.constructor.static.importRules ); - return ve.extendObject( - rules, - { - all: { - blacklist: ve.extendObject( - { - // Nested references are impossible - mwReference: true, - mwReferencesList: true, - // Lists and tables are actually possible in wikitext with a leading - // line break but we prevent creating these with the UI - list: true, - listItem: true, - definitionList: true, - definitionListItem: true, - table: true, - tableCaption: true, - tableSection: true, - tableRow: true, - tableCell: true, - mwTable: true, - mwTransclusionTableCell: true - }, - ve.getProp( rules, 'all', 'blacklist' ) - ), - // Headings are not possible in wikitext without HTML - conversions: ve.extendObject( - { - mwHeading: 'paragraph' - }, - ve.getProp( rules, 'all', 'conversions' ) - ) - } - } - ); -}; - /* Methods */ /**