Santhosh has uploaded a new change for review.

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


Change subject: (Bug 46567) Saving again discards the correction
......................................................................

(Bug 46567) Saving again discards the correction

Disable the save button till previous save is done.

Change-Id: If3e85bb64109ed2c2f577f2cc67cd3e4e03e59b4
---
M resources/js/ext.translate.editor.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/79/56579/1

diff --git a/resources/js/ext.translate.editor.js 
b/resources/js/ext.translate.editor.js
index 3837b0a..ed130fe 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -390,8 +390,9 @@
                                }
 
                                $saveButton.text( mw.msg( 
'tux-editor-save-button-label' ) );
-                               // When there is content in the editor
-                               if ( $.trim( $textArea.val() ) ) {
+                               // When there is content in the editor enable 
the button.
+                               // But do not enable when some saving is not 
finished yet.
+                               if ( $.trim( $textArea.val() ) && 
!translateEditor.saving ) {
                                        $pasteSourceButton.addClass( 'hide' );
                                        $saveButton.prop( 'disabled', false );
                                } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/56579
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3e85bb64109ed2c2f577f2cc67cd3e4e03e59b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to