mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 03:08:42 +00:00
Add group field to reference dialog
Change-Id: Icf9ea348cd97bdb09ddf18769f53c01ea5a8b7ef
This commit is contained in:
parent
0c16066eb3
commit
acea97263b
|
@ -49,6 +49,10 @@ $messages['en'] = array(
|
|||
'visualeditor-dialog-meta-languages-readonlynote' => 'This is a list of articles in other languages that are linked to this one; they cannot yet be edited using the VisualEditor',
|
||||
'visualeditor-dialog-meta-languages-section' => 'Languages',
|
||||
'visualeditor-dialog-meta-title' => 'Page settings',
|
||||
'visualeditor-dialog-reference-content-section' => 'Reference content',
|
||||
'visualeditor-dialog-reference-options-section' => 'Options',
|
||||
'visualeditor-dialog-reference-options-name-label' => 'Re-use by this name',
|
||||
'visualeditor-dialog-reference-options-group-label' => 'Use this group',
|
||||
'visualeditor-dialog-reference-title' => 'Reference',
|
||||
'visualeditor-dialog-media-title' => 'Media settings',
|
||||
'visualeditor-dialog-transclusion-title' => 'Transclusion',
|
||||
|
|
|
@ -581,6 +581,10 @@ $wgResourceModules += array(
|
|||
),
|
||||
'messages' => array(
|
||||
// VE messages needed by code that is only in experimental mode
|
||||
'visualeditor-dialog-reference-content-section',
|
||||
'visualeditor-dialog-reference-options-section',
|
||||
'visualeditor-dialog-reference-options-name-label',
|
||||
'visualeditor-dialog-reference-options-group-label',
|
||||
'visualeditor-dialog-reference-title',
|
||||
'visualeditor-dialog-transclusion-title',
|
||||
'visualeditor-dialogbutton-reference-tooltip',
|
||||
|
|
|
@ -69,25 +69,35 @@ ve.ui.MWReferenceDialog.prototype.initialize = function () {
|
|||
|
||||
// Properties
|
||||
this.contentFieldset = new ve.ui.FieldsetLayout( {
|
||||
// TODO: use message string
|
||||
'$$': this.frame.$$, 'label': 'Content', 'icon': 'parameter'
|
||||
'$$': this.frame.$$,
|
||||
'label': ve.msg( 'visualeditor-dialog-reference-content-section' ),
|
||||
'icon': 'reference'
|
||||
} );
|
||||
this.nameFieldset = new ve.ui.FieldsetLayout( {
|
||||
// TODO: use message string
|
||||
'$$': this.frame.$$, 'label': 'Name', 'icon': 'parameter'
|
||||
this.optionsFieldset = new ve.ui.FieldsetLayout( {
|
||||
'$$': this.frame.$$,
|
||||
'label': ve.msg( 'visualeditor-dialog-reference-options-section' ),
|
||||
'icon': 'settings'
|
||||
} );
|
||||
this.nameInput = new ve.ui.TextInputWidget( { '$$': this.frame.$$ } );
|
||||
this.nameLabel = new ve.ui.InputLabelWidget( {
|
||||
'$$': this.frame.$$,
|
||||
'input': this.nameInput,
|
||||
// TODO: use message string
|
||||
'label': 'Reuse this reference by this name'
|
||||
'label': ve.msg( 'visualeditor-dialog-reference-options-name-label' )
|
||||
} );
|
||||
|
||||
this.groupInput = new ve.ui.TextInputWidget( { '$$': this.frame.$$ } );
|
||||
this.groupLabel = new ve.ui.InputLabelWidget( {
|
||||
'$$': this.frame.$$,
|
||||
'input': this.groupInput,
|
||||
'label': ve.msg( 'visualeditor-dialog-reference-options-group-label' )
|
||||
} );
|
||||
|
||||
// Initialization
|
||||
this.$body.addClass( 've-ui-mwReferenceDialog-body' );
|
||||
this.$body.append( this.contentFieldset.$, this.nameFieldset.$ );
|
||||
this.nameFieldset.$.append( this.nameLabel.$, this.nameInput.$ );
|
||||
this.$body.append( this.contentFieldset.$, this.optionsFieldset.$ );
|
||||
this.optionsFieldset.$.append(
|
||||
this.nameLabel.$, this.nameInput.$, this.groupLabel.$, this.groupInput.$
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue