Esanders has uploaded a new change for review.
https://gerrit.wikimedia.org/r/172785
Change subject: Rename input variables in media dialog
......................................................................
Rename input variables in media dialog
Change-Id: I9b8edfaccb163aff313e267bb1a0f74455502242
---
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
1 file changed, 22 insertions(+), 22 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/85/172785/1
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index 63d5e2e..aa6cef8 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -264,7 +264,7 @@
.append( this.altTextInput.$element );
// Position
- this.positionInput = new OO.ui.ButtonSelectWidget( {
+ this.positionSelect = new OO.ui.ButtonSelectWidget( {
$: this.$
} );
@@ -288,7 +288,7 @@
[ alignLeftButton, alignCenterButton, alignRightButton ] :
[ alignRightButton, alignCenterButton, alignLeftButton ];
- this.positionInput.addItems( alignButtons, 0 );
+ this.positionSelect.addItems( alignButtons, 0 );
this.positionCheckbox = new OO.ui.CheckboxInputWidget( {
$: this.$
@@ -308,7 +308,7 @@
// Build position fieldset
positionFieldset.$element.append(
positionField.$element,
- this.positionInput.$element
+ this.positionSelect.$element
);
// Type
@@ -318,10 +318,10 @@
icon: 'parameter'
} );
- this.typeInput = new OO.ui.ButtonSelectWidget( {
+ this.typeSelect = new OO.ui.ButtonSelectWidget( {
$: this.$
} );
- this.typeInput.addItems( [
+ this.typeSelect.addItems( [
// TODO: Inline images require a bit of further work, will be
coming soon
new OO.ui.ButtonOptionWidget( 'thumb', {
$: this.$,
@@ -355,7 +355,7 @@
// Build type fieldset
this.typeFieldset.$element.append(
- this.typeInput.$element,
+ this.typeSelect.$element,
borderField.$element
);
@@ -387,8 +387,8 @@
// Events
this.positionCheckbox.connect( this, { change:
'onPositionCheckboxChange' } );
this.borderCheckbox.connect( this, { change: 'onBorderCheckboxChange' }
);
- this.positionInput.connect( this, { choose: 'onPositionInputChoose' } );
- this.typeInput.connect( this, { choose: 'onTypeInputChoose' } );
+ this.positionSelect.connect( this, { choose: 'onpositionSelectChoose' }
);
+ this.typeSelect.connect( this, { choose: 'ontypeSelectChoose' } );
this.search.connect( this, { select: 'onSearchSelect' } );
this.altTextInput.connect( this, { change: 'onAlternateTextChange' } );
// Panel classes
@@ -467,10 +467,10 @@
var item;
alignment = alignment || 'none';
- item = alignment !== 'none' ? this.positionInput.getItemFromData(
alignment ) : null;
+ item = alignment !== 'none' ? this.positionSelect.getItemFromData(
alignment ) : null;
// Select the item without triggering the 'choose' event
- this.positionInput.selectItem( item );
+ this.positionSelect.selectItem( item );
this.positionCheckbox.setValue( alignment !== 'none' );
this.checkChanged();
@@ -482,9 +482,9 @@
*/
ve.ui.MWMediaDialog.prototype.onImageModelTypeChange = function ( type ) {
- var item = type ? this.typeInput.getItemFromData( type ) : null;
+ var item = type ? this.typeSelect.getItemFromData( type ) : null;
- this.typeInput.selectItem( item );
+ this.typeSelect.selectItem( item );
this.borderCheckbox.setDisabled(
!this.imageModel.isBorderable()
@@ -505,7 +505,7 @@
var newPositionValue,
currentModelAlignment = this.imageModel.getAlignment();
- this.positionInput.setDisabled( !checked );
+ this.positionSelect.setDisabled( !checked );
this.checkChanged();
// Only update the model if the current value is different than that
// of the image model
@@ -543,11 +543,11 @@
};
/**
- * Handle change event on the positionInput element.
+ * Handle change event on the positionSelect element.
*
* @param {OO.ui.ButtonOptionWidget} item Selected item
*/
-ve.ui.MWMediaDialog.prototype.onPositionInputChoose = function ( item ) {
+ve.ui.MWMediaDialog.prototype.onpositionSelectChoose = function ( item ) {
var position = item ? item.getData() : 'default';
// Only update if the value is different than the model
@@ -558,11 +558,11 @@
};
/**
- * Handle change event on the typeInput element.
+ * Handle change event on the typeSelect element.
*
* @param {OO.ui.ButtonOptionWidget} item Selected item
*/
-ve.ui.MWMediaDialog.prototype.onTypeInputChoose = function ( item ) {
+ve.ui.MWMediaDialog.prototype.ontypeSelectChoose = function ( item ) {
var type = item ? item.getData() : 'default';
// Only update if the value is different than the model
@@ -805,12 +805,12 @@
);
// Set initial alignment
- this.positionInput.setDisabled(
+ this.positionSelect.setDisabled(
!this.imageModel.isAligned()
);
- this.positionInput.selectItem(
+ this.positionSelect.selectItem(
this.imageModel.isAligned() ?
- this.positionInput.getItemFromData(
+ this.positionSelect.getItemFromData(
this.imageModel.getAlignment()
) :
null
@@ -828,8 +828,8 @@
);
// Type select
- this.typeInput.selectItem(
- this.typeInput.getItemFromData(
+ this.typeSelect.selectItem(
+ this.typeSelect.getItemFromData(
this.imageModel.getType() || 'none'
)
);
--
To view, visit https://gerrit.wikimedia.org/r/172785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b8edfaccb163aff313e267bb1a0f74455502242
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits