From d85a3e06a7d41d095ae09fd007ffc4b086742e85 Mon Sep 17 00:00:00 2001 From: arnaucode Date: Tue, 31 Jan 2017 16:08:46 +0100 Subject: [PATCH] bugs fixed --- www/js/travel.js | 14 +++++++------- www/templates/login.html | 1 + www/templates/search.html | 19 +++++++++---------- www/templates/travel.html | 16 ++++++++-------- www/templates/travels.html | 8 ++++++-- 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/www/js/travel.js b/www/js/travel.js index fb7c4f3..7584b56 100644 --- a/www/js/travel.js +++ b/www/js/travel.js @@ -95,7 +95,7 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet']) .then(function(data) { console.log("data: "); console.log(data); - if(data.success==false){ + if(data.data.success==false){ $ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000}); }else{ $scope.travel=data.data; @@ -114,7 +114,7 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet']) .then(function(data) { console.log("data: "); console.log(data); - if(data.success==false){ + if(data.data.success==false){ $ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000}); }else{ $scope.travel=data.data; @@ -134,8 +134,8 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet']) .then(function(data) { console.log("data: "); console.log(data); - if(data.success==false){ - $ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000}); + if(data.data.success==false){ + $ionicLoading.show({template: 'Error on declining', noBackdrop: true, duration: 2000}); }else{ $scope.travel=data.data; console.log("success"); @@ -155,8 +155,8 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet']) .then(function(data) { console.log("data: "); console.log(data); - if(data.success==false){ - $ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000}); + if(data.data.success==false){ + $ionicLoading.show({template: 'Error on accepting', noBackdrop: true, duration: 2000}); }else{ $scope.travel=data.data; console.log("success"); @@ -176,7 +176,7 @@ angular.module('app.travel', ['pascalprecht.translate', 'ui-leaflet']) .then(function(data) { console.log("data: "); console.log(data); - if(data.success==false){ + if(data.data.success==false){ $ionicLoading.show({template: 'Error on unjoin', noBackdrop: true, duration: 2000}); }else{ $scope.travel=data.data; diff --git a/www/templates/login.html b/www/templates/login.html index 6c903e5..71666c2 100644 --- a/www/templates/login.html +++ b/www/templates/login.html @@ -30,6 +30,7 @@

--> diff --git a/www/templates/search.html b/www/templates/search.html index 8ab4b1e..f2f29f3 100644 --- a/www/templates/search.html +++ b/www/templates/search.html @@ -10,20 +10,19 @@ Travels - -

{{travel.title}}

+ class="item item-icon-left" href="#/app/travels/{{travel._id}}"> + +

{{travel.title}}

-
{{travel.date | date:"dd/MM"}}
-
{{travel.date | date:"HH:mm"}}h
- +
{{travel.date | date:"dd/MM"}}
+
{{travel.date | date:"HH:mm"}}h

- {{travel.description}} + {{travel.from.name}} +

+

+ {{travel.to.name}}

- -

{{travel.from}} --> {{travel.to}}

Users diff --git a/www/templates/travel.html b/www/templates/travel.html index 89d218d..ef3be63 100644 --- a/www/templates/travel.html +++ b/www/templates/travel.html @@ -101,12 +101,12 @@
-
-

+
-
+

@@ -133,12 +133,12 @@ - - + diff --git a/www/templates/travels.html b/www/templates/travels.html index ea5111d..bb47dfe 100644 --- a/www/templates/travels.html +++ b/www/templates/travels.html @@ -26,8 +26,12 @@
{{travel.date | date:"dd/MM"}}
{{travel.date | date:"HH:mm"}}h
-

{{travel.from.name}}

-

{{travel.to.name}}

+

+ {{travel.from.name}} +

+

+ {{travel.to.name}} +