jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Follow up "Show edit pencils on all headings" ......................................................................
Hygiene: Follow up "Show edit pencils on all headings" * Restrict it to article namespace (e.g. doesn't work properly in File NS) * Don't show edit pencils for toggleable sections Follow up: I8d8d47cd608d59fb1723758106547f1ab137daa2 Change-Id: Ied41432806bcf72542cd69484df4f2e64328d28f --- M javascripts/modules/editor/init.js 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/modules/editor/init.js b/javascripts/modules/editor/init.js index 3785a0e..f8dcd4a 100644 --- a/javascripts/modules/editor/init.js +++ b/javascripts/modules/editor/init.js @@ -124,8 +124,8 @@ * @param {Page} page The page to edit. */ function setupEditor( page ) { - var isNewPage = page.options.id === 0, - $editPencils = $( '.edit-page' ); + var isNewPage = page.options.id === 0; + if ( query.undo ) { window.alert( mw.msg( 'mobile-frontend-editor-undo-unsupported' ) ); } @@ -203,13 +203,13 @@ } } - // enable all edit pencils on the page (not only toggleable sections) except for the main + // enable all edit pencils in sub-sections for the article namespace except for the main // page, the pencils are unstyled there, see bug T89559 // FIXME: Merge this with the line under it after main page special handling is killed - if ( !mw.config.get( 'wgIsMainPage' ) ) { - $editPencils.show(); + if ( !mw.config.get( 'wgIsMainPage' ) && currentPage.getNamespaceId() === 0 ) { + $( '.in-block>.edit-page' ).show(); } - $editPencils.on( 'click', function ( ev ) { + $( '.edit-page' ).on( 'click', function ( ev ) { // prevent folding section when clicking Edit ev.stopPropagation(); } ); -- To view, visit https://gerrit.wikimedia.org/r/192187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ied41432806bcf72542cd69484df4f2e64328d28f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> Gerrit-Reviewer: Phuedx <g...@samsmith.io> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits