Skip to content

Commit

Permalink
Merge pull request e-mission#553 from shankari/merge_mode_purpose_fin…
Browse files Browse the repository at this point in the history
…al_code

Merge the mode and purpose final code
  • Loading branch information
shankari authored May 7, 2019
2 parents d007bd4 + 9fc4bfa commit 8b9a758
Show file tree
Hide file tree
Showing 25 changed files with 1,422 additions and 161 deletions.
43 changes: 42 additions & 1 deletion www/css/main.diary.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,45 @@ a.item-content {
border-radius: 3px;
margin-left: 3px;
margin-top: 3px;
}
}
.btn-mode-confirm-green,
.btn-mode-confirm-green:hover,
.btn-mode-confirm-green:active,
.btn-purpose-confirm-green,
.btn-purpose-confirm-green:hover,
.btn-purpose-confirm-green:active {
background-color: #30A64A;
color: white;
}
.btn-mode-confirm-white,
.btn-mode-confirm-white:hover,
.btn-mode-confirm-white:active,
.btn-purpose-confirm-white,
.btn-purpose-confirm-white:hover,
.btn-purpose-confirm-white:active {
background-color: #ddd;
color: #333;
font-size: 0.8em;
}
.btn-mode-confirm,
.btn-purpose-confirm {
line-height: 30px;
min-height: 30px;
font-size: 0.8em !important;
width: 115px;
padding: 0;
}
.mode-confirm-container,
.purpose-confirm-container {
margin-top: 5px;
}

.popover {
height: 297px;
width: 230px;
}

#diary-item {
padding: 0;
border-width: 0;
}
2 changes: 1 addition & 1 deletion www/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ button.button.back-button.buttons.button-clear.header-item {
font-size: 9px;
position: absolute;
left: 1%;
top: 275px;
bottom: 15px;
line-height: 16px;
}
.stop-time-tag-lower {
Expand Down
5 changes: 3 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@
<script src="js/main.js"></script>
<script src="js/recent.js"></script>
<script src="js/incident/post-trip-manual.js"></script>
<script src="js/incident/post-trip-prompt.js"></script>
<script src="js/incident/post-trip-map-display.js"></script>
<script src="js/tripconfirm/post-trip-prompt.js"></script>
<script src="js/tripconfirm/post-trip-map-display.js"></script>
<script src="js/tripconfirm/trip-confirm-services.js"></script>
<script src="js/diary.js"></script>
<script src="js/diary/list.js"></script>
<script src="js/diary/current.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion www/js/common/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ angular.module('emission.main.common.map',['emission.main.common.services',
}
console.log("got response, setting display name to "+name);
place_feature.properties.displayName = name;
place_feature.properties.display_name = name;
};
Expand Down
14 changes: 7 additions & 7 deletions www/js/common/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ angular.module('emission.main.common.services', [])
console.log("got response, setting display name to "+name);
switch (mode) {
case 'place':
obj.properties.displayName = name;
obj.properties.display_name = name;
break;
case 'cplace':
obj.displayName = name;
obj.display_name = name;
break;
case 'ctrip':
obj.start_displayName = name;
obj.start_display_name = name;
break;
}

Expand All @@ -193,7 +193,7 @@ angular.module('emission.main.common.services', [])
}
}
console.log("got response, setting display name to "+name);
obj.end_displayName = name;
obj.end_display_name = name;

};
switch (mode) {
Expand Down Expand Up @@ -293,8 +293,8 @@ angular.module('emission.main.common.services', [])
commonGraph.data.graph.common_places.forEach(function(cPlace, index, array) {
commonGraph.data.cPlaceCountMap[cPlace._id.$oid] = cPlace.places.length;
commonGraph.data.cPlaceId2ObjMap[cPlace._id.$oid] = cPlace;
if (angular.isDefined(cPlace.displayName)) {
console.log("For place "+cPlace.id+", already have displayName "+cPlace.displayName);
if (angular.isDefined(cPlace.display_name)) {
console.log("For place "+cPlace.id+", already have display_name "+cPlace.display_name);
} else {
console.log("Don't have display name for end place, going to query nominatim");
commonGraph.getDisplayName('cplace', cPlace);
Expand All @@ -318,7 +318,7 @@ angular.module('emission.main.common.services', [])
"id": place._id.$oid,
"geometry": place.location,
"properties": {
"displayName": place.displayName
"display_name": place.display_name
}
};
});
Expand Down
2 changes: 1 addition & 1 deletion www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ angular.module('emission.controllers', ['emission.splash.updatecheck',
'emission.splash.localnotify',
'emission.survey.launch',
'emission.stats.clientstats',
'emission.incident.posttrip.prompt'])
'emission.tripconfirm.posttrip.prompt'])

.controller('RootCtrl', function($scope) {})

Expand Down
8 changes: 2 additions & 6 deletions www/js/diary/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,11 @@ angular.module('emission.main.diary.detail',['ui-leaflet', 'ng-walkthrough',
$scope.getFormattedDistance = DiaryHelper.getFormattedDistance;
$scope.getSectionDetails = DiaryHelper.getSectionDetails;
$scope.getFormattedTime = DiaryHelper.getFormattedTime;
$scope.getLocalTimeString = DiaryHelper.getLocalTimeString;
$scope.getFormattedTimeRange = DiaryHelper.getFormattedTimeRange;
$scope.getFormattedDuration = DiaryHelper.getFormattedDuration;
$scope.getTripDetails = DiaryHelper.getTripDetails
$scope.tripgj = DiaryHelper.directiveForTrip($scope.trip);

$scope.getTripBackground = function() {
var ret_val = DiaryHelper.getTripBackground($scope.tripgj);
return ret_val;
}
$scope.tripgj = Timeline.getTripWrapper($stateParams.tripId);

console.log("trip.start_place = " + JSON.stringify($scope.trip.start_place));

Expand Down
Loading

0 comments on commit 8b9a758

Please sign in to comment.