Hi,
I'm running version 6.7.2 and I'm trying to hide element for anonymous but i'have problems with side bar and help button
( side bar width change during navigation )
here javascript used
<script type="text/javascript">
AJS.bind('init.rte', function() {
AJS.$('#notifyWatchers').attr('checked', false);
});
// désactive le workspace en public
AJS.toInit(function(){
if (AJS.params.remoteUser == ''){
AJS.$('#space-menu-link').hide();
AJS.$("#space-tools-menu-trigger").hide();
AJS.$("#more-menu").hide();
AJS.$('#action-menu-link').hide();
AJS.$('#comments-section').hide();
AJS.$('.help-menu-link-content').hide();
AJS.$('.ia-fixed-sidebar').hide();
AJS.$(".aui-iconfont-help").hide();
AJS.Confluence.Sidebar.toggle();
}
});
</script>
Thanks for your help
Or you can simulate the toggle event by this
AJS.$(".aui-sidebar-toggle").click()
@Xavier H the AJS.Confluence.Sidebar.toggle(); does not exist
What you can do is to use jQuery to hide those 2 elements
// Hide the left navigation bar and put the right panel to the right position
AJS.$("#nav-sidebar").css("display", "none")
AJS.$(".aui-page-panel").css("padding-left", "55px")
// Hide the top right help button
AJS.$("#help-menu-link").css("display", "none")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help and answer. works fine
AJS.Confluence.Sidebar.toggle(); works also
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What version of Confluence are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.