Skip to content

Commit

Permalink
MCKIN-8799 Download button enabled only when final download url is re…
Browse files Browse the repository at this point in the history
…ady (#48)
  • Loading branch information
moeez96 authored and xitij2000 committed Nov 28, 2018
1 parent cf32a7f commit 4e9ebaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions poll/public/js/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,15 @@ function PollUtil (runtime, element, pollType) {
// Keep polling for status updates when an export is running.
setTimeout(getStatus, 1000);
}
if (statusChanged) {
if (newStatus.last_export_result.error) {
self.errorMessage.text(error);
self.errorMessage.show();
} else {
self.downloadResultsButton.attr('disabled', false);
self.errorMessage.hide()
else {
if (statusChanged) {
if (newStatus.last_export_result.error) {
self.errorMessage.text(error);
self.errorMessage.show();
} else {
self.downloadResultsButton.attr('disabled', false);
self.errorMessage.hide()
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def package_data(pkg, roots):

setup(
name='xblock-poll',
version='1.6.1',
version='1.6.2',
description='An XBlock for polling users.',
packages=[
'poll',
Expand Down

0 comments on commit 4e9ebaf

Please sign in to comment.