mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[FileUpload] Make upload button selector configurable
This commit is contained in:
parent
9e4f4099f8
commit
6fce94e110
2 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
<div class="header">
|
||||
<h2 class="title">Edit Saved Objects</h2>
|
||||
<button class="btn btn-default controls" ng-click="exportAll()"><i aria-hidden="true" class="fa fa-download"></i> Export Everything</button>
|
||||
<file-upload on-read="importAll(fileContents)">
|
||||
<file-upload on-read="importAll(fileContents)" upload-selector="button.upload">
|
||||
<button class="btn btn-default controls upload" ng-click>
|
||||
<i aria-hidden="true" class="fa fa-upload"></i> Import
|
||||
</button>
|
||||
|
|
|
@ -12,11 +12,11 @@ module.directive('fileUpload', function () {
|
|||
scope: {
|
||||
onRead: '&',
|
||||
onLocate: '&',
|
||||
label: '='
|
||||
uploadSelector: '@'
|
||||
},
|
||||
template: html,
|
||||
link: function ($scope, $elem, attrs) {
|
||||
let $button = $elem.find('.upload');
|
||||
let $button = $elem.find($scope.uploadSelector);
|
||||
let $dropzone = $elem.find('.dropzone');
|
||||
|
||||
const handleFile = (file) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue