[MediaWiki-commits] [Gerrit] Inserted ComboBoxWidget successfully - change (mediawiki...LanguageTool)

2015-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Inserted ComboBoxWidget successfully
..


Inserted ComboBoxWidget successfully

Change-Id: I2d5e95448fd1eef12113aa5c280054a1d9d75d6f
---
M modules/ext.LanguageTool.css
M modules/ext.LanguageToolDialog.js
2 files changed, 57 insertions(+), 12 deletions(-)

Approvals:
  Amire80: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.LanguageTool.css b/modules/ext.LanguageTool.css
index 4338aef..9d9a3b1 100644
--- a/modules/ext.LanguageTool.css
+++ b/modules/ext.LanguageTool.css
@@ -26,11 +26,24 @@
padding-right: 0;
 }
 
-.ve-ui-findAndReplaceDialog-cell-input {
+.ve-ui-findAndReplaceDialog-cell-input-find {
width: 100%;
 }
 
-.ve-ui-findAndReplaceDialog-cell-input .oo-ui-textInputWidget {
+.ve-ui-findAndReplaceDialog-cell-input-find .oo-ui-textInputWidget {
+   max-width: none;
+}
+
+.ve-ui-findAndReplaceDialog-cell-input-replace {
+   width: 100%;
+}
+
+.ve-ui-findAndReplaceDialog-overlay {
+   width : 100%;
+   overflow: auto;
+}
+
+.ve-ui-findAndReplaceDialog-cell-input-replace .oo-ui-comboBoxWidget {
max-width: none;
 }
 
diff --git a/modules/ext.LanguageToolDialog.js 
b/modules/ext.LanguageToolDialog.js
index 1acc060..e594e8c 100644
--- a/modules/ext.LanguageToolDialog.js
+++ b/modules/ext.LanguageToolDialog.js
@@ -82,10 +82,36 @@
iconTitle: ve.msg( 'visualeditor-find-and-replace-next-button' 
) + ' ' +
ve.ui.triggerRegistry.getMessages( 'findNext' ).join( 
', ' )
} );
-   this.replaceText = new OO.ui.TextInputWidget( {
-   placeholder: ve.msg( 
'visualeditor-find-and-replace-replace-text' ),
-   readOnly: true
+
+   this.replaceText = new OO.ui.ComboBoxWidget( {
+   label: 'ComboBoxWidget',
+   input: { value: 'Option 123' },
+   menu: {
+   items: [
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 1',
+   label: 'Option 123'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 2',
+   label: 'Option Two'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 3',
+   label: 'Option Three'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 4',
+   label: 'Option Four'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 5',
+   label: 'Option Five'
+   } )
+   ]
+   }
} );
+
this.replaceButton = new OO.ui.ButtonWidget( {
label: ve.msg( 'visualeditor-find-and-replace-replace-button' )
} );
@@ -128,19 +154,18 @@
 
