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
This commit is contained in:
jdlrobson 2018-08-23 13:15:43 -07:00
parent 62b92e1c59
commit 0830e80c38
1 changed files with 11 additions and 0 deletions

View File

@ -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 );
}
}