jenkins-bot has submitted this change and it was merged.
Change subject: Enable the Publish button for retrying after a publishing
failure
......................................................................
Enable the Publish button for retrying after a publishing failure
When a publishing error happens, the Publish button is disabled.
This behavior is not correct since the error message says:
"Publishing failed, please retry". To retry publishing, the button
must be enabled.
Change-Id: I54aa727872620ccc1774b981fc64503509efd171
---
M modules/publish/ext.cx.publish.js
1 file changed, 12 insertions(+), 2 deletions(-)
Approvals:
Amire80: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/publish/ext.cx.publish.js
b/modules/publish/ext.cx.publish.js
index e8305bd..2ff31eb 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -70,8 +70,6 @@
self.onFail( 'cxpublish', response.cxpublish );
} ).fail( function ( code, details ) {
self.onFail( code, details );
- } ).always( function () {
- self.$trigger.prop( 'disabled', true ).text(
mw.msg( 'cx-publish-button' ) );
} );
} );
};
@@ -280,6 +278,12 @@
);
mw.cx.dirty = false;
+
+ // Disable the Publish button
+ // and change its label back from "Publishing..." to "Publish"
+ this.$trigger
+ .prop( 'disabled', true )
+ .text( mw.msg( 'cx-publish-button' ) );
};
/**
@@ -307,6 +311,12 @@
mw.hook( 'mw.cx.error' ).fire( mw.msg( 'cx-publish-page-error'
) );
mw.log( '[CX] Error while publishing:', code, trace );
+
+ // Enable the Publish button to allow retrying,
+ // and set the label back to "Publish"
+ this.$trigger
+ .prop( 'disabled', false )
+ .text( mw.msg( 'cx-publish-button' ) );
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/227405
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I54aa727872620ccc1774b981fc64503509efd171
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits