• 使用JS隐藏MOSS菜单


            hideListViewToolbarItems("Edit in Datasheet", "export to Spreadsheet","view rss feed", "settings:create view");

            function hideListViewToolbarItems() {
                /// <summary>  
                /// By : Ayman M. El-Hattab ( ayman.elhattab@gmail.com )  
                /// http://ayman-elhattab.blogspot.com  
                /// </summary>  

                var menuItem;
                var menuItemName;
                var menuItemIndex = -1;
                var menuItemNames = new Array("edit in datasheet",
                                                "open with windows explorer",
                                                "connect to outlook", 'export to spreadsheet', 'view rss feed', 'alert me'
                                                , "create column", "settings:create view", "list settings",
                                                "document library settings", "explorer view", "all documents",
                                                "all items", "modify this view",
                                                "view:create view", "new document",
                                                "new item", "new folder", "upload document",
                                                "upload multiple documents");
                var menuItems = new Array("EditInGridButton",
                                          "OpenInExplorer", "OfflineButton",
                                          "ExportToSpreadsheet", "ViewRSS",
                                          "SubscribeButton", "AddColumn",
                                          "AddView", "ListSettings", "ListSettings",
                                          "View1", "DefaultView",
                                          "DefaultView", "ModifyView", "CreateView",
                                          "New0", "New0",
                                          "NewFolder", "Upload", "MultipleUpload");

                var allMenuItems = document.getElementsByTagName('ie:menuitem');
                for (var i = 0; i < hideListViewToolbarItems.arguments.length; i++) {
                    menuItemName = hideListViewToolbarItems.arguments[i].toLowerCase();
                    for (j = 0; j < menuItemNames.length; j++) {
                        if (menuItemNames[j] == menuItemName) {
                            menuItemIndex = j;
                            break;
                        }
                    }

                    menuItem = menuItems[menuItemIndex];

                    for (var l = 0; l < allMenuItems.length; l++) {
                        if (menuItemName.indexOf(":") != -1) {
                            menuItemName = menuItemName.split(":")[1];
                        }
                        if (allMenuItems[l].id.indexOf(menuItem) != -1
                    && allMenuItems[l].text.toLowerCase() == menuItemName) {
                            // For FireFox Compatibility  
                            var parentNodeOfMenuItem = allMenuItems[l].parentNode;
                            parentNodeOfMenuItem.removeChild(allMenuItems[l]);
                            break;
                        }
                    }
                }
            }

    引用至http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/4a570949-ba31-4347-9f89-210476b54dfe 
     

  • 相关阅读:
    mysql 基本操作
    ZooKeeper服务-数据模型
    DataX-HDFS(读写)
    DataX-MySQL(读写)
    DataX的安装
    ZooKeeper-znode概念与使用
    ZooKeeper-安装和运行
    HBase-存储-KeyValue格式
    HBase-存储-HFile格式
    HBase-存储-文件存储结构、拆分、合并
  • 原文地址:https://www.cnblogs.com/ceci/p/2567751.html
Copyright © 2020-2023  润新知