Search This Blog

Thursday, November 26, 2015

Hiding Action From ECB Menu and Find Event On Click Of Library Item Text

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<style type="text/css">
/*.js-callout-actionsMain span > span:nth-child(1),*/
.js-callout-actionsMain span > span:nth-child(2),
.js-callout-actionsMain span > span:nth-child(3)
{
display: none;
}

.ms-core-menu-link[title="Compliance Details"],
.ms-core-menu-link[title="Workflows"],
.ms-core-menu-link[title="View Workflow History"],
.ms-core-menu-link[title="Schedule Workflows"],
.ms-core-menu-link[title="Alert me"],
.ms-core-menu-link[title="Shared With"] {
    display: none;
}
</style>


<script type="text/javascript">


$(document).ready(function(){

$("div.itx a[class=ms-listlink]").click(function(){
      var folderUrl = $(this).attr("href");
     
     // alert(folderUrl);
   
     // var url = folderUrl.split('&')[0].replace(/%2F/g,'/').replace(/%20/g, '/');
      var url = folderUrl.split('&')[0].replace(/%2F/g,'/');
     // alert(url);
      //var spliturl=url.split('=/')[1];
     // alert(spliturl);
     // var finalfolderPath=spliturl.replace(/\//g, ">");
   
      //alert(finalfolderPath);
      //localStorage.setItem("DefaultVDRfolderpath", finalfolderPath);
      //sessionStorage.setItem("DefaultVDRfolderpath", finalfolderPath);
      // Session["Slot"] = finalfolderPath;
       sessionStorage.removeItem('TreeNode');
       sessionStorage.setItem("TreeNode", url );
      
});
  
});


/*
function refreshPage()
{
    window.parent.location = document.referrer;
}*/
</script>

<link rel="stylesheet" type="text/css" href="/Style%20Library/VDRView.css" />
<script  type="text/javascript" src="/Style%20Library/VDRView.js"></script>


No comments:

Post a Comment