Skip to content

Commit

Permalink
The export button now changes to in progress message and is disabled …
Browse files Browse the repository at this point in the history
…during export
  • Loading branch information
tomsteele committed May 2, 2016
1 parent 165f343 commit a5592ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/client/views/project_settings/project_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h5>Export</h5>
<input class="u-full-width" type="password" placeholder="Password" name="password">
</div>
</div>
<input class="button-primary" type="submit" value="submit">
<input class="button-primary" id="export-button" type="submit" value="submit">
</form>
<hr />
<h5>Delete</h5>
Expand Down
3 changes: 3 additions & 0 deletions app/client/views/project_settings/project_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Template.projectSettings.events({
},
'submit form#export': function (event, tpl) {
event.preventDefault()
$('#export-button').val('Export in progress...').prop('disabled', true)
var projectId = this.projectId
var url = tpl.find('[name=url]').value
var username = tpl.find('[name=username]').value
Expand All @@ -38,13 +39,15 @@ Template.projectSettings.events({
strong: 'Error',
message: 'Export Failed'
})
$('#export-button').val('submit').prop('disabled', false)
return
}
Alerts.insert({
class: 'alert-success',
strong: 'Success',
message: 'Export Complete'
})
$('#export-button').val('submit').prop('disabled', false)
return
})
},
Expand Down

0 comments on commit a5592ee

Please sign in to comment.