Merge "Hide section edit icons when unable to edit"

This commit is contained in:
jenkins-bot 2018-08-27 13:04:54 +00:00 committed by Gerrit Code Review
commit 9dfe22ee8d
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 );
}
}