Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Hiding Custom List Library?

  Asked By: Traci    Date: Jun 21    Category: Sharepoint    Views: 966

i have a requirement to remove all drop down menu items on a
list. Have added Javascript to CEWP, and some items work, and other
don't. Have used dom inspector and still no luck. For example this
works:

<script>

function runOnLoad(){
try
{
if( ctx )
{
if( ctx.listBaseType == 1 )
{
var tables = document.getElementsByTagName("table");
for(var i=0; i< tables.length; i++)
{
if( tables[i].id.indexOf("zz24_ListActionsMenu") > 0 )
{
var elm = tables[i];
elm.parentElement.parentElement.style.display="none";
elm.parentElement.parentElement.nextSibling.style.display="none";
}
}


}
}
}
catch(e){}


}
_spBodyOnLoadFunctionNames.push("runOnLoad");


</script>


NewMenu and UploadMenu work fine. Using the same for actions and
settings (ListActionsMenu, ListSettingsMenu) have no effect. Any idea
what is wrong or is there another way to get rid of them on a per list
basis?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Shobhana R.     Answered On: Jun 21

If you mean you want to remove  the toolbar from the allItems.aspx page then the
best way to do this would be to edit the page in SharePoint Designer and replace
the default ListView web part with a DataForm web part. Then using the
properties of the webpart turn off the display of the Toolbar.

 
Didn't find what you were looking for? Find more on Hiding Custom List Library? Or get search suggestion and latest updates.




Tagged: