aboutsummaryrefslogtreecommitdiffstats
path: root/jsaccess
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2013-06-16 21:54:13 +0200
committerLaurent Ghigonis <laurent@p1sec.com>2013-06-16 21:54:13 +0200
commitce85a7bd2528649e51b44f0ef2f89ea49d150fc3 (patch)
tree1848b3dfba79b3a4caa8ce7bc108002e561122a3 /jsaccess
parentjsaccess: ensure refresh of status before decryption (diff)
downloadlaurent-tools-ce85a7bd2528649e51b44f0ef2f89ea49d150fc3.tar.xz
laurent-tools-ce85a7bd2528649e51b44f0ef2f89ea49d150fc3.zip
jsaccess: check if no files are selected
Diffstat (limited to 'jsaccess')
-rw-r--r--jsaccess/jsa/jsa.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/jsaccess/jsa/jsa.js b/jsaccess/jsa/jsa.js
index c2e40f2..20c7bdc 100644
--- a/jsaccess/jsa/jsa.js
+++ b/jsaccess/jsa/jsa.js
@@ -56,8 +56,11 @@ function jsagetlist() {
function jsadl() {
var pass = document.getElementById('password').value;
var file = $('input[name=file]:checked').val();
-
- obj = _dl(file, pass);
+
+ if (!file)
+ _status("You have to select a file");
+ else
+ obj = _dl(file, pass);
}
/* ===== PRIVATE - called within this javascript file ===== */