Wednesday, July 23, 2014

How to reduce extra space between web parts in share point .

blog 3 :

hello everyone !


people working on share point 2013, have you ever noticed there is a extra space between two web parts ? 

annoying , isn't it !? well ,we have a solution for that. just a little CSS  code and you can reduce that extra space very easily. lets start !

Problem: reduce space/gap between two web parts. 


Solution :  


a. Add a content editor Web Part(CWEP) to your page. (if you don't know how to add content editor, click here)
b. paste the following code into the HTML Editor ,and you are done!



<style type="text/css">
     .ms-webpartPage-root {
         border-spacing: 0px !important;
     }
       .ms-webpartzone-cell {
         margin: 0px !important;
     }
</style> 

Sunday, July 13, 2014

Remove Left Navigation Panel SharePoint

hello again!

Some times we need to customize the SP site design according to customer requirements.hiding or removing the left navigation bar is one of them. following few simple steps will make it easier for you to do the same. So lets get started ! 


problem : hide / remove left navigation bar/ panel from share point site page.


solution

1. for Share Point 2010

a. Add a content editor Web Part(CWEP) to your page. (if you don't know how to add content editor, click here)

b. paste the following code into the HTML Editor.

//code

<Style> 
body #s4-leftpanel 
{ 
display: none; 
} 
.s4-ca 
{ 
margin-left: 0px; 
} 
</style> 
c. save and close. it's done !

2. for Share Point 2013


a. Add a content editor Web Part(CWEP) to your page. (if you don't know how to add content editor, click here)

b. paste the following code into the HTML Editor.

//code

<style>
.ms-core-sideNavBox-removeLeftMargin{ DISPLAY: none }
#contentBox { margin-left: 20px }
</style>
c. save and close. it's done !

cheers ! 

Tuesday, July 8, 2014

Change save button to Send - SharePoint list

*This post is for share point beginners.

You may come across the situation where  you need to customize share point form elements.

this is a workaround to change the default “Save” button to “submit” or any word, in the SharePoint list form such as NewForm.aspx without using info path or share point designer.


A]For Share Point 2010 1) In your URL box, after NewForm.aspx (or EditForm.aspx,) add this text: ?toolpaneview=2 Your url should look like "http://mysite.com/mylist/NewForm.aspx?toolpaneview=2"


2) Hit enter. The page will open in Shared editing mode. Choose "Add a Web Part" anywhere on the page.





3) Add a Content Editor Web Part(CEWP). In the Text Source of the Content Editor Web Part, paste the following code:


//code


<script type="text/javascript">

function changeOKButtons()
{
 var inputs = document.getElementsByTagName("input");
 for(i = 0; i<inputs.length; i++)
 {
  if(inputs[i].type == "button" && inputs[i].value == "OK")
   inputs[i].value = "Submit";
 }
}
_spBodyOnLoadFunctionNames.push("changeOKButtons");
</script>

4)save and close. it's done !



B]For Share Point 2013,

1) Open NewForm.aspx
2)click on Edit Page
3)Add a Content Editor Web Part
4)paste following code into it.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>  

<script>  
$(document).ready(function()  
{  
$("input[value$='Save']").attr('value', "Your text here");  
});  
</script>