Skip to content

Commit 14f0c9f

Browse files
committed
Standard Spacing vs Tabs
1 parent b42dce1 commit 14f0c9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1785
-1785
lines changed

.gitattributes

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# Standard to msysgit
88
*.doc diff=astextplain
99
*.DOC diff=astextplain
10-
*.docx diff=astextplain
11-
*.DOCX diff=astextplain
12-
*.dot diff=astextplain
13-
*.DOT diff=astextplain
14-
*.pdf diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
1515
*.PDF diff=astextplain
1616
*.rtf diff=astextplain
1717
*.RTF diff=astextplain

app.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SocketService.init(require('socket.io')(server));
2020

2121
// Start Server
2222
server.listen(process.env.PORT, () => {
23-
console.log(`Server is listening on port ${process.env.PORT}`);
23+
console.log(`Server is listening on port ${process.env.PORT}`);
2424
});
2525

2626
app.set('views', path.join(__dirname, 'views'));
@@ -52,16 +52,16 @@ app.use('/manual', require('./routes/ManualTaskController'));
5252

5353
// catch 404 and forward to error handler
5454
app.use(function(req, res, next) {
55-
let err = new Error('Not Found');
56-
err.status = 404;
57-
next(err);
55+
let err = new Error('Not Found');
56+
err.status = 404;
57+
next(err);
5858
});
5959

6060
// error handler
6161
app.use(function(err, req, res, next) {
62-
console.error(err);
63-
res.status(err.status || 500);
64-
res.json(err.message);
62+
console.error(err);
63+
res.status(err.status || 500);
64+
res.json(err.message);
6565
});
6666

6767

models/Alert.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ const mongoose = require('mongoose');
22
const Schema = mongoose.Schema;
33

44
const alertSchema = new Schema({
5-
challenged: { type: Boolean, default: true },
6-
revoked: { type: Boolean, default: false },
7-
resolved: { type: Boolean, default: false },
8-
forfeited: { type: Boolean, default: true },
9-
team: {
10-
challenged: { type: Boolean, default: true },
11-
revoked: { type: Boolean, default: false },
12-
resolved: { type: Boolean, default: false },
13-
forfeited: { type: Boolean, default: true }
14-
}
5+
challenged: { type: Boolean, default: true },
6+
revoked: { type: Boolean, default: false },
7+
resolved: { type: Boolean, default: false },
8+
forfeited: { type: Boolean, default: true },
9+
team: {
10+
challenged: { type: Boolean, default: true },
11+
revoked: { type: Boolean, default: false },
12+
resolved: { type: Boolean, default: false },
13+
forfeited: { type: Boolean, default: true }
14+
}
1515
});
1616

1717
alertSchema.statics.attachToPlayer = function(player) {
1818
console.log('Creating player alert settings.');
1919
let newAlert = new Alert();
2020
return newAlert.save()
21-
.then(function(alert) {
22-
return player.attachAlert(alert);
23-
});
21+
.then(function(alert) {
22+
return player.attachAlert(alert);
23+
});
2424
};
2525

2626
const Alert = mongoose.model('Alert', alertSchema);

public/javascripts/app.routes.js

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,98 @@
11
angular
2-
.module('sparcPongApp')
3-
.config(routes);
2+
.module('sparcPongApp')
3+
.config(routes);
44

55
routes.$inject = ['$routeProvider'];
66

