Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fbaa22f

Browse files
author
Nick Litwin
committedJan 12, 2016
Fix merge conflicts
2 parents 93f81f2 + 2d32efe commit fbaa22f

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed
 

‎app/submissions/submit-file/submit-file.controller.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
angular.module('tc.submissions').controller('SubmitFileController', SubmitFileController);
55

6-
SubmitFileController.$inject = ['$scope', '$stateParams', 'UserService', 'SubmissionsService', 'challengeToSubmitTo'];
6+
SubmitFileController.$inject = ['$scope', '$stateParams', '$log', 'UserService', 'SubmissionsService', 'challengeToSubmitTo'];
77

8-
function SubmitFileController($scope, $stateParams, UserService, SubmissionsService, challengeToSubmitTo) {
8+
function SubmitFileController($scope, $stateParams, $log, UserService, SubmissionsService, challengeToSubmitTo) {
99
var vm = this;
10+
$log = $log.getInstance("SubmitFileController");
1011
var files = {};
1112
var fileUploadProgress = {};
1213
vm.urlRegEx = new RegExp(/^(http(s?):\/\/)?(www\.)?[a-zA-Z0-9\.\-\_]+(\.[a-zA-Z]{2,3})+(\/[a-zA-Z0-9\_\-\s\.\/\?\%\#\&\=]*)?$/);
@@ -138,6 +139,8 @@
138139
vm.fileUploadProgress = {};
139140
vm.showProgress = true;
140141
vm.preparing = true;
142+
vm.uploading = false;
143+
vm.finishing = false;
141144
vm.submissionsBody.data.submitterComments = vm.comments;
142145
vm.submissionsBody.data.submitterRank = vm.submissionForm.submitterRank;
143146

@@ -166,8 +169,7 @@
166169

167170
vm.submissionsBody.data.fonts = processedFonts;
168171

169-
console.log('Body for request: ', vm.submissionsBody);
170-
return;
172+
$log.debug('Body for request: ', vm.submissionsBody);
171173
SubmissionsService.getPresignedURL(vm.submissionsBody, files, updateProgress);
172174
}
173175

@@ -182,7 +184,7 @@
182184
if (args === 100) {
183185
vm.preparing = false;
184186
vm.uploading = true;
185-
console.log('Prepared');
187+
$log.debug('Prepared for upload.');
186188
}
187189
} else if (phase === 'UPLOAD') {
188190
// if args is object, this update is about XHRRequest's upload progress
@@ -206,21 +208,21 @@
206208
}
207209
// start next phase when UPLOAD is done
208210
if (vm.uploadProgress == 100) {
209-
console.log('Uploaded');
211+
$log.debug('Uploaded files.');
210212
vm.uploading = false;
211213
vm.finishing = true;
212214
}
213215
} else if (phase === 'FINISH') {
214216
// we are concerned only for completion of the phase
215217
if (args === 100) {
216-
console.log('Finished');
218+
$log.debug('Finished upload.');
217219
vm.finishing = false;
218220
vm.showProgress = false;
219221

220222
// TODO redirect to submission listing / challenge details page
221223
}
222224
} else { // assume it to be error condition
223-
console.log("Else: " + phase);
225+
$log.debug("Error Condition: " + phase);
224226
vm.errorInUpload = true;
225227
}
226228
}

‎assets/css/settings/settings.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,13 @@
151151
width: 100%;
152152
}
153153
.section-fields {
154-
max-width: 768px;
154+
width: 100%;
155+
}
156+
}
157+
158+
&.tracks {
159+
.section-fields {
160+
width: 100%;
155161
}
156162
}
157163
}
@@ -303,6 +309,8 @@
303309
.field-label,
304310
angucomplete-alt {
305311
align-self: flex-start;
312+
width: 100%;
313+
margin-top: 6px;
306314
}
307315

308316
.field-label {

0 commit comments

Comments
 (0)
This repository has been archived.