diff --git a/biomed-frontend/bower.json b/biomed-frontend/bower.json index 2ea137b..d44897f 100644 --- a/biomed-frontend/bower.json +++ b/biomed-frontend/bower.json @@ -12,6 +12,7 @@ "masonry": "~3.1.5", "angular-masonry": "~0.9.1", "imagesloaded": "~3.1.8", - "jquery-colorbox": "~1.5.14" + "jquery-colorbox": "~1.5.14", + "angular-foundation": "~0.4.0" } } diff --git a/biomed-frontend/gulpfile.js b/biomed-frontend/gulpfile.js index f6925d6..b4824ad 100644 --- a/biomed-frontend/gulpfile.js +++ b/biomed-frontend/gulpfile.js @@ -30,6 +30,8 @@ gulp.task('vendor', function() { 'vendor/angular-resource/angular-resource.js', 'vendor/angular-sanitize/angular-sanitize.js', 'vendor/angular-ui-router/release/angular-ui-router.js', + 'vendor/angular-foundation/mm-foundation.min.js', + 'vendor/angular-foundation/mm-foundation-tpls.min.js', 'vendor/lodash/dist/lodash.js', 'vendor/masonry/dist/masonry.pkgd.js', 'vendor/angular-masonry/angular-masonry.js', @@ -47,7 +49,7 @@ gulp.task('js', function() { .pipe(sourcemaps.init()) .pipe(templates({ standalone: true })); - var js = gulp.src(['src/**/imdex.js', 'src/**/*.js']) + var js = gulp.src(['src/**/index.js', 'src/**/*.js']) .pipe(plumber()) .pipe(sourcemaps.init()) .pipe(concat('src.js')) diff --git a/biomed-frontend/src/app/controllers.js b/biomed-frontend/src/app/controllers.js new file mode 100644 index 0000000..7670096 --- /dev/null +++ b/biomed-frontend/src/app/controllers.js @@ -0,0 +1,32 @@ +angular.module('biomed-frontend') +.controller('NavCtrl', function($scope, $modal) { + + $scope.showEmail = function() { + var modalInstance = $modal.open({ + templateUrl: 'app/email.html', + controller: 'EmailCtrl' + }); + } + +}) +.controller('EmailCtrl', function($scope, $http, $modalInstance) { + + $scope.model = {}; + + $scope.send = function() { + console.log($scope.model); + + $http.post('/api/email', $scope.model) + .success(function() { + $modalInstance.close(); + }) + .error(function() { + $modalInstance.close(); + }); + }; + + $scope.close = function() { + $modalInstance.close(); + } + +}); diff --git a/biomed-frontend/src/app/email.html b/biomed-frontend/src/app/email.html new file mode 100644 index 0000000..3887540 --- /dev/null +++ b/biomed-frontend/src/app/email.html @@ -0,0 +1,32 @@ +