Skip to content

Commit d586eeb

Browse files
authored
rr/fix/gulp-and-location-layout (#12)
* rr/main-controller (pull request #2) rr/main-controller * fix gulp indexHTML task * removing unecessary elements * main-controller base Approved-by: Roberto Robson Soares Nogueira <[email protected]> * Merged in rr/navigation-bar (pull request #3) rr/navigation-bar * navigation-bar directive * add navigation-bar app.js dependency. set tiny md override md-button-icon Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/side-menu (pull request #4) rr/side-menu Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/ng-route (pull request #5) rr/ng-route * rr/fix/ng-view (pull request #6) rr/fix/ng-view Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/view/home (pull request #7) rr/view/home Approved-by: Roberto Robson Soares Nogueira <[email protected]> * rr/fix/issues/#1-#2 (pull request #8) rr/fix/issues/#1-#2 * view home, set navigation bar title * main-controller set view attribute when current path get changed Approved-by: Roberto Robson Soares Nogueira <[email protected]> * Merged in rr/view/location (pull request #9) rr/view/location * view location init * google maps, services maps, freegeoip location, display locations on the map Approved-by: Roberto Robson Soares Nogueira <[email protected]> * Merged in rr/fix/gulp-and-location-layout (pull request #12) rr/fix/gulp-and-location-layout * gulp server task * set map-form css * sass location.scss fix [view=location] Approved-by: Roberto Robson Soares Nogueira <[email protected]>
1 parent 3bb3aeb commit d586eeb

File tree

4 files changed

+88
-18
lines changed

4 files changed

+88
-18
lines changed

gulp-tasks/webserver.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = function(gulp, modules){
3535
'Serving files on ' + url.url
3636
);
3737

38-
return server.start({
38+
server.start({
3939
port: url.port,
4040
directory: './' + (modules.config.dev ? 'debug' : 'build')
4141
});

src/views/location/location.html

+48-17
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@
99
<div
1010
flex-xs
1111
flex-sm
12-
flex-gt-sm="75"
12+
flex-gt-sm="70"
1313
layout="column"
1414
>
15-
<h2 class="md-title">
16-
Find a website location
17-
</h2>
15+
<div
16+
flex="none"
17+
layout="column"
18+
class="map-form"
19+
>
1820

19-
<div>
21+
<h2 class="md-title">
22+
Find a website location
23+
</h2>
2024

2125
<form layout="row" name="websiteForm">
2226
<md-input-container class="md-block" flex>
@@ -33,9 +37,9 @@ <h2 class="md-title">
3337
</div>
3438
</md-input-container>
3539

36-
<md-button
37-
type="submit"
38-
ng-disabled="websiteForm.$invalid"
40+
<md-button
41+
type="submit"
42+
ng-disabled="websiteForm.$invalid"
3943
class="md-accent md-raised"
4044
ng-click="getWebsiteLocation()"
4145
>
@@ -67,6 +71,7 @@ <h2 class="md-title">
6771
flex
6872
layout="row"
6973
layout-align="center center"
74+
layout-padding
7075
class="md-title error"
7176
>
7277
<span>Sorry, website location is not available.</span>
@@ -79,18 +84,43 @@ <h2 class="md-title">
7984
</div>
8085

8186
<div
82-
flex
87+
flex-xs
88+
flex-sm
89+
flex-gt-sm="30"
8390
layout="column"
8491
>
85-
<h2 class="md-title">
86-
See your current location on the map
87-
</h2>
88-
<md-button
89-
class="md-accent md-raised"
90-
ng-click="getLocation()"
92+
93+
<div
94+
flex="none"
95+
layout="column"
96+
class="map-form"
9197
>
92-
My Location
93-
</md-button>
98+
99+
<h2 class="md-title">
100+
See your location
101+
</h2>
102+
103+
<div
104+
flex="none"
105+
layout="row"
106+
>
107+
<md-button
108+
flex
109+
class="md-accent md-raised"
110+
ng-click="getLocation()"
111+
>
112+
My Location
113+
</md-button>
114+
<md-button
115+
flex
116+
class="md-raised"
117+
ng-click="resetLocation()"
118+
>
119+
Reset
120+
</md-button>
121+
</div>
122+
123+
</div>
94124

95125
<div
96126
layout="row"
@@ -114,6 +144,7 @@ <h2 class="md-title">
114144
flex
115145
layout="row"
116146
layout-align="center center"
147+
layout-padding
117148
class="md-title error"
118149
>
119150
<span>Sorry, your location is not available.</span>

src/views/location/location.js

+11
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@
5656

5757
};
5858

59+
$scope.resetLocation = function(){
60+
mapsService.setStatus(
61+
$scope.userMap,
62+
{
63+
ready: false,
64+
loading: false,
65+
error: false
66+
}
67+
);
68+
};
69+
5970
$scope.getWebsiteLocation = function(){
6071

6172
mapsService.setStatus(

src/views/location/location.scss

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
main-controller[view=location] {
3+
4+
&[device=desktop] {
5+
.map-wrapper {
6+
height: 600px;
7+
}
8+
}
9+
10+
&[device=mobile] {
11+
.map-wrapper {
12+
height: 300px;
13+
}
14+
}
15+
16+
.map-form {
17+
height: 110px;
18+
}
19+
20+
.map-wrapper {
21+
22+
.error {
23+
background-color: #ccc;
24+
}
25+
26+
}
27+
28+
}

0 commit comments

Comments
 (0)