This is a migrated thread and some comments may be shown as answers.

How to control the visibility of default buttons

1 Answer 473 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Kozachenko
Top achievements
Rank 1
Kozachenko asked on 17 Apr 2018, 03:13 PM

My upload control creates in angularJS controller as following:

_createUploader(inputName, initialFiles, asyncSettings, onCompleteHandler){
    return $('#' + inputName).kendoUpload({
        async: asyncSettings,
        complete: onCompleteHandler,
        files: initialFiles
    })
}

 

But there are some buttons, which I want to hide or show (upload and pause)

https://snag.gy/uNVepn.jpg
https://snag.gy/AkRuzj.jpg

How I can control visibility of these buttons

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 19 Apr 2018, 10:24 AM
Hello Vitalii,

The Upload does not have configuration options that allow you to set the visibility of the "Upload" and "Pause" buttons. They can be hidden/shown in the respective Upload event handlers with the hide/show methods as demonstrated in this dojo example.
The "Upload" button is hidden in the select event handler:
$scope.onSelect = function(e) {
  setTimeout(function() {
    angular.element(".k-upload-selected").hide();
  }, 0);
}
Note that with this button hidden you will not be able to start the upload manually.

And the "Pause" button can be hidden in the progress event handler:
$scope.onProgress = function(e) {
  angular.element(".k-file .k-upload-status .k-button[aria-label='Pause']").hide();
}


Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Upload
Asked by
Kozachenko
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or