mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Revert "Add extends warning to reference dialog"
This reverts commit da30b2b626
.
Reason for revert: Caused a regression. Feature is not enabled on public wikis so reverting is harmless for now.
Bug: T247922
Bug: T340757
Change-Id: I83434afaf1b76425bddb575dd724f462a247c83d
This commit is contained in:
parent
da30b2b626
commit
42e13cb3c3
|
@ -156,7 +156,6 @@
|
|||
"cite-ve-dialog-reference-editing-reused",
|
||||
"cite-ve-dialog-reference-editing-reused-long",
|
||||
"cite-ve-dialog-reference-editing-extends",
|
||||
"cite-ve-dialog-reference-editing-extends-long",
|
||||
"cite-ve-dialog-reference-options-group-label",
|
||||
"cite-ve-dialog-reference-options-group-placeholder",
|
||||
"cite-ve-dialog-reference-options-name-label",
|
||||
|
|
|
@ -261,8 +261,8 @@ ve.ui.MWReferenceDialog.prototype.useReference = function ( ref ) {
|
|||
this.referenceGroupInput.setValue( this.originalGroup );
|
||||
this.referenceGroupInput.setDisabled( false );
|
||||
|
||||
var list = this.getFragment().getDocument().getInternalList();
|
||||
var group = list.getNodeGroup( this.referenceModel.getListGroup() );
|
||||
var group = this.getFragment().getDocument().getInternalList()
|
||||
.getNodeGroup( this.referenceModel.getListGroup() );
|
||||
var nodes = ve.getProp( group, 'keyedNodes', this.referenceModel.getListKey() );
|
||||
var usages = nodes ? nodes.filter( function ( node ) {
|
||||
return !node.findParent( ve.dm.MWReferencesListNode );
|
||||
|
@ -271,14 +271,6 @@ ve.ui.MWReferenceDialog.prototype.useReference = function ( ref ) {
|
|||
this.reuseWarning.toggle( usages > 1 )
|
||||
.setLabel( mw.msg( 'cite-ve-dialog-reference-editing-reused-long', usages ) );
|
||||
|
||||
this.extendsWarning.toggle( !!this.referenceModel.extendsRef );
|
||||
|
||||
if ( this.referenceModel.extendsRef !== undefined ) {
|
||||
var index = list.keys.indexOf( 'literal/' + this.referenceModel.extendsRef );
|
||||
var parentRef = list.getItemNode( index ).element.attributes.originalHtml;
|
||||
this.extendsWarning.setLabel( mw.msg( 'cite-ve-dialog-reference-editing-extends-long', parentRef ) );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
@ -299,13 +291,7 @@ ve.ui.MWReferenceDialog.prototype.initialize = function () {
|
|||
this.reuseWarning = new OO.ui.MessageWidget( {
|
||||
inline: true,
|
||||
icon: 'alert',
|
||||
classes: [ 've-ui-mwReferenceDialog-warning' ]
|
||||
} );
|
||||
|
||||
this.extendsWarning = new OO.ui.MessageWidget( {
|
||||
inline: true,
|
||||
icon: 'alert',
|
||||
classes: [ 've-ui-mwReferenceDialog-warning' ]
|
||||
classes: [ 've-ui-mwReferenceDialog-reuseWarning' ]
|
||||
} );
|
||||
|
||||
var citeCommands = Object.keys( ve.init.target.getSurface().commandRegistry.registry ).filter( function ( command ) {
|
||||
|
@ -345,7 +331,7 @@ ve.ui.MWReferenceDialog.prototype.initialize = function () {
|
|||
|
||||
// Initialization
|
||||
this.panels.addItems( [ this.editPanel, this.searchPanel ] );
|
||||
this.editPanel.$element.append( this.reuseWarning.$element, this.extendsWarning.$element, this.contentFieldset.$element, this.optionsFieldset.$element );
|
||||
this.editPanel.$element.append( this.reuseWarning.$element, this.contentFieldset.$element, this.optionsFieldset.$element );
|
||||
this.optionsFieldset.addItems( [ this.referenceGroupField ] );
|
||||
this.searchPanel.$element.append( this.search.$element );
|
||||
this.$body.append( this.panels.$element );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @license MIT
|
||||
*/
|
||||
|
||||
.ve-ui-mwReferenceDialog-warning {
|
||||
.ve-ui-mwReferenceDialog-reuseWarning {
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue