Drag and Drop Archives : Binary Bits https://blog.binarybits.net/tag/drag-and-drop/ Bits & Pieces - A blog by Kannan Balasubramanian Tue, 12 Dec 2017 06:20:53 +0000 en-GB hourly 1 https://wordpress.org/?v=6.5.2 Sharepoint disable drag and drop https://blog.binarybits.net/sharepoint-disable-drag-drop/ https://blog.binarybits.net/sharepoint-disable-drag-drop/#respond Tue, 12 Dec 2017 06:20:16 +0000 https://blog.binarybits.net/?p=970 In some scenarios we might need to disabled drag and drop in SharePoint sites. The following code works when we need to disable a page with one document view. Add the html code in content editor web part where the document view is there. <style type="text/css"> /*-- Hide Drag & Drop --*/ caption.ms-dragDropAttract { caption-side: […]

The post Sharepoint disable drag and drop appeared first on Binary Bits.

]]>
In some scenarios we might need to disabled drag and drop in SharePoint sites.

The following code works when we need to disable a page with one document view.

Add the html code in content editor web part where the document view is there.

<style type="text/css">
    /*-- Hide Drag & Drop --*/    
    caption.ms-dragDropAttract {
        caption-side: bottom;
        display: none !important;
    }
</style>

<script type="text/javascript">
    /*-- Stop Drag & Drop --*/
    ExecuteOrDelayUntilScriptLoaded(function() {
        g_uploadType = DragDropMode.NOTSUPPORTED;
        SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED;
        SPDragDropManager.DargDropMode.style.display = "none";
    }, "DragDrop.js");
</script>

For pages with multiple document libraries when you want to target a specific library prepend the id of the web part div and an underscore e.g. WebPartWPQ4_

#WebPartWPQ4_ms-dnd-dropbox{ display: none !important; }

Source: https://sharepoint.stackexchange.com/questions/82805/how-can-i-disable-the-document-library-drag-and-drop-function

The post Sharepoint disable drag and drop appeared first on Binary Bits.

]]>
https://blog.binarybits.net/sharepoint-disable-drag-drop/feed/ 0