mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Merge "Remove $wgVisualEditorTransclusionDialogBackButton feature flag"
This commit is contained in:
commit
fcf849ddb0
|
@ -178,10 +178,6 @@
|
|||
"description": "Temporary flag to enable inline parameter descriptions in the transclusion dialog.",
|
||||
"value": false
|
||||
},
|
||||
"VisualEditorTransclusionDialogBackButton": {
|
||||
"description": "Temporary flag to enable the back button in the transclusion dialog when inserting a new template. (T272354)",
|
||||
"value": false
|
||||
},
|
||||
"VisualEditorTransclusionDialogNewSidebar": {
|
||||
"description": "Temporary flag to enable the new sidebar in the transclusion dialog.",
|
||||
"value": false
|
||||
|
|
|
@ -1121,7 +1121,6 @@ class Hooks {
|
|||
'sourceFeedbackTitle' => $veConfig->get( 'VisualEditorSourceFeedbackTitle' ),
|
||||
'transclusionDialogInlineDescriptions' =>
|
||||
$veConfig->get( 'VisualEditorTransclusionDialogInlineDescriptions' ),
|
||||
'transclusionDialogBackButton' => $veConfig->get( 'VisualEditorTransclusionDialogBackButton' ),
|
||||
'transclusionDialogNewSidebar' => $veConfig->get( 'VisualEditorTransclusionDialogNewSidebar' ),
|
||||
'cirrusSearchLookup' => $extensionRegistry->isLoaded( 'CirrusSearch' )
|
||||
&& $veConfig->get( 'VisualEditorTemplateSearchImprovements' ),
|
||||
|
|
|
@ -30,7 +30,6 @@ ve.ui.MWTransclusionDialog = function VeUiMWTransclusionDialog( config ) {
|
|||
|
||||
// Temporary feature flags
|
||||
this.useInlineDescriptions = veConfig.transclusionDialogInlineDescriptions;
|
||||
this.useBackButton = veConfig.transclusionDialogBackButton;
|
||||
this.useSearchImprovements = veConfig.templateSearchImprovements;
|
||||
this.useNewSidebar = veConfig.transclusionDialogNewSidebar;
|
||||
|
||||
|
@ -543,15 +542,11 @@ ve.ui.MWTransclusionDialog.prototype.updateActionSet = function () {
|
|||
saveButton.setLabel( ve.msg( 'visualeditor-dialog-transclusion-action-save' ) );
|
||||
}
|
||||
|
||||
if ( this.useBackButton ) {
|
||||
var closeButton = this.actions.get( { flags: [ 'close' ] } ).pop(),
|
||||
canGoBack = this.getMode() === 'insert' && !this.transclusionModel.isEmpty();
|
||||
var closeButton = this.actions.get( { flags: [ 'close' ] } ).pop(),
|
||||
canGoBack = this.getMode() === 'insert' && !this.transclusionModel.isEmpty();
|
||||
|
||||
closeButton.toggle( !canGoBack );
|
||||
backButton.toggle( canGoBack );
|
||||
} else {
|
||||
backButton.toggle( false );
|
||||
}
|
||||
closeButton.toggle( !canGoBack );
|
||||
backButton.toggle( canGoBack );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -130,20 +130,6 @@ ve.ui.MWTemplatePage = function VeUiMWTemplatePage( template, name, config ) {
|
|||
.append( this.infoFieldset.$element );
|
||||
|
||||
if ( !config.isReadOnly ) {
|
||||
if ( !veConfig.transclusionDialogBackButton &&
|
||||
!veConfig.transclusionDialogNewSidebar
|
||||
) {
|
||||
var removeButton = new OO.ui.ButtonWidget( {
|
||||
framed: false,
|
||||
icon: 'trash',
|
||||
title: ve.msg( 'visualeditor-dialog-transclusion-remove-template' ),
|
||||
flags: [ 'destructive' ],
|
||||
classes: [ 've-ui-mwTransclusionDialog-removeButton' ]
|
||||
} )
|
||||
.connect( this, { click: 'onRemoveButtonClick' } );
|
||||
removeButton.$element.appendTo( this.$element );
|
||||
}
|
||||
|
||||
if ( !veConfig.transclusionDialogNewSidebar ) {
|
||||
// This button is only shown as a last resort when this …TemplatePage is neither followed by
|
||||
// a …ParameterPage (i.e. the template doesn't have parameters) nor a
|
||||
|
@ -180,13 +166,6 @@ ve.ui.MWTemplatePage.prototype.setupOutlineItem = function () {
|
|||
.setLabel( this.spec.getLabel() );
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ve.ui.MWTemplatePage.prototype.onRemoveButtonClick = function () {
|
||||
this.template.remove();
|
||||
};
|
||||
|
||||
ve.ui.MWTemplatePage.prototype.addPlaceholderParameter = function () {
|
||||
this.template.addParameter( new ve.dm.MWParameterModel( this.template ) );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue