Skip to content

Commit

Permalink
updated ui
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniespratley committed Jan 11, 2015
1 parent 7f2c07c commit fafab43
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .cfignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ content
db
docs
dist
test
www/cms-content
test
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,8 @@ module.exports = function (grunt) {
'concurrent:dist',
'autoprefixer',
'concat',
//'ngmin',
'ngtemplates',
'ngmin',
'copy:dist',
//'cdnify',
'cssmin',
Expand Down
10 changes: 4 additions & 6 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,18 @@

<div id="app" class="app" data-ng-controller="AppCtrl" data-ng-cloak>
<header id="header" data-ng-include="App.layout.header">
<!--Header content gets injected here.-->

</header>
<section id="content" data-ng-include="App.layout.content">
<!--Section content gets injected here.-->

</section>
<footer id="footer" data-ng-include="App.layout.footer">
<!--Footer content gets injected here.-->

</footer>

</div>


<!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand All @@ -91,7 +90,7 @@
ga('send', 'pageview');
</script>

<!--script src="/socket.io/socket.io.js"></script--!>

<!-- build:js({.tmp,app}) scripts/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/jquery.js"></script>
Expand All @@ -103,7 +102,6 @@
<script src="bower_components/angular-ui-utils/ui-utils.js"></script>
<script src="bower_components/angular-strap/dist/angular-strap.min.js"></script>
<script src="bower_components/angular-strap/dist/angular-strap.tpl.min.js"></script>

<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-resource/angular-resource.js"></script>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"finalhandler": "^0.3.3",
"fs-extra": "^0.12.0",
"http-proxy": "^1.3.0",
"jade": "^1.8.2",
"jps-ds": "~0.0.2",
"jquery": "~2.1.0",
"jquery-file-upload-middleware": "~0.1.1",
Expand Down
25 changes: 16 additions & 9 deletions routes/cms-passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,28 @@ var cmsPassport = function(config, app) {

for (var i = 0; i < u.emails.length; i++) {
var email = u.emails[i].value;

User.findOne({
email : email
}, function(err, user) {
if (err) {
return done(err);
}

if (!user) {
console.warn('create user', u);
return done(null, false);
} else {
user.google = u;
user.update( { username: user.username }, user, function(){
user.update({
username : user.username
}, user, function() {
console.warn('update user', u);
done(null, user);
} );
done(null, user);
});

}

});
}

Expand Down Expand Up @@ -181,8 +183,12 @@ var cmsPassport = function(config, app) {
app.use(express.static(path.resolve(config.staticDir)));
app.use(express.static(path.resolve(config.publicDir)));
//app.set('views', path.resolve(__dirname + path.sep + 'views'));
app.set('views', path.resolve(config.publicDir));
//app.set('views', path.resolve(config.staticDir + path.sep + 'views'));
//app.set('view engine', 'ejs');
//app.set('view engine', 'html');

//app.set('views', __dirname + '/views');
//app.engine('html', require('ejs').renderFile);
//app.engine('ejs', require('ejs-locals'));

app.use(cookieParser());
Expand Down Expand Up @@ -217,6 +223,7 @@ var cmsPassport = function(config, app) {
message : 'Please login',
status : 'info'
});
next();
});

app.get('/account', ensureAuthenticated, function(req, res) {
Expand All @@ -227,7 +234,7 @@ var cmsPassport = function(config, app) {
});

app.get('/login', function(req, res) {
res.render('login', {
res.json(200, {
user : req.user,
message : 'Please login',
status : 'warning'
Expand Down
2 changes: 1 addition & 1 deletion routes/cms-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = function (config, app) {
console.log('cms-server', req.method);
});
router.get('/', function(res, req, next){
req.send(config.publicDir + path.sep + 'index.html');
req.send(config.staticDir + path.sep + 'index.html');
next();
});

Expand Down

0 comments on commit fafab43

Please sign in to comment.