77
function routes($routeProvider) {
88

9-
$routeProvider
10-
/* Board Routes */
11-
.when('/board/singles', {
12-
templateUrl: 'partials/boards/singles.html',
13-
controller: 'singlesBoardController',
14-
protected: true
15-
})
16-
.when('/board/doubles', {
17-
templateUrl: 'partials/boards/doubles.html',
18-
controller: 'doublesBoardController',
9+
$routeProvider
10+
/* Board Routes */
11+
.when('/board/singles', {
12+
templateUrl: 'partials/boards/singles.html',
13+
controller: 'singlesBoardController',
1914
protected: true
20-
})
21-
22-
/* Help Routes */
23-
.when('/help/challenges', {
24-
templateUrl: 'partials/help/challenges.html',
15+
})
16+
.when('/board/doubles', {
17+
templateUrl: 'partials/boards/doubles.html',
18+
controller: 'doublesBoardController',
2519
protected: true
26-
})
27-
.when('/help/rules', {
28-
templateUrl: 'partials/help/rules.html',
20+
})
21+
22+
/* Help Routes */
23+
.when('/help/challenges', {
24+
templateUrl: 'partials/help/challenges.html',
25+
protected: true
26+
})
27+
.when('/help/rules', {
28+
templateUrl: 'partials/help/rules.html',
2929
protected: true
30-
})
31-
.when('/help/alerts', {
32-
templateUrl: 'partials/help/alerts.html',
30+
})
31+
.when('/help/alerts', {
32+
templateUrl: 'partials/help/alerts.html',
3333
protected: true
34-
})
35-
36-
/* Player Routes */
37-
.when('/profile/player/:id?', {
38-
templateUrl: 'partials/profiles/player.html',
39-
controller: 'playerProfileController',
34+
})
35+
36+
/* Player Routes */
37+
.when('/profile/player/:id?', {
38+
templateUrl: 'partials/profiles/player.html',
39+
controller: 'playerProfileController',
4040
protected: true
41-
})
42-
.when('/account/changeAlerts', {
43-
templateUrl: 'partials/account/changeAlerts.html',
44-
controller: 'changeAlertsController',
41+
})
42+
.when('/account/changeAlerts', {
43+
templateUrl: 'partials/account/changeAlerts.html',
44+
controller: 'changeAlertsController',
4545
protected: true
46-
})
47-
.when('/account/changeUsername', {
48-
templateUrl: 'partials/account/changeUsername.html',
49-
controller: 'changeUsernameController',
46+
})
47+
.when('/account/changeUsername', {
48+
templateUrl: 'partials/account/changeUsername.html',
49+
controller: 'changeUsernameController',
5050
protected: true
51-
})
51+
})
5252
.when('/account/changePassword', {
5353
templateUrl: 'partials/account/changePassword.html',
5454
controller: 'changePasswordController',
5555
protected: true
5656
})
57-
.when('/account/changeEmail', {
58-
templateUrl: 'partials/account/changeEmail.html',
59-
controller: 'changeEmailController',
57+
.when('/account/changeEmail', {
58+
templateUrl: 'partials/account/changeEmail.html',
59+
controller: 'changeEmailController',
6060
protected: true
61-
})
62-
63-
/* Team Routes */
64-
.when('/profile/team/:id?', {
65-
templateUrl: 'partials/profiles/team.html',
66-
controller: 'teamProfileController',
61+
})
62+
63+
/* Team Routes */
64+
.when('/profile/team/:id?', {
65+
templateUrl: 'partials/profiles/team.html',
66+
controller: 'teamProfileController',
6767
protected: true
68-
})
69-
70-
/* Sign Up Routes */
71-
.when('/signUp/player', {
72-
templateUrl: 'partials/signUp/newPlayer.html',
73-
controller: 'signUpPlayerController',
68+
})
69+
70+
/* Sign Up Routes */
71+
.when('/signUp/player', {
72+
templateUrl: 'partials/signUp/newPlayer.html',
73+
controller: 'signUpPlayerController',
7474
protected: false
75-
})
76-
.when('/signUp/team', {
77-
templateUrl: 'partials/signUp/newTeam.html',
78-
controller: 'signUpTeamController',
75+
})
76+
.when('/signUp/team', {
77+
templateUrl: 'partials/signUp/newTeam.html',
78+
controller: 'signUpTeamController',
7979
protected: true
80-
})
80+
})
8181

82-
/* Authentication Routes */
83-
.when('/login', {
84-
templateUrl: 'partials/login.html',
85-
controller: 'loginController',
82+
/* Authentication Routes */
83+
.when('/login', {
84+
templateUrl: 'partials/login.html',
85+
controller: 'loginController',
8686
protected: false
87-
})
87+
})
8888
.when('/resetPassword/:resetKey?', {
8989
templateUrl: 'partials/resetPassword.html',
9090
controller: 'resetPasswordController',
9191
protected: false
9292
})
93-
94-
.otherwise({
95-
redirectTo: '/board/singles'
96-
});
93+
94+
.otherwise({
95+
redirectTo: '/board/singles'
96+
});
9797

9898
}

