質問する質問する
 

質問Customaction Menu

  • 2009年7月3日 14:07PuttaRavi ユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダル
     


    Dear All,

    I have created ECB menu through content Editor web part....the content editor web parts contain below code....

    below code is working fine...but it menu is appearing for all type of document library(ex:folder,word,excel sheets and text files...etc.,).but i need only on excel sheet document libraries. how can i disable ECB menu where it's not requiered to display at all. please help me out...

    Source code:
    <script language="javascript">

    function Custom_AddDocLibMenuItems(m, ctx)
    {
     var currentItemFileUrl=null;
     var currentItemFSObjType=null;

     if (currentItemFileUrl == null)
     currentItemFileUrl = itemTable.ServerUrl;
     if (currentItemFSObjType == null)
     currentItemFSObjType = itemTable.FSObjType;

     if( currentItemFSObjType !=1 )
     {

     var strAction = 'window.navigate("http://xxx/xxx/Flat1.aspx?RootFolder="+  ReplaceURL(currentItemFileUrl))'

     var strImagePath = ctx.imagesPath+"III16.GIF";
     var strDisplayText = "Discussion/Comments board";

     CAMOpt(m, strDisplayText, strAction, strImagePath);
     CAMSep(m);

     strImagePath = ctx.imagesPath+"RECURMTG.GIF"
     strAction = 'window.navigate("http://xxx/xxx/AssignPublicView.aspx")'
     CAMOpt(m, "Publish to public", strAction,strImagePath);
     CAMSep(m);
     }
      return false;
    }
     
    </script>

    Thanks in advance....


    Ravichandran.K Bangalore

すべての返信