From e1059a478ce432feec586cd05d0fb10a98efa15a Mon Sep 17 00:00:00 2001 From: arnaucode Date: Thu, 26 Apr 2018 22:09:02 +0200 Subject: [PATCH] telegram button in travel view fixed --- package.json | 2 +- www/js/travel.js | 4 ++++ www/templates/travel.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 84e13e6..cd6929c 100755 --- a/package.json +++ b/package.json @@ -45,4 +45,4 @@ "android" ] } -} \ No newline at end of file +} diff --git a/www/js/travel.js b/www/js/travel.js index 1315c18..16e1f95 100755 --- a/www/js/travel.js +++ b/www/js/travel.js @@ -285,4 +285,8 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet']) //console.log("i: -1"); return -1; }; + $scope.openTelegram = function(telegramuser) { + window.open('http://telegram.me/' + telegramuser, '_system', 'location=yes'); + return false; + }; }); diff --git a/www/templates/travel.html b/www/templates/travel.html index 8469f0c..e7e0e3f 100755 --- a/www/templates/travel.html +++ b/www/templates/travel.html @@ -45,7 +45,7 @@ {{'package' | translate}} + ng-click="openTelegram(user.telegram)"> @{{travel.user.telegram}}