Welcome to MSDN Blogs Sign in | Join | Help

Eric Kraus' SharePoint/.NET Blog

What the field says about MOSS.

News

  • Subscribe to this blog


    Eric Kraus on Live Messenger




      Disclaimer
      These postings are provided "AS IS" with no warranties and confer no rights. In addition, these postings are my own and do not represent the views of Microsoft.
    Disabling Enterprise Feature Buttons

    I discovered a while back that it is not possible to hide the Enterprise Features “Features” because they have Activation Dependencies.  You can see more on what these features include in this post:  Enterprise Features Exposed.

    In a conversation this afternoon, I was talking through this concept again and thought that if disabling the feature wasn’t possible, at least I could hide the button on the page.

    So, I did a view source on the page and pulled the control ID (for which for 99% of the SharePoint sites out there will be the same).  Then, I added a simple style to the application.master page in “12 Hive\TEMPLATE\LAYOUTS” which serves ManageFeatures.aspx page.

    <script language=”javascript”>
         var siteCollectionFeatureButton = ‘ctl00_PlaceHolderMain_featact_rptrFeatureList_ctl03_btnActivate’;
        
         var siteFeatureButton = ‘ctl00_PlaceHolderMain_featact_rptrFeatureList_ctl17_btnActivate’;

         var featureButton = document.getElementById(siteCollectionFeatureButton);
         featureButton.style.visibility = “hidden”;

         featureButton = document.getElementById(siteFeatureButton);
         featureButton.style.visibility = “hidden”;
    </script>


    hidingEnterprise

    Whether hiding to prevent activation or deactivation, both will still be possible via object model and stsadm.exe

    Posted: Monday, February 23, 2009 6:13 PM by ekraus
    Anonymous comments are disabled
    Page view tracker