mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
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:
parent
62b92e1c59
commit
0830e80c38
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue