2

I am working on an enterprise wiki library, but when the user navigates to "My submission" view, he sees the "new document or drag files here" link instead of "add new page". Shown below:

enter image description here

Is there a way to hide this link? I do not want users to add documents directly without being inside a wiki page.

4

Probably the most simple option would be just to hide List View Toolbar

  • Open the page in Edit Mode
  • Go to XLV web part properties and specify Toolbar Type: No Toolbar

enter image description here

enter image description here

That's it.

P.S. Of course, you could accomplish the same task using CSS or JavaScript , but what for..

  • 1
    I want to remove " or drag files here" and keep the "new document" link. How can I accomplish this? – SearchForKnowledge Jul 7 '15 at 19:18
1

Edit the page and add the following CSS inside the content editor webpart:

td.ms-list-addnew {
    display: none;
}
  • 1
    I want to remove " or drag files here" and keep the "new document" link. How can I accomplish this? – SearchForKnowledge Jul 7 '15 at 19:18
0

This is may be old post but I am posting it if it helps for others.

  1. Disable Drag and drop functionality
  2. Remove "or drag files here" from the +new document or drag files here.

use the below script by adding to each page as script editor or add it to master page.

  <script type="text/javascript" src="http://code.jquery.com/jquery-
      1.11.1.min.js">
    </script>
<script type="text/javascript">
   ExecuteOrDelayUntilScriptLoaded(function() {
   g_uploadType = DragDropMode.NOTSUPPORTED;
   SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED;
   }, "DragDrop.js");

   $(document).ready(function(){
     if($(".ms-list-addnew span:eq(1)").text()=="new document"){
      $(".ms-list-addnew span:eq(1)").closest("td").html(function(index,oldhtml){ return oldhtml.replace('or drag files here',''); }); }});
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.