Ankita-ks has uploaded a new change for review.
https://gerrit.wikimedia.org/r/228278
Change subject: Correct description updated in the dialog
......................................................................
Correct description updated in the dialog
Change-Id: I4c0e394065b4772279edf6c1bd91a87f4bba5d05
---
M modules/ext.LanguageToolDialog.js
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LanguageTool
refs/changes/78/228278/1
diff --git a/modules/ext.LanguageToolDialog.js
b/modules/ext.LanguageToolDialog.js
index c6426ab..96935b1 100644
--- a/modules/ext.LanguageToolDialog.js
+++ b/modules/ext.LanguageToolDialog.js
@@ -46,6 +46,7 @@
* @inheritdoc
*/
mw.LanguageToolDialog.prototype.initialize = function () {
+ console.log( 'intialize' );
// Parent method
mw.LanguageToolDialog.super.prototype.initialize.call( this );
@@ -164,6 +165,7 @@
* @inheritdoc
*/
mw.LanguageToolDialog.prototype.getSetupProcess = function ( data ) {
+ console.log( 'getSetupProcess' );
data = data || {};
return mw.LanguageToolDialog.super.prototype.getSetupProcess.call(
this, data )
.first( function () {
@@ -192,6 +194,7 @@
* @inheritdoc
*/
mw.LanguageToolDialog.prototype.getReadyProcess = function ( data ) {
+ console.log( 'getReadyProcess' );
return mw.LanguageToolDialog.super.prototype.getReadyProcess.call(
this, data )
.next( function () {
this.findText.focus().select();
@@ -202,6 +205,7 @@
* @inheritdoc
*/
mw.LanguageToolDialog.prototype.getTeardownProcess = function ( data ) {
+ console.log( 'getTeardownProcess' );
return mw.LanguageToolDialog.super.prototype.getTeardownProcess.call(
this, data )
.next( function () {
var selection,
@@ -239,6 +243,7 @@
* Handle window scroll events
*/
mw.LanguageToolDialog.prototype.onWindowScroll = function () {
+ console.log( 'onWindowScroll' );
if ( this.renderedFragments.getLength() < this.results ) {
// If viewport clipping is being used, reposition results based
on the current viewport
this.renderFragments();
@@ -249,6 +254,7 @@
* Handle change events to the find inputs (text or match case)
*/
mw.LanguageToolDialog.prototype.onFindChange = function () {
+ console.log( 'onFindChange' );
this.updateFragments();
this.renderFragments();
this.highlightFocused( true );
@@ -260,6 +266,7 @@
* @param {jQuery.Event} e
*/
mw.LanguageToolDialog.prototype.onFindTextEnter = function ( e ) {
+ console.log( 'onFindTextEnter' );
if ( !this.results ) {
return;
}
@@ -274,6 +281,7 @@
* Update search result fragments
*/
mw.LanguageToolDialog.prototype.updateFragments = function () {
+ console.log( 'updateFragments' );
var i, l,
surfaceModel = this.surface.getModel(),
documentModel = surfaceModel.getDocument(),
@@ -302,6 +310,7 @@
* Position results markers
*/
mw.LanguageToolDialog.prototype.renderFragments = function () {
+ console.log( 'renderFragments' );
if ( this.replacing ) {
return;
}
@@ -340,6 +349,7 @@
* @param {ve.Range} range Range of fragments to render
*/
mw.LanguageToolDialog.prototype.renderRangeOfFragments = function ( range ) {
+ console.log( 'renderRangeOfFragments' );
var i, j, jlen, rects, $result, top;
this.$findResults.empty();
for ( i = range.start; i < range.end; i++ ) {
@@ -368,6 +378,7 @@
* @param {boolean} scrollIntoView Scroll the marker into view
*/
mw.LanguageToolDialog.prototype.highlightFocused = function ( scrollIntoView )
{
+ console.log( 'highlightFocused' );
var $result, rect, top,
offset, windowScrollTop, windowScrollHeight,
surfaceView = this.surface.getView();
@@ -510,6 +521,8 @@
// TODO: Get the language from VE's data model
lang = mw.config.get( 'wgPageContentLanguage' );
+ if( lang === 'en')
+ lang = 'en-US';
$.ajax( {
type: 'POST',
@@ -670,7 +683,7 @@
var range = selection.getRange();
console.log( range.start );
console.log( range.end );
-
+ var len = this.suggestionMapper.length;
for ( var i = 0; i < this.fragments.length; i++ ) {
if ( this.ranges[i].start <= range.start && range.end <=
this.ranges[i].end )
{
--
To view, visit https://gerrit.wikimedia.org/r/228278
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c0e394065b4772279edf6c1bd91a87f4bba5d05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LanguageTool
Gerrit-Branch: master
Gerrit-Owner: Ankita-ks <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits