Trigger change and unbind after selecting in file browser

This commit is contained in:
JonnyWong16
2020-07-16 19:05:18 -07:00
parent 3dc36c3b92
commit ec34ea2116
3 changed files with 6 additions and 5 deletions

View File

@@ -40,7 +40,7 @@
<div class="col-xs-12">
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-form" type="button" id="import_database_path_browse">Browse</button>
<button class="btn btn-form" type="button" id="import_database_path_browse" data-target="#import_database_path">Browse</button>
</span>
<input type="text" class="form-control" id="import_database_path" name="import_database_path" value="" placeholder="tautulli.db" required disabled>
</div>
@@ -115,7 +115,7 @@
</div>
<script>
$("#import_database_path_browse").click(function () {
openBrowsePath(null, null, '.db', 'Database File', 'import_database_path');
openBrowsePath(null, null, '.db', 'Database File', $(this).data('target'));
});
$("#import_database_file").change(function() {