Showing posts with label 'Add New Discussion. Show all posts
Showing posts with label 'Add New Discussion. Show all posts

July 23, 2013

How to Add button in sharepoint 'Add New Item' / ‘Add new Announcment’ / ‘Add Document’ / 'Add New Discussion' list libraries on Top of defailt view / Top



I have goggled about this, found so many blogs but nothing worked as I was expecting, finally found my own successful way to 'Add New Item' / ‘Add new Announcement’ / ‘Add Document’ / 'Add New Discussion' to all list and libraries in SharePoint on Top of page. 


 var addButton = $(this).find("td.ms-addnew").html();  
 if(addButton != null)  
 {   
  $("div#WebPartWPQ2 td:first").prepend("<div style='margin-top: 12px;'>&nbsp;&nbsp;&nbsp;"+addButton+"<br/><br/></div><div class='ms-partline' ColSpan='2'></div>");   
 }   


for detailed code and step by step screenshots documents can be found here


------------------------------------------

and if you want To Hide Add New Item link button in sharepoint 2010 list of library
below information source : Raviraj
On home page add lists/libraries that you want and then select edit webpart and set toolbar 

type to "No Toolbar".
Or you can add style:

.ms-addnew{
 display:none;
}


on home page.
Make sure that ribbon is hidden
or try this on home page.

.ms-cui-row-onerow{
 display:none;
}




--
Regards,
Praveen Pandit