Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/192187
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, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/87/192187/1 diff --git a/javascripts/modules/editor/init.js b/javascripts/modules/editor/init.js index 3785a0e..76ab1cb 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' ) ); } @@ -206,10 +206,10 @@ // enable all edit pencils on the page (not only toggleable sections) 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: newchange Gerrit-Change-Id: Ied41432806bcf72542cd69484df4f2e64328d28f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits