diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..439b9cf
Binary files /dev/null and b/.DS_Store differ
diff --git a/.bowerrc b/.bowerrc
new file mode 100644
index 0000000..beb7358
--- /dev/null
+++ b/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory" : "client/bower_components"
+}
\ No newline at end of file
diff --git a/Gruntfile.js b/Gruntfile.js
index f0cc37b..c7101bb 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -12,7 +12,7 @@ module.exports = function (grunt) {
bower: {
dest: 'client/dist/bower.js',
src: ['client/bower_components/jquery/jquery.js',
- 'client/bower_components/lodash/lodash.compat.js',
+ 'client/bower_components/lodash/dist/lodash.compat.js',
'client/bower_components/eventEmitter/EventEmitter.js',
'client/bower_components/get-style-property/get-style-property.js',
'client/bower_components/get-size/get-size.js',
@@ -24,7 +24,7 @@ module.exports = function (grunt) {
'client/bower_components/masonry/masonry.js',
'client/bower_components/imagesloaded/imagesloaded.js',
'client/bower_components/angular/angular.js',
- 'client/bower_components/angular-ui-router/angular-ui-router.js',
+ 'client/bower_components/angular-ui-router/release/angular-ui-router.min.js',
'client/bower_components/angular-masonry/angular-masonry.js',
'client/bower_components/angular-strap/dist/angular-strap.min.js',
'client/bower_components/angular-strap/dist/angular-strap.tpl.min.js',
@@ -118,10 +118,10 @@ module.exports = function (grunt) {
nodemon.stdout.pipe(process.stdout);
nodemon.stderr.pipe(process.stderr);
- grunt.task.run(['clean', 'concat:bower', 'concat:client', 'stylus', 'uglify:dev', 'watch']);
+ grunt.task.run(['clean', 'concat:bower', 'concat:client', 'stylus', 'uglify:dev' , 'watch']);
});
- grunt.registerTask('build', ['clean', 'bower', 'concat:bower', 'concat:client', 'stylus', 'uglify:build']);
+ grunt.registerTask('build', ['clean', 'bower', 'concat:bower', 'concat:client', 'stylus','uglify:build']);
grunt.registerTask('test', ['mochaTest']);
};
diff --git a/bower.json b/bower.json
index 4ae0b16..ca278e1 100644
--- a/bower.json
+++ b/bower.json
@@ -18,11 +18,15 @@
"tests"
],
"dependencies": {
+ "angular": "~1.3",
"angular-masonry": "~0.9.0",
- "angular": "~1.2.22",
"jquery": "~2.1.1",
"lodash": "~2.4.1",
"angular-ui-router": "~0.2.10",
- "angular-strap": "~2.1.1"
+ "angular-strap": "~2.1.1",
+ "angular-socket-io": "~0.6.0"
+ },
+ "resolutions": {
+ "angular": "~1.3"
}
}
diff --git a/client/app/app.js b/client/app/app.js
index 85343be..4e1b4f5 100644
--- a/client/app/app.js
+++ b/client/app/app.js
@@ -1,7 +1,11 @@
+// The applcations states are created using ui-router .
+//Here the controller,templateURL that each state uses are specified too.
+
(function(){
-'use strict';
+'use strict';
var WaddleConfig = function ($stateProvider, $urlRouterProvider) {
+ //creates an application state
$stateProvider
.state('frontpage', {
url: '/',
@@ -36,8 +40,31 @@ var WaddleConfig = function ($stateProvider, $urlRouterProvider) {
})
.state('map.feed', {
url: '/feed',
- templateUrl: '../app/modules/pages/map/feed.html',
- controller: 'FeedController as mapFeed'
+ views: {
+ '': {
+ templateUrl: '../app/modules/pages/map/feed.html',
+ controller: 'FeedController as mapFeed'
+ },
+ 'profile': {
+ templateUrl: '../app/modules/pages/map/profile.html',
+ controller: 'ProfileController'
+ }
+ },
+ })
+ .state('map.feed.checkin', {
+ url: '/checkin',
+ templateUrl: '../app/modules/pages/map/checkin.html',
+ controller: 'CheckinController'
+ })
+ .state('map.feed.checkin.post', {
+ url: '/:venue',
+ templateUrl: '../app/modules/pages/map/checkinpost.html',
+ controller: 'CheckinController'
+ })
+ .state('map.feed.checkin.post.photoupload', {
+ url: '/photoupload',
+ templateUrl: '../app/modules/pages/map/photoupload.html',
+ controller: 'CheckinController'
})
.state('map.feed.footprint', {
url: '/:footprint',
@@ -46,12 +73,13 @@ var WaddleConfig = function ($stateProvider, $urlRouterProvider) {
.state('map.footprints', {
url: '/footprints',
templateUrl: '../app/modules/pages/map/footprints.html',
- controller: 'FeedController as mapFootprints'
+ controller: 'FeedController as mapFeed'
})
-
+//when none of the above state match the URL then redirect the page to state represented by '/'
$urlRouterProvider.otherwise('/');
};
+//All the depenedent modules in the app are registered . Through config method application states are configired .
angular.module('waddle', [
'waddle.controllers',
'waddle.directives',
@@ -61,7 +89,8 @@ angular.module('waddle', [
'mgcrea.ngStrap.helpers.dimensions',
'mgcrea.ngStrap.tooltip',
'mgcrea.ngStrap.dropdown',
- 'ngSanitize'
+ 'ngSanitize',
+ 'btford.socket-io'
]).config(['$stateProvider', '$urlRouterProvider', WaddleConfig]);
// angular.module('mgcrea.ngStrap')
diff --git a/client/app/modules/controllers.js b/client/app/modules/controllers.js
index 0996f61..ce030df 100644
--- a/client/app/modules/controllers.js
+++ b/client/app/modules/controllers.js
@@ -1,3 +1,3 @@
(function() {
-angular.module('waddle.controllers', ['waddle.frontpage', 'waddle.map', 'waddle.feed', 'waddle.friends', 'waddle.navbar']);
+angular.module('waddle.controllers', ['waddle.frontpage', 'waddle.map', 'waddle.feed', 'waddle.profile', 'waddle.friends', 'waddle.navbar', 'waddle.checkin']);
})();
\ No newline at end of file
diff --git a/client/app/modules/pages/frontpage/frontpage.html b/client/app/modules/pages/frontpage/frontpage.html
index f2fd741..97ae508 100644
--- a/client/app/modules/pages/frontpage/frontpage.html
+++ b/client/app/modules/pages/frontpage/frontpage.html
@@ -9,6 +9,7 @@
{{comment.commenter.name}}
++
{{comment.comment.text}}