From 6135fc02677e32ea7600698742d91893d9d040af Mon Sep 17 00:00:00 2001
From: arnaucode
Date: Sun, 29 Jan 2017 00:17:22 +0100
Subject: [PATCH] commit
---
README.md | 23 ++++---------
www/css/style.css | 65 +++++++++++++++++++++++++++++++++++
www/js/app.js | 4 +--
www/js/offerCar.js | 33 +++++++++++-------
www/js/travel.js | 14 ++++++--
www/templates/help.html | 69 +++++++++++++++++++++++++-------------
www/templates/main.html | 1 +
www/templates/menu.html | 4 +--
www/templates/travel.html | 56 ++++++++++++++++++++++++-------
www/templates/travels.html | 19 ++++-------
10 files changed, 202 insertions(+), 86 deletions(-)
diff --git a/README.md b/README.md
index 1d86f84..bc95ccd 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,11 @@
-# collectivecarApp
+# carsincommonApp
-server code: https://github.com/idoctnef/collectivecarServer
+server code: https://github.com/arnaucode/carsincommonServer
-##To Do List:
-(Backend and Frontend common thins, are in the Backend readme.md)
-**Frontend:**
+**ToDos:**
```
--translate system --> done
-
--quan el login falla, que avisi de que ha fallat
-
-
--UX design
--interface graphic design
--icons
--api more secure and robust (comprovations, hash passwords, ...)
-
--web page (webapp) --> (de moment es pot penjar la app en versió web tal qual,
- que es podrà fer servir des d'un navegador com si fós la app)
+-page for user to view joins that has done
+-allow travel crator to accept join petitions and reject people
+-add to travel the date of destination
```
diff --git a/www/css/style.css b/www/css/style.css
index 4c814f3..3067635 100644
--- a/www/css/style.css
+++ b/www/css/style.css
@@ -134,6 +134,47 @@
color: #ffffff!important;
}*/
+.o_grey50{
+ background: #FAFAFA!important;
+ color: #000000!important;
+}
+.o_grey100{
+ background: #F5F5F5!important;
+ color: #000000!important;
+}
+.o_grey200{
+ background: #EEEEEE!important;
+ color: #000000!important;
+}
+.o_grey300{
+ background: #E0E0E0!important;
+ color: #000000!important;
+}
+.o_grey400{
+ background: #BDBDBD!important;
+ color: #000000!important;
+}
+.o_grey500{
+ background: #9E9E9E!important;
+ color: #000000!important;
+}
+.o_grey600{
+ background: #757575!important;
+ color: #ffffff!important;
+}
+.o_grey700{
+ background: #616161!important;
+ color: #ffffff!important;
+}
+.o_grey800{
+ background: #424242!important;
+ color: #ffffff!important;
+}
+.o_grey900{
+ background: #212121!important;
+ color: #ffffff!important;
+}
+
.o_purple50{
background: #EDE7F6!important;
color: #000000!important;
@@ -210,6 +251,30 @@
.o_text_white{
color: #ffffff!important;
}
+
+.o_text_grey400{
+ color: #BDBDBD!important;
+}
+.o_text_grey500{
+ color: #9E9E9E!important;
+}
+.o_text_grey600{
+ color: #757575!important;
+}
+.o_text_grey700{
+ color: #616161!important;
+}
+.o_text_grey800{
+ color: #424242!important;
+}
+.o_text_grey900{
+ color: #212121!important;
+}
+
+
+.o_text_purple300{
+ color: #9575CD!important;
+}
.o_text_purple400{
color: #7E57C2!important;
}
diff --git a/www/js/app.js b/www/js/app.js
index 01d28e7..2b72f12 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -6,9 +6,9 @@
// 'starter.controllers' is found in controllers.js
-//var urlapi = "http://localhost:3000/api/";
+var urlapi = "http://localhost:3000/api/";
//var urlapi="https://collectivecar.paas.primustech.io/api/";
-var urlapi="http://147.83.7.158:3000/api/";
+//var urlapi="http://147.83.7.158:3000/api/";
angular.module('starter', [
diff --git a/www/js/offerCar.js b/www/js/offerCar.js
index bc5ad57..ed00692 100644
--- a/www/js/offerCar.js
+++ b/www/js/offerCar.js
@@ -47,24 +47,31 @@ angular.module('app.offerCar', ['pascalprecht.translate', 'ui-leaflet'])
console.log($scope.newtravel.to.name);
$http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
.then(function(data) {
- $scope.newtravel.from.lat=data.data[0].lat;
- $scope.newtravel.from.long=data.data[0].lon;
- $scope.newtravel.from.name=data.data[0].display_name;
- $scope.markers.push({
- lat: Number(data.data[0].lat),
- lng: Number(data.data[0].lon),
- message: data.data[0].display_name
- });
- $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
- .then(function(data) {
- $scope.newtravel.to.lat=data.data[0].lat;
- $scope.newtravel.to.long=data.data[0].lon;
- $scope.newtravel.to.name=data.data[0].display_name;
+ console.log(data);
+ if(data.data[0])
+ {
+ $scope.newtravel.from.lat=data.data[0].lat;
+ $scope.newtravel.from.long=data.data[0].lon;
+ $scope.newtravel.from.name=data.data[0].display_name;
$scope.markers.push({
lat: Number(data.data[0].lat),
lng: Number(data.data[0].lon),
message: data.data[0].display_name
});
+ }
+ $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
+ .then(function(data) {
+ if(data.data[0])
+ {
+ $scope.newtravel.to.lat=data.data[0].lat;
+ $scope.newtravel.to.long=data.data[0].lon;
+ $scope.newtravel.to.name=data.data[0].display_name;
+ $scope.markers.push({
+ lat: Number(data.data[0].lat),
+ lng: Number(data.data[0].lon),
+ message: data.data[0].display_name
+ });
+ }
});
});
diff --git a/www/js/travel.js b/www/js/travel.js
index eaf34e8..a1d8dc0 100644
--- a/www/js/travel.js
+++ b/www/js/travel.js
@@ -1,13 +1,15 @@
angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
.controller('TravelCtrl', function($scope, $stateParams, $http,
- $ionicModal, $ionicLoading, $ionicPopup, $filter) {
+ $ionicModal, $ionicLoading, $ionicPopup, $filter,
+ leafletData, leafletBoundsHelpers) {
$scope.center= {
- lat: 0,
+ /*lat: 0,
lng: 0,
- zoom: 1
+ zoom: 1*/
};
+ $scope.bounds={};
$scope.markers=[];
$scope.tiles= {
url: "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
@@ -35,6 +37,12 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
lng: Number($scope.travel.to.long),
message: $scope.travel.to.name
});
+ $scope.center= {
+ lat: (Number($scope.travel.from.lat)+Number($scope.travel.to.lat))/2,
+ lng: (Number($scope.travel.from.long)+Number($scope.travel.to.long))/2,
+ zoom: 4
+ };
+
$scope.$broadcast('scroll.refreshComplete');//refresher stop
}, function(data){
diff --git a/www/templates/help.html b/www/templates/help.html
index f779e9f..325669d 100644
--- a/www/templates/help.html
+++ b/www/templates/help.html
@@ -1,7 +1,7 @@
- (help instructions here)
+ (not ready yet)
This is a car sharing App.
@@ -11,30 +11,51 @@
There are 3 types of publication:
+
+
+
+
+
+ Travel offer
+
+
+ For example: I'm going with my car to a place, in my car can go more people.
+
+
+
+
+
+
+
+
+ Travel ask
+
+
+ For example: I need to travel a place, can somebody take me there?
+
+
+
+
+
+
+
+
+ Package send ask
+
+
+ For example: I need to send some package to a place, can somebody carry it to there?
+
+
+
+
+
+
+
+
-
- -
-
Travel offer
-
- For example: I'm going with my car to a place, in my car can go more people.
-
- -
-
Travel ask
-
- For example: I need to travel a place, can somebody take me there?
-
- -
-
Package send ask
-
- For example: I need to send some package to a place, can somebody carry it to there?
-
-
-
-
- To create a new publication, just need to go in to 'Travels' section in the main menu, and select one of the 3 top buttons:
-
-
-
+ To create a new publication, just need to click the 'New Travel' button on the right of footer menu,
+ and select wich type of publication is.
+
(not finished yet)...
diff --git a/www/templates/main.html b/www/templates/main.html
index 071ee38..4ea43a0 100644
--- a/www/templates/main.html
+++ b/www/templates/main.html
@@ -23,6 +23,7 @@
{{'Notifications' | translate }}
+ {{storageuser.notifications.length}}
diff --git a/www/templates/menu.html b/www/templates/menu.html
index 4d00e2d..62d1b7f 100644
--- a/www/templates/menu.html
+++ b/www/templates/menu.html
@@ -49,8 +49,8 @@
- {{'Notifications' | translate }}
- {{userdata.notifications.length}}
+ {{'Notifications' | translate }}
+ {{storageuser.notifications.length}}
{{'Settings' | translate }}
diff --git a/www/templates/travel.html b/www/templates/travel.html
index 7d79935..12908eb 100644
--- a/www/templates/travel.html
+++ b/www/templates/travel.html
@@ -1,15 +1,18 @@