Skip to content

Commit c018ae8

Browse files
committed
Merge branch 'master' into canary
2 parents 102078d + b67d2b6 commit c018ae8

Some content is hidden

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

43 files changed

+465
-795
lines changed

Diff for: CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
<a name="v2.0.12"></a>
2+
### v2.0.12 (2014-08-25)
3+
4+
#### Bug Fixes
5+
6+
* revert multiple strategies per account, which shouldn't go in a patch release
7+
8+
<a name="v2.0.11"></a>
9+
### v2.0.11 (2014-08-25)
10+
11+
12+
#### Bug Fixes
13+
14+
* **app:** Use parentheses to fix string concat in config ([c6a50ce7](http://github.com/DaftMonk/generator-angular-fullstack/commit/c6a50ce791ab633a17654ce9b0090007d7152463), closes [#466](http://github.com/DaftMonk/generator-angular-fullstack/issues/466))
15+
* improve jshint usage ([35fcf490](http://github.com/DaftMonk/generator-angular-fullstack/commit/35fcf4902dbbdab2ca6b394ab87ef8e3cc3d052b), closes [#463](http://github.com/DaftMonk/generator-angular-fullstack/issues/463), [#486](http://github.com/DaftMonk/generator-angular-fullstack/issues/486))
16+
* **gen:** use more restrictive version range for ng-component ([19698973](http://github.com/DaftMonk/generator-angular-fullstack/commit/196989730c8922fa5e1dc9caa45eb85052535e30))
17+
18+
19+
#### Features
20+
21+
* **socket.io:** build socket.io into vendor.js ([06f2e46e](http://github.com/DaftMonk/generator-angular-fullstack/commit/06f2e46ef382b5af1691f34b6cf504f1e5640b86))
22+
* **docs:** Inform users/developers of the `canary` branch ([74693623](http://github.com/DaftMonk/generator-angular-fullstack/commit/74693623eb23c9399495a3baff7e3479a1d9f3ba))
23+
* **gen:** make generator tests faster, and easier to run ([84acb744](http://github.com/DaftMonk/generator-angular-fullstack/commit/84acb7448ccc7c55b72bdd19bfae50c33d527296))
24+
* **app:** add additional node version to travis.yml ([e4f00b08](http://github.com/DaftMonk/generator-angular-fullstack/commit/e4f00b083a880713ca563e3447b9fb3f56a54ebc))
25+
* **uibootstrap:** add basic modal service and template when using uibootstrap ([7c14bed4](http://github.com/DaftMonk/generator-angular-fullstack/commit/7c14bed4873b92124bcbe422fed918836b8f5df5))
26+
127
<a name="v2.0.10"></a>
228
### v2.0.10 (2014-08-16)
329

Diff for: app/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
149149
{
150150
value: 'googleAuth',
151151
name: 'Google',
152-
checked: true
152+
checked: false
153153
},
154154
{
155155
value: 'facebookAuth',
156156
name: 'Facebook',
157-
checked: true
157+
checked: false
158158
},
159159
{
160160
value: 'twitterAuth',
161161
name: 'Twitter',
162-
checked: true
162+
checked: false
163163
}
164164
]
165165
}, {

Diff for: app/templates/Gruntfile.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,16 @@ module.exports = function (grunt) {
167167
options: {
168168
jshintrc: 'server/.jshintrc'
169169
},
170-
src: [ 'server/{,*/}*.js']
170+
src: [
171+
'server/**/*.js',
172+
'!server/**/*.spec.js'
173+
]
174+
},
175+
serverTest: {
176+
options: {
177+
jshintrc: 'server/.jshintrc-spec'
178+
},
179+
src: ['server/**/*.spec.js']
171180
},
172181
all: [
173182
'<%%= yeoman.client %>/{app,components}/**/*.js',

Diff for: app/templates/client/app/account(auth)/settings/settings(html).html

+7-34
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,16 @@
33
<div class="container">
44
<div class="row">
55
<div class="col-sm-12">
6-
<h1>Email</h1>
6+
<h1>Change Password</h1>
77
</div>
88
<div class="col-sm-12">
9-
<form role="form" name="email" ng-submit="changeEmail()" novalidate>
10-
11-
<div class="form-group has-feedback">
12-
<label>Current Email</label>
13-
<input type="email" name="email" class="form-control" ng-model="user.email" placeholder='ex. [email protected]' />
14-
<p class="help-block" ng-show="!email.email.$valid">
15-
| Email not valid
16-
</p>
17-
</div>
18-
19-
<button class="btn btn-lg btn-primary" type="submit">Save changes</button>
20-
</form>
21-
</div>
22-
</div>
23-
<div class="row">
24-
<div class="col-sm-12">
25-
<h1><% if (filters.oauth) { %>{{ user.localEnabled ? 'Change' : 'Set' }}<% } else { %>Change<% } %> Password</h1>
26-
</div>
27-
<div class="col-sm-12">
28-
<form name="pwd" ng-submit="<% if(filters.oauth) { %>!user.localEnabled ? setPassword() : <% } %>changePassword()" novalidate>
9+
<form class="form" name="form" ng-submit="changePassword(form)" novalidate>
2910

3011
<div class="form-group">
3112
<label>Current Password</label>
3213

33-
<input type="password" name="old" placeholder='ex. password123' class="form-control" ng-model="user.oldPassword"
34-
mongoose-error <% if (filters.oauth) { %>ng-disabled='!user.localEnabled' <% } %>/>
14+
<input type="password" name="password" class="form-control" ng-model="user.oldPassword"
15+
mongoose-error/>
3516
<p class="help-block" ng-show="form.password.$error.mongoose">
3617
{{ errors.other }}
3718
</p>
@@ -40,11 +21,11 @@ <h1><% if (filters.oauth) { %>{{ user.localEnabled ? 'Change' : 'Set' }}<% } els
4021
<div class="form-group">
4122
<label>New Password</label>
4223

43-
<input type="password" name="new" placeholder='ex. GoofyM1ckeyDonald&Pluto' class="form-control" ng-model="user.newPassword"
24+
<input type="password" name="newPassword" class="form-control" ng-model="user.newPassword"
4425
ng-minlength="3"
45-
required />
26+
required/>
4627
<p class="help-block"
47-
ng-show="(pwd.new.$error.minlength || pwd.new.$error.required) && (pwd.new.$dirty || pwd.submitted)">
28+
ng-show="(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || submitted)">
4829
Password must be at least 3 characters.
4930
</p>
5031
</div>
@@ -55,12 +36,4 @@ <h1><% if (filters.oauth) { %>{{ user.localEnabled ? 'Change' : 'Set' }}<% } els
5536
</form>
5637
</div>
5738
</div>
58-
<% if (filters.oauth) { %>
59-
<!-- <div class="row">
60-
<div class="col-sm-12">
61-
<h1>Social accounts</h1>
62-
</div>
63-
<div class="col-sm-12"></div>
64-
</div> -->
65-
<% } %>
6639
</div>

Diff for: app/templates/client/app/account(auth)/settings/settings(jade).jade

+7-34
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,20 @@ div(ng-include='"components/navbar/navbar.html"')
22
.container
33
.row
44
.col-sm-12
5-
h1 Email
6-
7-
.col-sm-12
8-
form(role='form', name='email', ng-submit='changeEmail()', novalidate)
9-
10-
.form-group.has-feedback
11-
label Current Email
12-
input.form-control(type='email', name='email', ng-model='user.email', placeholder='ex. [email protected]')
13-
span.glyphicon.glyphicon-ok.form-control-feedback(ng-if='email.confirmed', title='email confirmed')
14-
p.help-block(ng-show='!email.email.$valid')
15-
| Email not valid
16-
17-
button.btn.btn-lg.btn-primary(type='submit') Save changes
18-
19-
.row
5+
h1 Change Password
206
.col-sm-12
21-
h1 <% if (filters.oauth) { %>{{ user.localEnabled ? 'Change' : 'Set' }}<% } else { %>Change<% } %> Password
22-
23-
.col-sm-12
24-
form(role='form', name='pwd', ng-submit='<% if(filters.oauth) { %>!user.localEnabled ? setPassword() : <% } %>changePassword()', novalidate)
25-
7+
form.form(name='form', ng-submit='changePassword(form)', novalidate='')
268
.form-group
279
label Current Password
28-
input.form-control(type='password', name='old', placeholder='ex. password123', ng-model='user.oldPassword', <% if (filters.oauth) { %>ng-disabled='!user.localEnabled', <% } %>mongoose-error='')
29-
p.help-block(ng-show='pwd.old.$error.mongoose')
10+
input.form-control(type='password', name='password', ng-model='user.oldPassword', mongoose-error='')
11+
p.help-block(ng-show='form.password.$error.mongoose')
3012
| {{ errors.other }}
31-
3213
.form-group
3314
label New Password
34-
input.form-control(type='password', name='new', placeholder='ex. GoofyM1ckeyDonald&Pluto', ng-model='user.newPassword', ng-minlength='3', required)
35-
p.help-block(ng-show='(pwd.new.$error.minlength || pwd.new.$error.required) && (pwd.new.$dirty || pwd.submitted)')
15+
input.form-control(type='password', name='newPassword', ng-model='user.newPassword', ng-minlength='3', required='')
16+
p.help-block(ng-show='(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || submitted)')
3617
| Password must be at least 3 characters.
3718

38-
p.help-block {{ message }}
19+
p.help-block {{ message }}
3920

4021
button.btn.btn-lg.btn-primary(type='submit') Save changes
41-
42-
<% if (filters.oauth) { %>
43-
//- .row
44-
//- .col-sm-12
45-
//- h1 Social accounts
46-
47-
//- .col-sm-12
48-
<% } %>
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,17 @@
11
'use strict'
22

33
angular.module '<%= scriptAppName %>'
4-
.controller 'SettingsCtrl', ($scope, Auth) ->
4+
.controller 'SettingsCtrl', ($scope, User, Auth) ->
55
$scope.errors = {}
6+
$scope.changePassword = (form) ->
7+
$scope.submitted = true
68

7-
$scope.user = Auth.getCurrentUser()
8-
$scope.email = {}
9-
10-
getEmail = (user) ->
11-
return [null, null] unless $scope.user.credentials.length
12-
13-
for c in $scope.user.credentials when c.type is 'email'
14-
return [c.value, c.confirmed]
15-
16-
[null, null]
17-
18-
[initialEmail, $scope.email.confirmed] = getEmail $scope.user
19-
20-
$scope.user.email = initialEmail
21-
22-
$scope.changeEmail = ->
23-
if $scope.email.$valid
24-
Auth.changeEmail initialEmail, $scope.user.email
25-
.then ->
26-
$scope.message = 'Email successfully changed'
27-
28-
.catch ->
29-
# TODO: handle errors
30-
$scope.message = ''
31-
32-
$scope.changePassword = ->
33-
$scope.pwd.submitted = true
34-
35-
if $scope.pwd.$valid
9+
if form.$valid
3610
Auth.changePassword $scope.user.oldPassword, $scope.user.newPassword
3711
.then ->
38-
$scope.message = 'Password successfully changed'
12+
$scope.message = 'Password successfully changed.'
3913

4014
.catch ->
41-
$scope.pwd.old.$setValidity 'mongoose', false
15+
form.password.$setValidity 'mongoose', false
4216
$scope.errors.other = 'Incorrect password'
4317
$scope.message = ''
44-
<% if (filters.oauth) { %>
45-
$scope.setPassword = ->
46-
$scope.pwd.submitted = true
47-
48-
if $scope.pwd.$valid
49-
Auth.setPassword $scope.user.newPassword
50-
.then ->
51-
$scope.message = 'Password successfully set'
52-
$scope.user.localEnabled = true
53-
$scope.user.newPassword = ''
54-
55-
.catch ->
56-
$scope.pwd.old.$setValidity 'mongoose', false
57-
$scope.errors.other = 'Another account with that email already exists'
58-
$scope.message = ''
59-
<% } %>
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,21 @@
11
'use strict';
22

33
angular.module('<%= scriptAppName %>')
4-
.controller('SettingsCtrl', function ($scope, Auth) {
4+
.controller('SettingsCtrl', function ($scope, User, Auth) {
55
$scope.errors = {};
66

7-
$scope.user = Auth.getCurrentUser();
8-
$scope.email = {};
9-
10-
var getEmail = function(user) {
11-
if (!$scope.user.credentials.length) {
12-
return null;
13-
}
14-
15-
for(var i in $scope.user.credentials) {
16-
var c = $scope.user.credentials[i];
17-
if(c.type==='email') return [c.value, c.confirmed];
18-
}
19-
};
20-
21-
var tmp = getEmail($scope.user);
22-
23-
var initialEmail = tmp ? tmp[0] : null;
24-
$scope.email.confirmed = tmp ? tmp[1] : null;
25-
26-
$scope.user.email = initialEmail;
27-
28-
$scope.changeEmail = function () {
29-
if($scope.email.$valid) {
30-
Auth.changeEmail(initialEmail, $scope.user.email)
31-
.then(function() {
32-
$scope.message = 'Email successfully changed';
33-
})
34-
.catch(function() {
35-
// TODO: handle errors
36-
$scope.message = '';
37-
});
38-
}
39-
}
40-
41-
$scope.changePassword = function() {
42-
$scope.pwd.submitted = true;
43-
if($scope.pwd.$valid) {
7+
$scope.changePassword = function(form) {
8+
$scope.submitted = true;
9+
if(form.$valid) {
4410
Auth.changePassword( $scope.user.oldPassword, $scope.user.newPassword )
4511
.then( function() {
46-
$scope.message = 'Password successfully changed';
12+
$scope.message = 'Password successfully changed.';
4713
})
4814
.catch( function() {
49-
$scope.pwd.old.$setValidity('mongoose', false);
15+
form.password.$setValidity('mongoose', false);
5016
$scope.errors.other = 'Incorrect password';
5117
$scope.message = '';
5218
});
5319
}
5420
};
55-
<% if (filters.oauth) { %>
56-
$scope.setPassword = function() {
57-
$scope.submitted = true;
58-
if($scope.pwd.$valid) {
59-
Auth.changePassword( $scope.user.newPassword )
60-
.then( function() {
61-
$scope.message = 'Password successfully set';
62-
})
63-
.catch( function() {
64-
$scope.pwd.old.$setValidity('mongoose', false);
65-
$scope.errors.other = 'Another account with that email already exists';
66-
$scope.message = '';
67-
});
68-
}
69-
};
70-
<% } %>
7121
});

Diff for: app/templates/client/app/admin(auth)/admin(css).css

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
.trash { color:rgb(209, 91, 71); }
2-
.confirm { color:rgb(240, 173, 78); }
3-
.confirmed { color:rgb(92, 184, 92); }

Diff for: app/templates/client/app/admin(auth)/admin(html).html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<ul class="list-group">
66
<li class="list-group-item" ng-repeat="user in users">
77
<strong>{{user.name}}</strong><br>
8-
<span class="text-muted">{{user.credentials[0].value}}</span>
9-
<a ng-click="delete(<% if(filters.uibootstrap) { %>user.name + ' (' + user.credentials[0].value + ')', <% } %>user)" class="trash"><span class="glyphicon glyphicon-trash pull-right"></span></a>
8+
<span class="text-muted">{{user.email}}</span>
9+
<a ng-click="delete(user)" class="trash"><span class="glyphicon glyphicon-trash pull-right"></span></a>
1010
</li>
1111
</ul>
1212
</div>

Diff for: app/templates/client/app/admin(auth)/admin(jade).jade

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ div(ng-include='"components/navbar/navbar.html"')
66
li.list-group-item(ng-repeat='user in users')
77
strong {{user.name}}
88
br
9-
span.text-muted {{user.credentials[0].value}}
10-
a.trash(ng-click='delete(<% if(filters.uibootstrap) { %>user.name + " (" + user.credentials[0].value + ")", <% } %>user)')
11-
span.glyphicon.glyphicon-trash.pull-right
9+
span.text-muted {{user.email}}
10+
a.trash(ng-click='delete(user)')
11+
span.glyphicon.glyphicon-trash.pull-right
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
.trash { color:rgb(209, 91, 71); }
2-
.confirm { color:rgb(240, 173, 78); }
3-
.confirmed { color:rgb(92, 184, 92); }
1+
.trash { color:rgb(209, 91, 71); }
-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
.trash { color:rgb(209, 91, 71); }
2-
.confirm { color:rgb(240, 173, 78); }
3-
.confirmed { color:rgb(92, 184, 92); }
+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
.trash
2-
color rgb(209, 91, 71)
3-
4-
.confirm
5-
color: rgb(240, 173, 78)
6-
7-
.confirmed
8-
color: rgb(92, 184, 92)
2+
color rgb(209, 91, 71)

0 commit comments

Comments
 (0)