Avoid deprecated View.$

Replace with View.$el.find.

Bug: T216264
Change-Id: I78045c410c168bf458ab8f5537036711fc5b577c
This commit is contained in:
Ed Sanders 2019-02-15 19:04:11 +00:00
parent b45c46eef9
commit eeebb86270
6 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@
* @instance
*/
enableLogging: function () {
this.$( 'a' ).on( 'click', function () {
this.$el.find( 'a' ).on( 'click', function () {
var $link = $( this ),
eventName = $link.data( 'event-name' );
if ( eventName ) {

View File

@ -19,7 +19,7 @@
template: mw.template.get( 'skins.minerva.scripts', 'IssueNotice.hogan' ),
postRender: function () {
View.prototype.postRender.apply( this, arguments );
this.$( '.issue-notice' ).prepend( this.options.issue.icon.$el );
this.$el.find( '.issue-notice' ).prepend( this.options.issue.icon.$el );
}
} );
M.define( 'skins.minerva.scripts/IssueNotice', IssueNotice );

View File

@ -29,7 +29,7 @@
heading: '<strong>' + headingText + '</strong>'
} );
overlay.$( '.overlay-content' ).append(
overlay.$el.find( '.overlay-content' ).append(
new IssueList( issues ).$el
);
return overlay;

View File

@ -44,7 +44,7 @@
issueSummaries = [];
if ( section === KEYWORD_ALL_SECTIONS ) {
$metadata = page.$( selector );
$metadata = page.$el.find( selector );
} else {
// find heading associated with the section
$metadata = page.findChildInSectionLead( parseInt( section, 10 ), selector );
@ -163,7 +163,7 @@
if ( newTreatmentEnabled ) {
// parse other sections but only in group B. In treatment A no issues are shown
// for sections.
page.$( Page.HEADING_SELECTOR ).each( function ( i, headingEl ) {
page.$el.find( Page.HEADING_SELECTOR ).each( function ( i, headingEl ) {
var $headingEl = $( headingEl ),
sectionNum = $headingEl.find( '.edit-page' ).data( 'section' );

View File

@ -19,7 +19,7 @@
* @private
*/
function onSkinClick( ev ) {
var $target = this.$( ev.target );
var $target = $( ev.target );
// Make sure the menu is open and we are not clicking on the menu button
if (

View File

@ -94,7 +94,7 @@
* @param {Page} page
*/
function setup( page ) {
var $refs = page.$( 'sup.reference a' );
var $refs = page.$el.find( 'sup.reference a' );
if ( $refs.length ) {
$refs