Tuesday, 9 April 2013

SharePoint - 2010 Add the Header Name in DIV in MOSS 2010

<div class="my-customdiv">
Growth & Business Planning Proposal</div><style>.my-customdiv{
background-color: #4ba614;
border-bottom: 4px #FFF solid;
text-align: left;
color: #FFF;
font-size: 10pt;
font-weight: bold;
padding: 10px;
height: 30px;}

</style>

SharePoint 2010-2013 Best Link

SharePoint 2010 – Base CSS classes / names

SharePoint 2010 – How to open PopUp Dialog in SharePoint Site ?

<script type="text/javascript">

// function OpenWindow(title, url) {// // var options = { url: url, width: 1000, height: 800, title: title };// SP.UI.ModalDialog.showModalDialog(options); // return false;// }
//User Defined Function to Open Dialog Frameworkfunction OpenDialog(strPageURL) {
var dialogOptions = SP.UI.$create_DialogOptions();dialogOptions.url = strPageURL;
// URL of the PagedialogOptions.width = 750; // Width of the DialogdialogOptions.height = 500; // Height of the Dialog// dialogOptions.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback); // Function to capture dialog closed eventSP.UI.ModalDialog.showModalDialog(dialogOptions); // Open the Dialogreturn false;}

// Dialog close event capture functionfunction CloseCallback(strReturnValue, target) {
if (strReturnValue === SP.UI.DialogResult.OK) // Perform action on Ok.{
alert(
"User clicked Ok!");}

if (strReturnValue === SP.UI.DialogResult.cancel) // Perform action on Cancel.{
alert(
"User clicked Cancel!");}
}
 

</script>

//Open at OnClientclick event
<td align="left" colspan="4"><asp:Button ID="btnRemarksHistory" runat="server" Text="Remarks" CssClass="sbtn"OnClientClick="return OpenDialog('/_Layouts/GrowthApp/GrowthRemarks.aspx');" /> <%
--OnClick="btnRemarksHistory_Click"--%></td>

Yaah

//Open at OnClick event
<td align="left" colspan="4">
<asp:Button ID="Button1" runat="server" Text="Remarks" CssClass="sbtn"OnClick="btnRemarksHistory_Click"/>  </td>protected void btnRemarksHistory_Click(object sender, EventArgs e){

string str = SPContext.Current.Site.Url;
btnRemarksHistory.Attributes.Add(
"onclick", "return OpenDialog('/_layouts/GrowthApp/GrowthRemarks.aspx')");
}

SharePoint 2010 – How to hide/remove the recycle bin and view all site contents?

    <style type="text/css"> 
    .s4-specialNavLinkList
    {
      display:none !important;
    } 
    </style>