From b3407cc9dfd020e7172ce56dea39f42f7ad393de Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 14 Mar 2015 16:50:42 +0200 Subject: [PATCH] zip creation errors are now reported to the user --- static/js/main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index 7f99441..18d2e75 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1869,8 +1869,14 @@ function doUpdate() { function doDownloadZipped(cameraId, groupKey) { showModalDialog('', null, null, true); ajax('GET', baseUri + 'picture/' + cameraId + '/zipped/' + groupKey + '/', null, function (data) { - hideModalDialog(); /* progress */ - downloadFile(baseUri + 'picture/' + cameraId + '/zipped/' + groupKey + '/?key=' + data.key); + if (data.error) { + hideModalDialog(); /* progress */ + showErrorMessage(data.error); + } + else { + hideModalDialog(); /* progress */ + downloadFile(baseUri + 'picture/' + cameraId + '/zipped/' + groupKey + '/?key=' + data.key); + } }); } -- 2.39.5