Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
awhartonDE committed Oct 24, 2015
2 parents 8f0332d + 48e73b9 commit 56d6f5f
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 62 deletions.
1 change: 1 addition & 0 deletions public/css/scss/defaults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $darkerBlue: #2e6cb5;
$darkYellow: #e9d518;
$lightYellow: #fff100;
$grey: #404041;
$darkGrey: #333;
$black: #000;

// Font sizes
Expand Down
48 changes: 21 additions & 27 deletions public/css/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@ form[role="search"] {
letter-spacing: .1em;
text-align: center;
}
}

.register-now-form {
input, button {
width: 100%;
outline: 0;
padding: 5px;
}
input {
border: 2px solid $blue;
}
.register-now-form, .sign-up-now-form {
input, button {
width: 100%;
outline: 0;
padding: 5px;
}
input {
border: 2px solid $blue;
}
}

Expand Down Expand Up @@ -267,12 +267,10 @@ form[role="search"] {
font-weight: 800;
color: $darkYellow;
position: relative;
background-size: contain;
background-repeat: no-repeat;
background-position: 0 -15px;

&.adopt-a-highway, &.car-wash, &.food-drive, &.run-volunteer {
background-size: contain;
background-repeat: no-repeat;
background-position: 0 -15px;
}

&.odd-listing {
background-color: $blue;
Expand Down Expand Up @@ -332,35 +330,31 @@ form[role="search"] {
bottom: 0;
width: 100%;
text-align: center;
-moz-box-shadow: inset black 0 -1px;
-webkit-box-shadow: inset black 0 -1px;
box-shadow: inset black 0 -1px;
-moz-box-shadow: inset $black 0 -1px;
-webkit-box-shadow: inset $black 0 -1px;
box-shadow: inset $black 0 -1px;

button {
font-weight: 400;
font-size: $font-size-medium;
color: $white;
background-color: $black;
width: 33%;
width: 50%;
float: left;
border: 0;
border-right: 1px solid #2a79c1;
-moz-box-shadow: inset -1px 0 0 black;
-webkit-box-shadow: inset -1px 0 0 black;
box-shadow: inset -1px 0 0 black;
border-right: 1px solid $black;
border-left: 1px solid $darkGrey;
text-align: center;
vertical-align: middle;
height: 50px;
text-transform: uppercase;
outline: 0;

&:nth-of-type(2) {
width: 34%;
&:first-of-type {
border-left-width: 0;
}

&:last-of-type {
border-width: 0;
box-shadow: inset 0 0 0;
border-right-width: 0;
}
}

Expand Down
43 changes: 20 additions & 23 deletions public/css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/css/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 50 additions & 6 deletions public/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var app = ngModule('hrApp', [
'globalNav',
'ui.router',
'geolocation',
'create'
'createEvent'
]);

ngModule('globalNav', [])
Expand Down Expand Up @@ -97,6 +97,17 @@ app.service('eventsService', [
}
]);

app.service('createEventService', [
'$http', function ($http) {
'use strict';
var service = this;

service.createEvent = function (event) {
console.log(event);
}
}
])

// THIS IS A SERVICE. RETURN THINGS HERE
app.service('donationService', [
'$http', 'geolocation', function ($http, geoLocation) {
Expand Down Expand Up @@ -289,12 +300,45 @@ ngModule('myAccount', [])
}
]);

ngModule('create', [])
ngModule('createEvent', [])
.directive('createEventPage', function () {
return {
restrict: 'E',
bindToController: true,
controller: 'createController',
controllerAs: 'createController',
replace: true,
scope: {}

}
})
.controller('createController', [
'$scope',
'createService',
'createEventService',
function ($scope, createService) {
var self = this;
console.log($scope);
self.createEvent = function () {
console.log('createEvent in controller');
var event = {
name: $scope.name,
website: $scope.website,
description: $scope.description,
address: $scope.address,
city: $scope.city,
state: $scope.state,
zip: $scope.zip,
contact_name: $scope.contact_name,
contact_phone: $scope.contact_phone,
contact_email: $scope.contact_email,
volunteers_min: $scope.volunteers_min,
volunteers_max: $scope.volunteers_max,
img: $scope.img,
start_date: $scope.start_date,
end_date: $scope.end_date
};
createService.createEvent(event);
}
}
]);

Expand Down Expand Up @@ -344,9 +388,9 @@ app.config(function ($stateProvider, $urlRouterProvider) {
templateUrl: '/views/my-account.html',
controller: 'myAccountPageController'
})
.state('create', {
url: '/create',
templateUrl: '/views/create.html',
.state('createEvent', {
url: '/create/event',
templateUrl: '/views/create-event.html',
controller: 'createController'
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<input type="text" class="form-control" data-ng-model="createController.start_date" placeholder="Start Date">
<input type="text" class="form-control" data-ng-model="createController.end_date" placeholder="End Date">
</div>
<button type="submit" data-ng-click="createController.runSearch(createController.searchText)" class="btn btn-default">Submit</button>
<button type="submit" data-ng-click="createController.createEvent()" class="btn btn-default">Submit</button>
</form>
</div>
</div>
Expand Down
Loading

0 comments on commit 56d6f5f

Please sign in to comment.