Add option to upload or browse for a database file to import

This commit is contained in:
JonnyWong16 2020-05-03 14:33:25 -07:00
parent a869859491
commit 980c4f7618
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
6 changed files with 316 additions and 79 deletions

View file

@ -237,6 +237,27 @@ function doAjaxCall(url, elem, reload, form, showMsg, callback) {
});
}
getBrowsePath = function (key, path, filter_ext) {
var deferred = $.Deferred();
$.ajax({
url: 'browse_path',
type: 'GET',
data: {
key: key,
path: path,
filter_ext: filter_ext
},
success: function(data) {
deferred.resolve(data);
},
error: function() {
deferred.reject();
}
});
return deferred;
};
function doSimpleAjaxCall(url) {
$.ajax(url);
}