zoukankan      html  css  js  c++  java
  • Disable the Upload Multiple Document option in Document Library

    So many people trying to enable and you want to disable... 

    <1>
    Central Administration > Application Management > Authentication Providers > Edit Authentication
    Put "Enable Client Integration?" as No.
    Client Integration:Disabling client integration will remove features which launch client applications. Some authentication mechanisms (such as Forms) don't work well with client applications. In this configuration, users will have to work on documents locally and upload their changes.  


    With this you will disable activeX options and others like connect to outlook and connecto to Access. 

    <2>
    Open sharepoint designer, open you sharepoint site, open you list or document library, open upload.aspx file and hide code that call multiple upload link.
    Edit the file upload page in FrontPage.
    Switch to Code view.
    Modify the function EnsureUploadCtl to return 0;.
    function EnsureUploadCtl()
    {
     return 0;
    }

    <3>
    The quickest way to hide multiple upload option from users for ALL document library is through css. 
    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\STYLES/Core.css
    Add #ctl00_PlaceHolderMain_ctl01_ctl02_UploadMultipleLink { display: none } to your custom css will hide the Multiple Upload link.

    I am not too sure about the scenario that you may need. But just for a fun purpose i though if we have multiple file upload menu then what to do with single file upload menu, anyways you can upload the single file with multiple file upload menu.

    I though let me hide that manu just for a fun purpose.

    (1) Add content editor webpart on AllItems.aspx of your document library.
    (3) Open Source editor
    (4) Paste the following lines of code and see, your single upload will get disabled

    <script type="text/javascript">
    function GetElementByText(tagName, title)
    {
    var a = document.getElementsByTagName(tagName);

    for (var i=0; i < a.length; i++)
    {
    if (a[i].text)
    {
    if (a[i].text === title)
    {
    return a[i];
    }
    }
    }

    return null;
    }

    if (window.onload)
    {
    var oLoad = window.onload;
    window.onload = function bodyLoad()
    {
    oLoad();

    var o = GetElementByText("ie:menuitem","Upload Document");
    if (o)
    {
    o.disabled = true;
    }
    }
    }
    </script>

    That's it. Your job is done.

    <5>
    The 'Toolbar Manager' feature on CodePlex<http://www.codeplex.com/features>
    关于作者: 王昕(QQ:475660) 在广州工作生活30余年。十多年开发经验,在Java、即时通讯、NoSQL、BPM、大数据等领域较有经验。
    目前维护的开源产品:https://gitee.com/475660
  • 相关阅读:
    token是什么?和session什么区别,怎么用
    HashTable详解
    Cookie和Session的区别
    测试基础面试题
    什么是回归测试?回归测试的主要目的是什么?
    每天一个linux常用命令--ls 和 -ll 有什么区别?
    python中6个序列的内置类型分别是什么,列表和元组的异同有哪些
    今天去面试自动化测试,被几个问题问住了,记录下
    python排序算法-冒泡和快速排序,解答阿里面试题
    Myeclipse使用积累
  • 原文地址:https://www.cnblogs.com/starcrm/p/1561852.html
Copyright © 2011-2022 走看看