jenkins-bot has submitted this change and it was merged.
Change subject: Position the entry point when showing
......................................................................
Position the entry point when showing
Previously it was done using jQuery .toggle(),
which didn't run the position function.
Bug: T77969
Change-Id: Ib47c1f7464d5e72ef8da0241a204abfe83c37a34
---
M modules/entrypoint/ext.cx.entrypoint.js
1 file changed, 9 insertions(+), 1 deletion(-)
Approvals:
Pginer: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/entrypoint/ext.cx.entrypoint.js
b/modules/entrypoint/ext.cx.entrypoint.js
index 13b6889..39e2537 100644
--- a/modules/entrypoint/ext.cx.entrypoint.js
+++ b/modules/entrypoint/ext.cx.entrypoint.js
@@ -25,6 +25,8 @@
this.$titleInput = null;
this.$closeIcon = null;
+ this.shown = false;
+
this.init();
}
@@ -91,7 +93,11 @@
* Show or Hide the CX entry point dialog based on current state
*/
CXEntryPoint.prototype.toggle = function () {
- this.$dialog.toggle();
+ if ( this.shown ) {
+ this.hide();
+ } else {
+ this.show();
+ }
};
/**
@@ -99,6 +105,7 @@
*/
CXEntryPoint.prototype.show = function () {
this.$dialog.show();
+ this.shown = true;
this.position();
this.$titleInput.focus();
};
@@ -129,6 +136,7 @@
*/
CXEntryPoint.prototype.hide = function () {
this.$dialog.hide();
+ this.shown = false;
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/180347
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib47c1f7464d5e72ef8da0241a204abfe83c37a34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: KartikMistry <[email protected]>
Gerrit-Reviewer: Pginer <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits