From 2c6be8748f8ca36b9b5af21e59d30433c93d1a1d Mon Sep 17 00:00:00 2001
From: arnaucode
Date: Sat, 16 Jun 2018 21:30:39 +0200
Subject: [PATCH] added travel link to the webapp view
---
www/js/app.js | 2 +-
www/js/askForCar.js | 4 ++--
www/js/askForPackage.js | 4 ++--
www/js/offerCar.js | 4 ++--
www/js/travel.js | 7 +++++++
www/templates/travel.html | 9 ++++++---
6 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/www/js/app.js b/www/js/app.js
index 121de08..8b55091 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -6,7 +6,7 @@
// 'starter.controllers' is found in controllers.js
-//var urlapi = "http://localhost:3000/api/";
+// var urlapi = "http://localhost:3000/api/";
//var urlapi = "http://192.168.1.36:3000/api/";
//var urlapi = "http://37.59.123.45:3000/api/";
var urlapi = "http://routes.fair.coop:3000/api/";
diff --git a/www/js/askForCar.js b/www/js/askForCar.js
index a34ece1..0293064 100755
--- a/www/js/askForCar.js
+++ b/www/js/askForCar.js
@@ -47,7 +47,7 @@ angular.module('app.askForCar', ['pascalprecht.translate', 'ui-leaflet'])
$scope.markers=[];
console.log($scope.newtravel.from.name);
console.log($scope.newtravel.to.name);
- $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
+ $http.get('https://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
.then(function(data) {
console.log(data);
if(data.data[0])
@@ -61,7 +61,7 @@ angular.module('app.askForCar', ['pascalprecht.translate', 'ui-leaflet'])
message: data.data[0].display_name
});
}
- $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
+ $http.get('https://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
.then(function(data) {
if(data.data[0])
{
diff --git a/www/js/askForPackage.js b/www/js/askForPackage.js
index ac3079b..96b785d 100755
--- a/www/js/askForPackage.js
+++ b/www/js/askForPackage.js
@@ -47,7 +47,7 @@ angular.module('app.askForPackage', ['pascalprecht.translate', 'ui-leaflet'])
$scope.markers=[];
console.log($scope.newtravel.from.name);
console.log($scope.newtravel.to.name);
- $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
+ $http.get('https://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
.then(function(data) {
console.log(data);
if(data.data[0])
@@ -61,7 +61,7 @@ angular.module('app.askForPackage', ['pascalprecht.translate', 'ui-leaflet'])
message: data.data[0].display_name
});
}
- $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
+ $http.get('https://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
.then(function(data) {
if(data.data[0])
{
diff --git a/www/js/offerCar.js b/www/js/offerCar.js
index 4f0ec7a..5f576ac 100755
--- a/www/js/offerCar.js
+++ b/www/js/offerCar.js
@@ -47,7 +47,7 @@ angular.module('app.offerCar', ['pascalprecht.translate', 'ui-leaflet'])
$scope.markers=[];
console.log($scope.newtravel.from.name);
console.log($scope.newtravel.to.name);
- $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
+ $http.get('https://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.from.name + '&format=json&limit=1')
.then(function(data) {
console.log(data);
if(data.data[0])
@@ -61,7 +61,7 @@ angular.module('app.offerCar', ['pascalprecht.translate', 'ui-leaflet'])
message: data.data[0].display_name
});
}
- $http.get('http://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
+ $http.get('https://nominatim.openstreetmap.org/search?q=' + $scope.newtravel.to.name + '&format=json&limit=1')
.then(function(data) {
if(data.data[0])
{
diff --git a/www/js/travel.js b/www/js/travel.js
index 16e1f95..70cbd0d 100755
--- a/www/js/travel.js
+++ b/www/js/travel.js
@@ -289,4 +289,11 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet'])
window.open('http://telegram.me/' + telegramuser, '_system', 'location=yes');
return false;
};
+ $scope.copyTravelLink = function(link) {
+ $cordovaClipboard.copy("Text To Copy").then(function() {
+ // success
+ }, function() {
+ // error
+ });
+ };
});
diff --git a/www/templates/travel.html b/www/templates/travel.html
index e7e0e3f..119640d 100755
--- a/www/templates/travel.html
+++ b/www/templates/travel.html
@@ -13,9 +13,12 @@
+
+
+
-
+
@@ -45,8 +48,8 @@
{{'package' | translate}}
- @{{travel.user.telegram}}
+ ng-click="openTelegram(travel.user.telegram)">
+ Telegram: @{{travel.user.telegram}}
{{travel.user.phone}}