Merge "Hide section edit icons when unable to edit"
This commit is contained in:
commit
9dfe22ee8d
|
@ -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.
|
* Setup the editor if the user can edit the page otherwise show a sorry toast.
|
||||||
* @method
|
* @method
|
||||||
|
@ -347,6 +357,7 @@
|
||||||
setupEditor( currentPage );
|
setupEditor( currentPage );
|
||||||
} else {
|
} else {
|
||||||
updateEditPageButton( false );
|
updateEditPageButton( false );
|
||||||
|
hideSectionEditIcons();
|
||||||
showSorryToast( editErrorMessage );
|
showSorryToast( editErrorMessage );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue