Nikerabbit has uploaded a new change for review. ( 
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(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/67/332367/1

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..db1bb57 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: newchange
Gerrit-Change-Id: I10f1e60bd4492f55494415714dac433cb60a7bdc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to