[NIFI-3450] update upload template dialog browse button. This closes #1495

This commit is contained in:
Scott Aslan 2017-02-09 11:29:49 -05:00 committed by Matt Gilman
parent 932b5bb91b
commit 4274481f1d
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
3 changed files with 8 additions and 13 deletions

View File

@ -21,9 +21,9 @@
<div id="template-browse-container">
<span id="select-template-label">Select Template</span>
<div id="select-template-button">
<button class="fa fa-search"></button>
<button class="fa fa-search" id="template-file-field-button" title="Browse"></button>
<form id="template-upload-form" enctype="multipart/form-data" method="post">
<input type="file" name="template" id="template-file-field" title="Browse"/>
<input type="file" name="template" id="template-file-field"/>
</form>
</div>
</div>

View File

@ -239,20 +239,11 @@ span.details-title {
position: absolute;
top: 0px;
left: 135px;
cursor: pointer;
overflow: hidden;
height: 28px;
}
#template-file-field {
height: 28px;
display: inline;
position: absolute;
top: 0;
left: 0;
opacity: 0;
filter: alpha(opacity = 0);
z-index: 3000;
cursor: pointer;
display: none;
}
#submit-template-container {

View File

@ -241,6 +241,10 @@
}
});
$('#template-file-field-button').on('click', function (e) {
$('#template-file-field').click();
});
// add a handler for the change file input chain event
$('#template-file-field').on('change', function (e) {
var filename = $(this).val();