aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/common/file-upload.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components/common/file-upload.js')
-rw-r--r--server/sonar-web/src/main/js/components/common/file-upload.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/components/common/file-upload.js b/server/sonar-web/src/main/js/components/common/file-upload.js
index c2d20b726b2..5d5e52ab0ab 100644
--- a/server/sonar-web/src/main/js/components/common/file-upload.js
+++ b/server/sonar-web/src/main/js/components/common/file-upload.js
@@ -21,7 +21,7 @@ import $ from 'jquery';
import _ from 'underscore';
function createFrame () {
- var uuid = _.uniqueId('upload-form-');
+ const uuid = _.uniqueId('upload-form-');
return $('<iframe></iframe>')
.prop('frameborder', 0)
.prop('width', 0)
@@ -32,11 +32,11 @@ function createFrame () {
}
export default function (options) {
- var deferred = new $.Deferred(),
- body = $('body'),
- frame = createFrame(),
- parent = options.form.parent(),
- clonedForm = options.form.detach();
+ const deferred = new $.Deferred();
+ const body = $('body');
+ const frame = createFrame();
+ const parent = options.form.parent();
+ const clonedForm = options.form.detach();
clonedForm
.prop('target', frame.prop('id'))
@@ -45,9 +45,9 @@ export default function (options) {
frame.appendTo(body);
frame.on('load', function () {
- var result = this.contentWindow.document.body.textContent;
+ const result = this.contentWindow.document.body.textContent;
try {
- var js = JSON.parse(result);
+ const js = JSON.parse(result);
deferred.resolve(js);
} catch (e) {
deferred.resolve(result);