jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/332367 )
Change subject: Also convert `find( '#' + ... )` to use [id="..."] type of selector. ...................................................................... Also convert `find( '#' + ... )` to use [id="..."] type of selector. Bug: T154279 Change-Id: I10f1e60bd4492f55494415714dac433cb60a7bdc --- M modules/tools/ext.cx.tools.images.js M modules/translation/ext.cx.translation.loader.js 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Santhosh: Looks good to me, approved diff --git a/modules/tools/ext.cx.tools.images.js b/modules/tools/ext.cx.tools.images.js index aa6379e..6f121b0 100644 --- a/modules/tools/ext.cx.tools.images.js +++ b/modules/tools/ext.cx.tools.images.js @@ -125,7 +125,7 @@ } $sourceSection = mw.cx.getSourceSection( $section.data( 'source' ) ); - $sourceImage = $sourceSection.find( '#' + imageId ); + $sourceImage = $sourceSection.find( '[id="' + imageId + '"]' ); $image.on( 'click', function ( event ) { // Avoid opening images by clicking. event.preventDefault(); diff --git a/modules/translation/ext.cx.translation.loader.js b/modules/translation/ext.cx.translation.loader.js index 5bc958a..e93e634 100644 --- a/modules/translation/ext.cx.translation.loader.js +++ b/modules/translation/ext.cx.translation.loader.js @@ -408,7 +408,7 @@ // Get new section so that we can annotate the section to indicate it // was restored from draft, so that certain adaptations can be skipped. - $section = this.$translationColumn.find( '#' + targetSectionId ); + $section = this.$translationColumn.find( '[id="' + targetSectionId + '"]' ); $section.attr( { 'data-cx-draft': true, 'data-source': sourceSectionId -- To view, visit https://gerrit.wikimedia.org/r/332367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I10f1e60bd4492f55494415714dac433cb60a7bdc Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits