Wednesday, January 8, 2014

Shared With and SHARE issues


I recently was requested to hide all instances of the Shared With pop up window from users. The client did not want anyone to see the names of admins and other individuals that had direct permissions.

There are 2 ways to hide, one using straight CSS and another manipulating via jQuery.


Using CSS
We found this here: .li > text."Shared With"

/*Hiding the SharedWith stuff */
.js-callout-sharedWithInfo{
display:none !important;
}

Using jQuery

$('.js-callout-sharedWithInfo').css('display','none');

        <script type="text/javascript">
        $(document).ready(function(){
                $('.js-callout-sharedWithInfo').css('display','none');
                });

        </script>

Along the same lines, we wanted to have the Send an Email link that is checked by default to be unchecked.

In order to void your warranty and change the default behavior of the SharePoint SHARE feature to UNCHECK the Send Email box...
Note that a PU or a CU may overwrite this file at anytime...which is what I sort of mean by "void your warranty".

Go to the file...
C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\actinv.aspx

And change changed the Checked="true" to Checked="false" 

<div class="ms-core-form-subsection">
<asp:CheckBox
runat="server"
id="chkSendEmailv15"
Checked="true"
class = "ms-aclinv-checkbox"
OnClick="UpdateSendEmailMessage()"/>
<label for=<%SPHttpUtility.WriteAddQuote(SPHttpUtility.NoEncode(chkSendEmailv15.ClientID),this.Page);%>>
<SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,aclinv_SendEmailCheckboxv15%>" EncodeMethod='HtmlEncode'/>
</label>

No comments:

Post a Comment