jenkins-bot has submitted this change and it was merged.
Change subject: Marked the option labels with indexes
..
Marked the option labels with indexes
Change-Id: I76e841c517c4a4e83fa0e26338b4ddb12669b6b3
---
M modules/ext.LanguageToolDialog.js
1 file changed, 12 insertions(+), 7 deletions(-)
Approvals:
Amire80: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ext.LanguageToolDialog.js
b/modules/ext.LanguageToolDialog.js
index e594e8c..026f4ee 100644
--- a/modules/ext.LanguageToolDialog.js
+++ b/modules/ext.LanguageToolDialog.js
@@ -89,23 +89,23 @@
menu: {
items: [
new OO.ui.MenuOptionWidget( {
- data: 'Option 1',
+ data: '1',
label: 'Option 123'
} ),
new OO.ui.MenuOptionWidget( {
- data: 'Option 2',
+ data: '2',
label: 'Option Two'
} ),
new OO.ui.MenuOptionWidget( {
- data: 'Option 3',
+ data: '3',
label: 'Option Three'
} ),
new OO.ui.MenuOptionWidget( {
- data: 'Option 4',
+ data: '4',
label: 'Option Four'
} ),
new OO.ui.MenuOptionWidget( {
- data: 'Option 5',
+ data: '5',
label: 'Option Five'
} )
]
@@ -603,7 +603,7 @@
// End of wrapper code by James Padolsey
mw.LanguageToolDialog.prototype.displayInformation = function () {
- var replacements, error;
+ var i, replacements, error, replaceArr, len, index;
if ( this.errors && this.errors.length > this.focusedIndex ) {
error = this.errors[ this.focusedIndex ].description;
@@ -614,7 +614,12 @@
this.findText.setValue( error );
}
if ( replacements ) {
- this.replaceText.setValue( replacements );
+ replaceArr = replacements.split( '#' );
+ len = replaceArr.length;
+ for ( i = 0; i <= len; i++ ) {
+ index = i.toString();
+ this.replaceText.getMenu().getItemFromData( index
).setData( replaceArr[ i ] );
+ }
}
return;
};
--
To view, visit https://gerrit.wikimedia.org/r/231863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I76e841c517c4a4e83fa0e26338b4ddb12669b6b3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/LanguageTool
Gerrit-Branch: master
Gerrit-Owner: Ankita-ks
Gerrit-Reviewer: Amire80
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits