summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuso Lapinlampi <wub@partyvan.eu>2015-09-27 22:58:05 +0200
committerJuuso Lapinlampi <wub@partyvan.eu>2015-09-27 23:02:42 +0200
commite4c38033bb3c8e4f44ba93e604652d9eb8e9b0b8 (patch)
tree223ae96c0512b6e015ce5e8442f9f94e74cd7e07
parenta78072eba23ec544462c7a4fae8e4899f51632a7 (diff)
Fix JS switch ... case indentation
This is a surprising one. JSHint and JSCS do not seem to mind the previous indentation, but ESLint throws an error when using the Airbnb style guide. The style guide itself doesn't seem to mention anything about this directly. What ever it is, this one pleases all three linters. Fixes ESLint indent warnings using Airbnb ES5 config.
-rw-r--r--js/pomf.js54
1 files changed, 27 insertions, 27 deletions
diff --git a/js/pomf.js b/js/pomf.js
index 2d4ff58..1a11543 100644
--- a/js/pomf.js
+++ b/js/pomf.js
@@ -142,34 +142,34 @@ $(function() {
up.on('load', function(e, response) {
switch (e.target.status) {
- case 200:
- var res = JSON.parse(response);
- if (!res.success) {
- uploadFiles.addClass('error');
- totalName.text(UPLOAD_ERR_FAILED);
- break;
- }
-
- eachRow(res.files, function(row, file, files) {
- var link = $('<a>');
-
- link.attr('href', file.url)
- .attr('target', '_BLANK')
- .text(file.url.replace('http://', '').replace('https://', ''));
-
- $('.file-url', row).append(link);
- });
-
- uploadFiles.addClass('completed');
- totalName.text('Done!');
- break;
- case 413:
- uploadFiles.addClass('error completed');
- totalName.html(UPLOAD_ERR_MAX_SIZE);
- break;
- default:
- uploadFiles.addClass('error completed');
+ case 200:
+ var res = JSON.parse(response);
+ if (!res.success) {
+ uploadFiles.addClass('error');
totalName.text(UPLOAD_ERR_FAILED);
+ break;
+ }
+
+ eachRow(res.files, function(row, file, files) {
+ var link = $('<a>');
+
+ link.attr('href', file.url)
+ .attr('target', '_BLANK')
+ .text(file.url.replace('http://', '').replace('https://', ''));
+
+ $('.file-url', row).append(link);
+ });
+
+ uploadFiles.addClass('completed');
+ totalName.text('Done!');
+ break;
+ case 413:
+ uploadFiles.addClass('error completed');
+ totalName.html(UPLOAD_ERR_MAX_SIZE);
+ break;
+ default:
+ uploadFiles.addClass('error completed');
+ totalName.text(UPLOAD_ERR_FAILED);
}
});