Refactor browse path function

This commit is contained in:
JonnyWong16 2020-07-16 18:19:43 -07:00
commit 3dc36c3b92
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 22 additions and 22 deletions

View file

@ -2027,6 +2027,18 @@ Rating: {rating}/10 --> Rating: /10
});
}
function openBrowsePath(key, path, filter_ext, file_description, select_target) {
$("#browse-path-type").text(file_description);
$("#browse-path-modal").modal('show');
$("#select-browse-file").click(function () {
$("#browse-path-modal").modal('hide');
$("#" + select_target).val($("#browse-path").val());
});
browsePath(key, path, filter_ext);
}
function browsePath(key, path, filter_ext) {
$("#browse-path-status-message").html('<i class="fa fa-fw fa-spin fa-refresh"></i>');
getBrowsePath(key, path, filter_ext).then(function (data) {