Unplanned
Last Updated: 25 Apr 2022 12:24 by Carl
Carl
Created on: 25 Apr 2022 12:24
Category: Upload
Type: Feature Request
4
Add an option to disable DropZone of Upload

Currently, the DropZone is always rendered around the Telerik UI Upload widget and there is no built-in option that can be used in order to not render the DropZone. 

In order to hide the DropZone, the following is required:

<style>
     #wrapper {
       display: inline-block;
     }

     .k-upload {
       border-width: 0;
     }

     .k-upload .k-dropzone {
       padding: 0;
     }

     .k-upload-status-total {
       display: none;
     }
   </style>
<script>
    $(document).ready(function() {
      //Removing the "Drop files here message"
      $("#files").closest(".k-upload").find(".k-dropzone em").remove();
    });
  </script>

However, if Boostrap is used, additional steps are needed - all the necessary classes should be returned accordingly:

<script>
  $("#files").ready(function(){
       $("#files").closest(".k-dropzone").removeClass("k-dropzone").addClass("form-control").addClass("col-md-3");
   });
</script>

 

 

 

0 comments