mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +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.",
|
"description": "Temporary flag to enable inline parameter descriptions in the transclusion dialog.",
|
||||||
"value": false
|
"value": false
|
||||||
},
|
},
|
||||||
"VisualEditorTransclusionDialogBackButton": {
|
|
||||||
"description": "Temporary flag to enable the back button in the transclusion dialog when inserting a new template. (T272354)",
|
|
||||||
"value": false
|
|
||||||
},
|
|
||||||
"VisualEditorTransclusionDialogNewSidebar": {
|
"VisualEditorTransclusionDialogNewSidebar": {
|
||||||
"description": "Temporary flag to enable the new sidebar in the transclusion dialog.",
|
"description": "Temporary flag to enable the new sidebar in the transclusion dialog.",
|
||||||
"value": false
|
"value": false
|
||||||
|
|
|
@ -1121,7 +1121,6 @@ class Hooks {
|
||||||
'sourceFeedbackTitle' => $veConfig->get( 'VisualEditorSourceFeedbackTitle' ),
|
'sourceFeedbackTitle' => $veConfig->get( 'VisualEditorSourceFeedbackTitle' ),
|
||||||
'transclusionDialogInlineDescriptions' =>
|
'transclusionDialogInlineDescriptions' =>
|
||||||
$veConfig->get( 'VisualEditorTransclusionDialogInlineDescriptions' ),
|
$veConfig->get( 'VisualEditorTransclusionDialogInlineDescriptions' ),
|
||||||
'transclusionDialogBackButton' => $veConfig->get( 'VisualEditorTransclusionDialogBackButton' ),
|
|
||||||
'transclusionDialogNewSidebar' => $veConfig->get( 'VisualEditorTransclusionDialogNewSidebar' ),
|
'transclusionDialogNewSidebar' => $veConfig->get( 'VisualEditorTransclusionDialogNewSidebar' ),
|
||||||
'cirrusSearchLookup' => $extensionRegistry->isLoaded( 'CirrusSearch' )
|
'cirrusSearchLookup' => $extensionRegistry->isLoaded( 'CirrusSearch' )
|
||||||
&& $veConfig->get( 'VisualEditorTemplateSearchImprovements' ),
|
&& $veConfig->get( 'VisualEditorTemplateSearchImprovements' ),
|
||||||
|
|
|
@ -30,7 +30,6 @@ ve.ui.MWTransclusionDialog = function VeUiMWTransclusionDialog( config ) {
|
||||||
|
|
||||||
// Temporary feature flags
|
// Temporary feature flags
|
||||||
this.useInlineDescriptions = veConfig.transclusionDialogInlineDescriptions;
|
this.useInlineDescriptions = veConfig.transclusionDialogInlineDescriptions;
|
||||||
this.useBackButton = veConfig.transclusionDialogBackButton;
|
|
||||||
this.useSearchImprovements = veConfig.templateSearchImprovements;
|
this.useSearchImprovements = veConfig.templateSearchImprovements;
|
||||||
this.useNewSidebar = veConfig.transclusionDialogNewSidebar;
|
this.useNewSidebar = veConfig.transclusionDialogNewSidebar;
|
||||||
|
|
||||||
|
@ -543,15 +542,11 @@ ve.ui.MWTransclusionDialog.prototype.updateActionSet = function () {
|
||||||
saveButton.setLabel( ve.msg( 'visualeditor-dialog-transclusion-action-save' ) );
|
saveButton.setLabel( ve.msg( 'visualeditor-dialog-transclusion-action-save' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.useBackButton ) {
|
var closeButton = this.actions.get( { flags: [ 'close' ] } ).pop(),
|
||||||
var closeButton = this.actions.get( { flags: [ 'close' ] } ).pop(),
|
canGoBack = this.getMode() === 'insert' && !this.transclusionModel.isEmpty();
|
||||||
canGoBack = this.getMode() === 'insert' && !this.transclusionModel.isEmpty();
|
|
||||||
|
|
||||||
closeButton.toggle( !canGoBack );
|
closeButton.toggle( !canGoBack );
|
||||||
backButton.toggle( canGoBack );
|
backButton.toggle( canGoBack );
|
||||||
} else {
|
|
||||||
backButton.toggle( false );
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -130,20 +130,6 @@ ve.ui.MWTemplatePage = function VeUiMWTemplatePage( template, name, config ) {
|
||||||
.append( this.infoFieldset.$element );
|
.append( this.infoFieldset.$element );
|
||||||
|
|
||||||
if ( !config.isReadOnly ) {
|
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 ) {
|
if ( !veConfig.transclusionDialogNewSidebar ) {
|
||||||
// This button is only shown as a last resort when this …TemplatePage is neither followed by
|
// 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
|
// 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() );
|
.setLabel( this.spec.getLabel() );
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
ve.ui.MWTemplatePage.prototype.onRemoveButtonClick = function () {
|
|
||||||
this.template.remove();
|
|
||||||
};
|
|
||||||
|
|
||||||
ve.ui.MWTemplatePage.prototype.addPlaceholderParameter = function () {
|
ve.ui.MWTemplatePage.prototype.addPlaceholderParameter = function () {
|
||||||
this.template.addParameter( new ve.dm.MWParameterModel( this.template ) );
|
this.template.addParameter( new ve.dm.MWParameterModel( this.template ) );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue