Skip to content

Commit

Permalink
Merge pull request #2145 from robertmuehsig/430-upload
Browse files Browse the repository at this point in the history
fixes upload and prevent doubleclick for #430
  • Loading branch information
analogrelay committed May 30, 2014
2 parents dd1555f + 3712a60 commit fc0ee48
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/NuGetGallery/Scripts/async-file-upload.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
var AsyncFileUploadManager = new function () {
var _isWebkitBrowser = $.browser.webkit;
var _isWebkitBrowser = false; // $.browser.webkit is not longer supported on jQuery
var _iframeId = '__fileUploadFrame';
var _pollingInterval = 200;
var _pingUrl;
var _failureCount;
var _isUploadInProgress;

this.init = function (pingUrl, formId, jQueryUrl) {
_pingUrl = pingUrl;

// attach the sumbit event to the form
$('#' + formId).submit(function () {
$('#' + formId).find(':submit').attr('disabled', 'disabled');
$('#' + formId).find(':submit').val('Uploading...');
submitForm(this);
return false;
});
Expand Down Expand Up @@ -72,7 +74,7 @@
if (!result.FileName) {
return;
}

setProgressIndicator(percent, result.FileName);
if (percent < 100) {
setTimeout(getProgress, _pollingInterval);
Expand Down

0 comments on commit fc0ee48

Please sign in to comment.