mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-15 02:55:04 +00:00
Make citation dialog behave more like VE
Applies new sidebar features to the Cite dialog, according to the VE feature flags. Bug: T291241 Change-Id: I1b7c191ae8fd1fa01808ea1e84ba72551f3d2331
This commit is contained in:
parent
408786d3ca
commit
ca2ffa4853
|
@ -18,6 +18,9 @@ ve.ui.MWCitationDialog = function VeUiMWCitationDialog( config ) {
|
||||||
// Parent constructor
|
// Parent constructor
|
||||||
ve.ui.MWCitationDialog.super.call( this, config );
|
ve.ui.MWCitationDialog.super.call( this, config );
|
||||||
|
|
||||||
|
// Override feature set.
|
||||||
|
this.useBackButton = false;
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
this.referenceModel = null;
|
this.referenceModel = null;
|
||||||
this.referenceNode = null;
|
this.referenceNode = null;
|
||||||
|
@ -26,7 +29,7 @@ ve.ui.MWCitationDialog = function VeUiMWCitationDialog( config ) {
|
||||||
|
|
||||||
/* Inheritance */
|
/* Inheritance */
|
||||||
|
|
||||||
OO.inheritClass( ve.ui.MWCitationDialog, ve.ui.MWTemplateDialog );
|
OO.inheritClass( ve.ui.MWCitationDialog, ve.ui.MWTransclusionDialog );
|
||||||
|
|
||||||
/* Static Properties */
|
/* Static Properties */
|
||||||
|
|
||||||
|
@ -34,6 +37,17 @@ ve.ui.MWCitationDialog.static.name = 'cite';
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide the "show options" button when using the old workflow.
|
||||||
|
*/
|
||||||
|
ve.ui.MWCitationDialog.prototype.autoExpandSidebar = function () {
|
||||||
|
ve.ui.MWCitationDialog.super.prototype.autoExpandSidebar.call( this );
|
||||||
|
|
||||||
|
if ( !this.useInlineDescriptions && !this.useNewSidebar && !this.isSidebarExpanded ) {
|
||||||
|
this.$otherActions.toggleClass( 'oo-ui-element-hidden', true );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the reference node to be edited.
|
* Get the reference node to be edited.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue