-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from teeeg/master
- Loading branch information
Showing
11 changed files
with
268 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
@function grey($opacity){ | ||
@return rgba(136, 207, 48,$opacity); | ||
} | ||
|
||
.passenger { | ||
h1 { | ||
@include fontlight; | ||
text-align: center; | ||
} | ||
} | ||
|
||
.passenger-block { | ||
vertical-align: middle; | ||
text-align: center; | ||
padding: 5% 0; | ||
margin: 2% 0; | ||
width: 100%; | ||
border: 1px solid lightgrey; | ||
} | ||
|
||
/////////////////////////////////// | ||
|
||
.passenger-role { | ||
@include fontlight; | ||
padding: 2% 0; | ||
webkit-user-select: none; | ||
|
||
.passenger-drivers { | ||
user-select: none; | ||
cursor: pointer; | ||
padding: 1%; | ||
border-bottom-style: solid; | ||
border-bottom-width: thin; | ||
border-bottom-color: $green; | ||
transition: all 200ms ease; | ||
} | ||
|
||
.expanded { | ||
// background-color: grey(0.3); | ||
margin-left: -16px; | ||
margin-right: -16px; | ||
transition: all 100ms ease; | ||
box-shadow: 0px 2px 5px lightgrey; | ||
} | ||
|
||
.path { | ||
height: 100%; | ||
display: table; | ||
width: 50%; | ||
padding-left: 2%; | ||
margin: 2% 0; | ||
font-size: 1.5rem; | ||
} | ||
|
||
.deviation { | ||
height: 100%; | ||
display: table; | ||
width: 50%; | ||
padding-left: 2%; | ||
margin: 2% 0; | ||
font-size: 2rem; | ||
} | ||
|
||
.box { | ||
display: table-cell; | ||
text-align: center; | ||
vertical-align: middle; | ||
} | ||
|
||
.sidebar { | ||
width: 100px; | ||
font-size: 1.2rem; | ||
} | ||
|
||
.details { | ||
width: 100%; | ||
.route { | ||
img {width: 50%;} | ||
text-align: right; | ||
display: inline-block; | ||
width: 60%; | ||
} | ||
.info { | ||
text-align: right; | ||
display: inline-block; | ||
width: 39%; | ||
text-align: left; | ||
} | ||
} | ||
} | ||
|
||
|
||
<div class="passenger" ng-controller="PassengerController"> | ||
<h1>Available Drivers</h1> | ||
|
||
<div class="passenger-role"> | ||
<div class="passenger-drivers" | ||
ng-class="{ 'expanded' : isSelected}" | ||
ng-repeat='driver in passenger.drivers'> | ||
<div class="header" ng-init="isSelected = false" | ||
ng-click="isSelected = !isSelected"> | ||
<div class="box sidebar"> | ||
<img src = "{{ driver.img }}"/> | ||
{{ driver.name }} | ||
</div> | ||
<div class="box path"> | ||
début: <b>{{ driver.start }}</b> <br> | ||
fin: <b>{{ driver.end }}</b> | ||
</div> | ||
<div class="box deviation"> | ||
{{ driver.deviation }} | ||
</div> | ||
</div> | ||
<div class="details" ng-show="isSelected"> | ||
<div class="route"><img src="/map.png"></div> | ||
<div class="info"> | ||
<button ng-click="pingDriver()">Contact Driver</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
;(function () { | ||
'use strict'; | ||
|
||
angular | ||
.module('core','app') | ||
.factory('UserFactory', UserFactory); | ||
|
||
function UserFactory($scope, $http, $q, $state){ | ||
var user = this; | ||
|
||
// gets all form data from compose.html | ||
function createUser (user) { | ||
user = angular.copy(user); | ||
return user; | ||
} | ||
}).call(this); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
describe('Controller: testController', function () { | ||
beforeEach(module('core:ComposeController')) | ||
// describe('Controller: testController', function () { | ||
// beforeEach(module('core:ComposeController')) | ||
|
||
var scope, controller, httpBackend, authRequestHandler; | ||
// var scope, controller, httpBackend, authRequestHandler; | ||
|
||
|
||
beforeEach(inject(function ($controller, $rootScope, _$httpBackend_) { | ||
scope = $rootScope.$new(); | ||
httpBackend = _$httpBackend_; | ||
// beforeEach(inject(function ($controller, $rootScope, _$httpBackend_) { | ||
// scope = $rootScope.$new(); | ||
// httpBackend = _$httpBackend_; | ||
|
||
controller = $controller('ComposeController as vm', { | ||
$scope: scope, | ||
}); | ||
// controller = $controller('ComposeController as vm', { | ||
// $scope: scope, | ||
// }); | ||
|
||
scope.vm.user = {}; | ||
// scope.vm.user = {}; | ||
|
||
spyOn(controller, 'findCoordinates').and.callFake(function () { | ||
console.log('hi'); | ||
}); | ||
// spyOn(controller, 'findCoordinates').and.callFake(function () { | ||
// console.log('hi'); | ||
// }); | ||
|
||
})); | ||
// })); | ||
|
||
afterEach(function () { | ||
httpBackend.verifyNoOutstandingExpectation(); | ||
httpBackend.verifyNoOutstandingRequest(); | ||
}) | ||
// afterEach(function () { | ||
// httpBackend.verifyNoOutstandingExpectation(); | ||
// httpBackend.verifyNoOutstandingRequest(); | ||
// }) | ||
|
||
it('should return copy user', function () { | ||
scope.vm.user.name = 'Jon' | ||
scope.vm.createUser( scope.vm.user.name ); | ||
// it('should return copy user', function () { | ||
// scope.vm.user.name = 'Jon' | ||
// scope.vm.createUser( scope.vm.user.name ); | ||
|
||
expect(scope.vm.user).toEqual( { name: 'Jon' } ); | ||
}); | ||
// expect(scope.vm.user).toEqual( { name: 'Jon' } ); | ||
// }); | ||
|
||
// it('when called returns the requested value', function () { | ||
// expect(scope.vm.user).toEqual(10); | ||
// }); | ||
// // it('when called returns the requested value', function () { | ||
// // expect(scope.vm.user).toEqual(10); | ||
// // }); | ||
|
||
}); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ <h1>Create</h1> | |
|
||
<div class="compose-id"> | ||
<span>Email</span> | ||
<input type="text" ng-model="user.name" placeholder="[email protected]"> | ||
<input type="text" ng-model="user.id" placeholder="[email protected]"> | ||
</div> | ||
|
||
<div class="compose-submit"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.