cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Leave Button 4.2f

franc_d_m
Champ in-the-making
Champ in-the-making
Hi,
i recently install my alfresco 4.2f and i want that in my site the user cant leave the site,
i try to follow this guide

http://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/how-can-i-disable-...

but in this version of alfresco this file is different.

can anyone help me??
2 REPLIES 2

niketapatel
Star Contributor
Star Contributor
Hi

In newer version, header menu implementation has been changed.

You can find header webscript at - share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\share\header\share-header.get.desc.xml

And this Leave site option is also included in this script. For detail please check - share-header.lib.js located at share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\share\imports

And search for id - "HEADER_LEAVE_SITE". Basically site menu is getting generated from this function getTitleBarModel()

You can hide/show header menu from here and how you can customize this header menu item, Please check Dave Draper blog
http://blogs.alfresco.com/wp/developer/2013/09/16/customizing-the-share-header-part-3/

There was bug while removing menu item, I am not sure if its resolved in 4.2f you can check it.

Hope it helps.

Thanks!!
in this file

share-header.lib.js located at share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\share\imports

so my goal was dont allow user to leave site and comment this part
else if (siteData.userIsMember)
         {
            // If the user is a member of a site then give them the option to leave…
           /* siteConfig.config.widgets.push({
               id: "HEADER_LEAVE_SITE",
               name: "alfresco/menus/AlfMenuItem",
               config: {
                  id: "HEADER_LEAVE_SITE",
                  label: "leave_site.label",
                  iconClass: "alf-leave-icon",
                  publishTopic: "ALF_LEAVE_SITE",
                  publishPayload: {
                     site: page.url.templateArgs.site,
                     siteTitle: siteData.profile.title,
                     user: user.name,
                     userFullName: user.fullName
                  }
               }
            });*/
         }
its work!!


now in the same way ill try to remove in header my files and shared file

Thanks!!