Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 02307de

Browse files
author
Parth Shah
committed
fixing linting errors
1 parent 9703735 commit 02307de

File tree

4 files changed

+27
-44
lines changed

4 files changed

+27
-44
lines changed

app/directives/tc-fp-file-input/tc-fp-file-input.directive.js

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,35 @@ import _ from 'lodash'
3333
}
3434
// set extensions
3535
if (scope.fieldId.indexOf('ZIP') > -1) {
36-
scope.extensions = ".zip"
36+
scope.extensions = '.zip'
3737
} else if (scope.fieldId.indexOf('DESIGN_COVER') > -1) {
38-
scope.extensions = ".png,.jpeg,.jpg,.bmp"
38+
scope.extensions = '.png,.jpeg,.jpg,.bmp'
3939
}
4040

4141
// set default services
42-
scope.fpServices = scope.fpServices || "COMPUTER,GOOGLE_DRIVE,BOX,DROPBOX"
42+
scope.fpServices = scope.fpServices || 'COMPUTER,GOOGLE_DRIVE,BOX,DROPBOX'
4343
scope.fpContainer = CONSTANTS.FILE_PICKER_SUBMISSION_CONTAINER_NAME || 'submission-staging-dev'
4444

4545
// set max size
46-
scope.maxSize = 500*1024*1024
46+
scope.maxSize = 500 * 1024 * 1024
4747

48-
var key, value;
49-
/*
50-
*pass original event
51-
*/
48+
var key, value
49+
/*
50+
*pass original event
51+
*/
5252
element.bind('change', function(event) {
53-
event.preventDefault()
54-
scope.onSuccess(event.originalEvent || event);
55-
$rootScope.$apply()
56-
});
57-
element = element.length ? element[0] : element;
58-
for (key in attrs.$attr){
59-
value = attrs.$attr[key]
60-
element.setAttribute(value, attrs[key])
53+
event.preventDefault()
54+
scope.onSuccess(event.originalEvent || event)
55+
$rootScope.$apply()
56+
})
57+
element = element.length ? element[0] : element
58+
for (key in attrs.$attr) {
59+
value = attrs.$attr[key]
60+
element.setAttribute(value, attrs[key])
6161
}
6262
filepickerService.constructWidget(element)
6363

64-
scope.onSuccess = function (event) {
65-
debugger
64+
scope.onSuccess = function(event) {
6665
var fpFile = event.fpfile
6766
var _file = {
6867
name: scope.filename || fpFile.filename,
@@ -72,7 +71,10 @@ import _ from 'lodash'
7271
mimetype: fpFile.mimetype
7372
}
7473
scope.ngModel = _file
75-
scope.setFileReference({file: _file, fieldId: scope.fieldId})
74+
scope.setFileReference({
75+
file: _file,
76+
fieldId: scope.fieldId
77+
})
7678
}
7779
}
7880
}

app/services/submissions.service.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@ import angular from 'angular'
2424
return api.all('submissions').customPOST(body)
2525
.then(function(response) {
2626
//progressCallback.call(progressCallback, 'PREPARE', 100)
27-
2827
// uploadSubmissionFileToS3(response, response.data.files, files, progressCallback)
29-
30-
console.log(response);
31-
32-
processSubmission(response, progressCallback);
28+
processSubmission(response, progressCallback)
3329
})
3430
.catch(function(err) {
3531
logger.error('Could not get presigned url', err)
@@ -136,7 +132,7 @@ import angular from 'angular'
136132

137133
progressCallback.call(progressCallback, 'FINISH', 100)
138134

139-
return response;
135+
return response
140136
})
141137
.catch(function(err) {
142138
logger.error('Could not start processing', err)

app/submissions/submit-design-files/submit-design-files.controller.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import _ from 'lodash'
1212
if (!challengeToSubmitTo.challenge) { return }
1313

1414
var vm = this
15-
var files = {}
1615
var fileUploadProgress = {}
1716
vm.urlRegEx = new RegExp(/^(http(s?):\/\/)?(www\.)?[a-zA-Z0-9\.\-\_]+(\.[a-zA-Z]{2,3})+(\/[a-zA-Z0-9\_\-\s\.\/\?\%\#\&\=]*)?$/)
1817
vm.rankRegEx = new RegExp(/^[1-9]\d*$/)
@@ -148,16 +147,12 @@ import _ from 'lodash'
148147

149148
vm.submissionsBody.data.fonts = processedFonts
150149
SubmissionsService.startSubmission(vm.submissionsBody, updateProgress)
151-
.then(function(newSubmission) {
152-
logger.debug("New Submission: ", newSubmission)
153-
//SubmissionsService.processSubmission(newSubmission, updateProgress)
154-
})
155150
.then(function(processedSubmission) {
156-
logger.debug("Processed Submission: ", processedSubmission)
157-
151+
logger.debug('Processed Submission: ', processedSubmission)
158152
})
159153
.catch(function(err) {
160-
logger.error("Submission processing failed ", err)
154+
logger.error('Submission processing failed ', err)
155+
// TODO handle error
161156
})
162157
}
163158

webpack.config.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require('./node_modules/coffee-script/register')
2-
var BowerWebpackPlugin = require('bower-webpack-plugin')
32

43
const CI = process.env.TRAVIS_BRANCH
54

@@ -30,16 +29,7 @@ const config = require('appirio-tech-webpack-config')({
3029
favicon: './assets/images/favicon.ico',
3130
uglifyOptions: {
3231
mangle: { except: ['Auth0'] }
33-
},
34-
plugins: [
35-
new BowerWebpackPlugin({
36-
moduleDirectories: ["bower_components"],
37-
manifestFiles: "bower.json",
38-
includes: /.*/,
39-
excludes: [],
40-
searchResolveModulesDirectories: true
41-
})
42-
]
32+
}
4333
})
4434

4535
if (CI) config.output.publicPath = process.env.ASSET_PREFIX

0 commit comments

Comments
 (0)