public/javascripts/controllers/account/changeEmailController.js

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
11
angular
2-
.module('controllers')
3-
.controller('changeEmailController', ChangeEmailController);
2+
.module('controllers')
3+
.controller('changeEmailController', ChangeEmailController);
44

55
ChangeEmailController.$inject = ['$scope', 'jwtService', 'modalService', 'playerService'];
66

77

88
function ChangeEmailController($scope, jwtService, modalService, playerService) {
9-
10-
$scope.email = '';
119

12-
function init() {
13-
getEmail();
14-
}
15-
16-
function getEmail() {
10+
$scope.email = '';
11+
12+
function init() {
13+
getEmail();
14+
}
15+
16+
function getEmail() {
1717
let playerId = jwtService.getDecodedToken().playerId;
1818

19-
playerService.getPlayer(playerId).then(function(player) {
20-
if (!player) console.log('Uh oh, this player could not be found.');
21-
else $scope.email = player.email;
22-
});
23-
}
24-
25-
$scope.validateEmail = function() {
26-
let modalOptions;
27-
playerService.changeEmail($scope.email).then(
28-
// Success
29-
function(success) {
30-
modalOptions = {
31-
headerText: 'Change Email',
32-
bodyText: success
33-
};
34-
modalService.showAlertModal({}, modalOptions);
35-
},
36-
// Error
37-
function(error) {
38-
modalOptions = {
39-
headerText: 'Change Email',
40-
bodyText: error
41-
};
42-
modalService.showAlertModal({}, modalOptions);
43-
}
44-
);
45-
};
46-
47-
$scope.removeEmail = function() {
48-
let modalOptions;
49-
playerService.removeEmail().then(
50-
// Success
51-
function(success) {
52-
getEmail();
53-
modalOptions = {
54-
headerText: 'Remove Email',
55-
bodyText: success
56-
};
57-
modalService.showAlertModal({}, modalOptions);
58-
},
59-
// Error
60-
function(error) {
61-
modalOptions = {
62-
headerText: 'Remove Email',
63-
bodyText: error
64-
};
65-
modalService.showAlertModal({}, modalOptions);
66-
}
67-
);
68-
};
19+
playerService.getPlayer(playerId).then(function(player) {
20+
if (!player) console.log('Uh oh, this player could not be found.');
21+
else $scope.email = player.email;
22+
});
23+
}
24+
25+
$scope.validateEmail = function() {
26+
let modalOptions;
27+
playerService.changeEmail($scope.email).then(
28+
// Success
29+
function(success) {
30+
modalOptions = {
31+
headerText: 'Change Email',
32+
bodyText: success
33+
};
34+
modalService.showAlertModal({}, modalOptions);
35+
},
36+
// Error
37+
function(error) {
38+
modalOptions = {
39+
headerText: 'Change Email',
40+
bodyText: error
41+
};
42+
modalService.showAlertModal({}, modalOptions);
43+
}
44+
);
45+
};
46+
47+
$scope.removeEmail = function() {
48+
let modalOptions;
49+
playerService.removeEmail().then(
50+
// Success
51+
function(success) {
52+
getEmail();
53+
modalOptions = {
54+
headerText: 'Remove Email',
55+
bodyText: success
56+
};
57+
modalService.showAlertModal({}, modalOptions);
58+
},
59+
// Error
60+
function(error) {
61+
modalOptions = {
62+
headerText: 'Remove Email',
63+
bodyText: error
64+
};
65+
modalService.showAlertModal({}, modalOptions);
66+
}
67+
);
68+
};
6969

7070
init();
7171

0 commit comments

Comments
 (0)