jenkins-bot has submitted this change and it was merged.
Change subject: Do not show the formater card if the section is not editable
......................................................................
Do not show the formater card if the section is not editable
Change-Id: Ic4a3720c383e6e76c4678897719e384570e6aace
---
M modules/tools/ext.cx.tools.formatter.js
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/tools/ext.cx.tools.formatter.js
b/modules/tools/ext.cx.tools.formatter.js
index abdf87f..f43f4b6 100644
--- a/modules/tools/ext.cx.tools.formatter.js
+++ b/modules/tools/ext.cx.tools.formatter.js
@@ -193,8 +193,11 @@
FormatTool.prototype.start = function ( section ) {
this.$section = section.jquery ? section : getParentSection();
- if ( this.$section.is( 'h1, h2, h3, h4, h5, h6, figure, table'
) ) {
+ if ( this.$section.is( 'h1, h2, h3, h4, h5, h6, figure, table'
) ||
+ !this.$section.is( '[contenteditable="true"]' )
+ ) {
// Do not show formatting tool for headers, figures and
tables.
+ // Or if the field is not editable.
this.stop();
return;
}
--
To view, visit https://gerrit.wikimedia.org/r/313361
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4a3720c383e6e76c4678897719e384570e6aace
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits