Fixed bug

Fixed a bug where if you check a box in the poll before you right your name it does not get saved to the server
This commit is contained in:
Luke Vella 2015-01-12 23:58:48 +01:00
parent bc1e25377c
commit 861bea5400
10 changed files with 24 additions and 10 deletions

View file

@ -2,9 +2,6 @@ module.exports = function(app) {
// Insert routes below // Insert routes below
app.use('/api/event', require('../api/event')); app.use('/api/event', require('../api/event'));
app.use('/about', function(req, res){
res.render('about.ejs');
});
// All undefined asset or api routes should return a 404 // All undefined asset or api routes should return a 404
// app.route('/:url(api|auth|components|app|bower_components|assets)/*') // app.route('/:url(api|auth|components|app|bower_components|assets)/*')
// .get(errors[404]); // .get(errors[404]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,5 @@
angular.module('rallly')
.controller('AboutCtrl', function(){
$(".nav-link").removeClass('active');
$(".nav-link[href='/about']").addClass('active');
});

View file

@ -2,6 +2,7 @@ angular.module('rallly')
.controller('EventCtrl', function($scope, $http, $state, Event, Participant){ .controller('EventCtrl', function($scope, $http, $state, Event, Participant){
$(".nav-link").removeClass('active'); $(".nav-link").removeClass('active');
var id = $state.params.id; var id = $state.params.id;
$scope.participant = {};
$scope.event = Event.get({id:id}, function(data){ $scope.event = Event.get({id:id}, function(data){
$scope.eventUrl = $state.href('event', { $scope.eventUrl = $state.href('event', {
id: $scope.event._id id: $scope.event._id

View file

@ -1,5 +1,6 @@
angular.module('rallly') angular.module('rallly')
.controller('NewEventCtrl', function($scope, $http, $state, Event){ .controller('NewEventCtrl', function($scope, $http, $state, Event){
$(".nav-link").removeClass('active');
$(".nav-link[href='/']").addClass('active'); $(".nav-link[href='/']").addClass('active');
$scope.submit = function(){ $scope.submit = function(){

View file

@ -10,7 +10,8 @@ angular.module('rallly', ['ui.router','ngResource','ngFx'])
}) })
.state('about', { .state('about', {
url : '/about', url : '/about',
templateUrl : 'templates/about.html' templateUrl : 'templates/about.html',
controller : 'AboutCtrl'
}) })
.state('notfound', { .state('notfound', {
url : '/notfound', url : '/notfound',

View file

@ -17,9 +17,12 @@
display:block; display:block;
text-decoration:none; text-decoration:none;
color: $dark-gray-clr; color: $dark-gray-clr;
&:hover, &.active { &:hover {
color: $text-clr; color: $text-clr;
} }
&.active {
color: $blue-clr;
}
} }
} }
} }

View file

@ -1 +1,7 @@
<h1>About</h1> <div style="max-width:500px">
<h1>What is Rallly?</h1>
<h2>Rallly is a collaborative scheduling service that makes deciding on a date fast and easy.</h2>
<p>
Hi, my name is Luke and I created Rallly as side project to help me learn some new technologies. I decided to publish it because I thought other people might find it useful. Rallly is a completely free service. In fact it is even open source. You can look at the latest source code on Github.
</p>
</div>