From 0830e80c384a9fa5514b7a61868429622a38e1a5 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Thu, 23 Aug 2018 13:15:43 -0700 Subject: [PATCH] Hide section edit icons when unable to edit When unable to edit, the edit icon at the top of the page serves as the indicator that this is the case. In case of section edits we hide them. Bug: T197497 Change-Id: I23f196602ad64051426baf5090f0a6d6be941de8 --- resources/skins.minerva.editor/init.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/skins.minerva.editor/init.js b/resources/skins.minerva.editor/init.js index 0831923..c4dfa55 100644 --- a/resources/skins.minerva.editor/init.js +++ b/resources/skins.minerva.editor/init.js @@ -336,6 +336,16 @@ } } + /** + * Hide any section id icons in the page. This will not hide the edit icon in the page action + * menu. + * @method + * @ignore + */ + function hideSectionEditIcons() { + currentPage.$( '.edit-page' ).hide(); + } + /** * Setup the editor if the user can edit the page otherwise show a sorry toast. * @method @@ -347,6 +357,7 @@ setupEditor( currentPage ); } else { updateEditPageButton( false ); + hideSectionEditIcons(); showSorryToast( editErrorMessage ); } }