Skip to content

Commit

Permalink
Merge pull request #839 from oceanzus/redesign_sprint14_1492
Browse files Browse the repository at this point in the history
Updates for 1.4.9.2 hotfix data download feedback (13380).
  • Loading branch information
oceanzus authored May 29, 2018
2 parents d0828b9 + 71fcacc commit 2282fdc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ooiui/static/js/views/science/StreamDownloadFormView.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ var StreamDownloadFormView = Backbone.View.extend({
* Make a copy of the stream model and then set the start and end dates to
* the form fields, then grab the URL and send the user to it.
*/
var self = this;
this.$el.find('#dl-tab-content').prepend('<div id="wspinner"><p style="text-align: center; font-size: 14px;"> Waiting for request verification...</p><i class="fa fa-spinner fa-spin" style="margin-top:5px;margin-left:50%;font-size:50px;"> </i></div>');
$('#metadata').fadeTo(0,0.6);
$('#metadata').append('<div id="temp-fade" style="position: absolute;top:0;left:0;width: 100%;height:100%;z-index:2;opacity:0.4;filter: alpha(opacity = 50)"></div>');
$("#wspinner").show();
var selection = this.$type_select.val();
var localModel = this.model.clone();
var startDate = moment.utc(this.$start_date.data('date')).toJSON();
Expand Down Expand Up @@ -275,6 +280,10 @@ var StreamDownloadFormView = Backbone.View.extend({
user_name: user_name,
parameters: parameters,
success: function(resp){
$("#wspinner").hide();
$("#temp-fade").remove();
$('#metadata').fadeTo(0,1);
self.hide();
var timeCalculation = _.has(resp, "timeCalculation") ? resp.timeCalculation : null;
var sizeCalculation = _.has(resp, "sizeCalculation") ? resp.sizeCalculation : null;
ooi.trigger('DownloadModal:onSuccess', this.user_email, timeCalculation, sizeCalculation);
Expand All @@ -283,8 +292,6 @@ var StreamDownloadFormView = Backbone.View.extend({
ooi.trigger('DownloadModalFail:onFail', msg);
}
});

this.hide();
},
failure: function() {
console.log("this failure");
Expand Down
7 changes: 7 additions & 0 deletions ooiui/static/json/uiPatchNotes.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[
{
"VersionNumber": "1.4.9.2",
"VersionDate": "2018-05-23",
"VersionDescription": [
"Data Download: Adds waiting for response feedback spinner and disables controls. (13380)"
]
},
{
"VersionNumber": "1.4.9.1",
"VersionDate": "2018-05-18",
Expand Down

0 comments on commit 2282fdc

Please sign in to comment.