// Initialization
this.findText.$input.prop( 'tabIndex', 1 );
-   this.replaceText.$input.prop( 'tabIndex', 2 );
this.$content.addClass( 've-ui-findAndReplaceDialog-content' );
this.$body
.append(
$findRow.append(
-   $( 'div' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input' 
).append(
+   $( 'div' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input-find' 
).append(
this.findText.$element
),
navigateGroup.$element,
optionsGroup.$element
),
$replaceRow.append(
-   $( 'div' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input' 
).append(
+   $( 'div' ).css( { height: '90px' } 
).addClass( 've-ui-findAndReplaceDialog-cell 
ve-ui-findAndReplaceDialog-cell-input-replace' ).append(
this.replaceText.$element
),
replaceGroup.$element,
@@ -580,10 +605,17 @@
 mw.LanguageToolDialog.prototype.displayInformation = function () {
var replacements, error;
 
-   error = this.errors[ this.focusedIndex ].description;
-   replacements = this.errors[ this.focusedIndex ].replacements;
-   this.findText.setValue( error );
-   this.replaceText.setValue( 

[MediaWiki-commits] [Gerrit] Inserted ComboBoxWidget successfully - change (mediawiki...LanguageTool)

2015-08-15 Thread Ankita-ks (Code Review)
Ankita-ks has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/231862

Change subject: Inserted ComboBoxWidget successfully
..

Inserted ComboBoxWidget successfully

Change-Id: I2d5e95448fd1eef12113aa5c280054a1d9d75d6f
---
M modules/ext.LanguageTool.css
M modules/ext.LanguageToolDialog.js
2 files changed, 57 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LanguageTool 
refs/changes/62/231862/1

diff --git a/modules/ext.LanguageTool.css b/modules/ext.LanguageTool.css
index 4338aef..2a7fdd5 100644
--- a/modules/ext.LanguageTool.css
+++ b/modules/ext.LanguageTool.css
@@ -26,11 +26,23 @@
padding-right: 0;
 }
 
-.ve-ui-findAndReplaceDialog-cell-input {
+.ve-ui-findAndReplaceDialog-cell-input-find {
width: 100%;
 }
 
-.ve-ui-findAndReplaceDialog-cell-input .oo-ui-textInputWidget {
+.ve-ui-findAndReplaceDialog-cell-input-find .oo-ui-textInputWidget {
+   max-width: none;
+}
+
+.ve-ui-findAndReplaceDialog-cell-input-replace {
+   width: 100%;
+}
+
+.ve-ui-findAndReplaceDialog-overlay {
+   width : 100%;
+   overflow: auto;
+}
+.ve-ui-findAndReplaceDialog-cell-input-replace .oo-ui-comboBoxWidget {
max-width: none;
 }
 
diff --git a/modules/ext.LanguageToolDialog.js 
b/modules/ext.LanguageToolDialog.js
index 1acc060..8db2022 100644
--- a/modules/ext.LanguageToolDialog.js
+++ b/modules/ext.LanguageToolDialog.js
@@ -82,10 +82,36 @@
iconTitle: ve.msg( 'visualeditor-find-and-replace-next-button' 
) + ' ' +
ve.ui.triggerRegistry.getMessages( 'findNext' ).join( 
', ' )
} );
-   this.replaceText = new OO.ui.TextInputWidget( {
-   placeholder: ve.msg( 
'visualeditor-find-and-replace-replace-text' ),
-   readOnly: true
+
+   this.replaceText = new OO.ui.ComboBoxWidget( {
+   label: 'ComboBoxWidget',
+   input: { value: 'Option 123' },
+   menu: {
+   items: [
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 1',
+   label: 'Option 123'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 2',
+   label: 'Option Two'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 3',
+   label: 'Option Three'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 4',
+   label: 'Option Four'
+   } ),
+   new OO.ui.MenuOptionWidget( {
+   data: 'Option 5',
+   label: 'Option Five'
+   } )
+   ]
+   }
} );
+
this.replaceButton = new OO.ui.ButtonWidget( {
label: ve.msg( 'visualeditor-find-and-replace-replace-button' )
} );
@@ -128,19 +154,19 @@
 
// Initialization
this.findText.$input.prop( 'tabIndex', 1 );
-   this.replaceText.$input.prop( 'tabIndex', 2 );
+   //this.replaceText.$input.prop( 'tabIndex', 2 );
this.$content.addClass( 've-ui-findAndReplaceDialog-content' );
this.$body
.append(
$findRow.append(
-   $( 'div' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input' 
).append(
+   $( 'div' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input-find' 
).append(
this.findText.$element
),
navigateGroup.$element,
optionsGroup.$element
),
$replaceRow.append(
-   $( 'div' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input' 
).append(
+   $( 'div' ).css({height: 90px}).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input-replace' 
).append(
this.replaceText.$element
),
replaceGroup.$element,
@@ -580,10 +606,17 @@
 mw.LanguageToolDialog.prototype.displayInformation = function () {
var replacements, error;
 
-   error = this.errors[ this.focusedIndex ].description;
-   replacements = this.errors[