diff --git a/www/css/style.css b/www/css/style.css index 8164b0e..d4b0ac1 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -60,6 +60,10 @@ font-weight: bold; margin: 10%; } +.o_signupLink{ + text-decoration: none; + color: #ffffff; +} .o_transparentBackground{ background: rgba(255, 255, 255, 0); color: #ffffff; diff --git a/www/index.html b/www/index.html index b846f4d..0c157e7 100644 --- a/www/index.html +++ b/www/index.html @@ -54,6 +54,7 @@ --> + diff --git a/www/js/app.js b/www/js/app.js index 2012b4f..ab47441 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -30,6 +30,7 @@ angular.module('starter', [ 'app.askPackage',*/ 'app.users', 'app.user', + 'app.userTravels', 'app.editUser', 'app.notifications', 'app.settings', @@ -153,6 +154,15 @@ angular.module('starter', [ } } }) + .state('app.userTravels', { + url: '/users/userTravels/:userid', + views: { + 'menuContent': { + templateUrl: 'templates/userTravels.html', + controller: 'UserTravelsCtrl' + } + } + }) .state('app.editUser', { url: '/editUser', views: { diff --git a/www/js/menu.js b/www/js/menu.js index bc0eab6..c3052dc 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -1,7 +1,7 @@ angular.module('app.menu', ['pascalprecht.translate']) - .controller('MenuCtrl', function($scope) { + .controller('MenuCtrl', function($scope, $window) { if (localStorage.getItem("cim_app_userdata")) { $scope.storageuser = JSON.parse(localStorage.getItem("cim_app_userdata")); console.log($scope.storageuser); @@ -10,6 +10,6 @@ angular.module('app.menu', ['pascalprecht.translate']) $scope.logout = function() { localStorage.removeItem("cim_app_token"); localStorage.removeItem("cim_app_userdata"); - window.location = "/"; + $window.location.reload(true); }; }); diff --git a/www/js/userTravels.js b/www/js/userTravels.js new file mode 100644 index 0000000..034d039 --- /dev/null +++ b/www/js/userTravels.js @@ -0,0 +1,23 @@ +angular.module('app.userTravels', ['pascalprecht.translate']) + +.controller('UserTravelsCtrl', function($scope, $http, $ionicModal, + $timeout, $ionicLoading, $filter, $stateParams) { + + $scope.storageuser = JSON.parse(localStorage.getItem("cim_app_userdata")); + $scope.travels=[]; + $scope.joins=[]; + $scope.doRefresh = function(){ + $http.get(urlapi + 'users/id/travels/'+$stateParams.userid) + .then(function(data, status, headers,config){ + console.log('data success'); + console.log(data); + $scope.travels = data.data.travels; + $scope.joins = data.data.joins; + $scope.$broadcast('scroll.refreshComplete');//refresher stop + },function(data, status, headers,config){ + console.log('data error'); + $scope.$broadcast('scroll.refreshComplete');//refresher stop + }); + }; + $scope.doRefresh(); +}); diff --git a/www/templates/login.html b/www/templates/login.html index 71666c2..1d09bfe 100644 --- a/www/templates/login.html +++ b/www/templates/login.html @@ -23,17 +23,24 @@ {{'LOG IN' | translate}}
++ + + Not account yet? {{'Create one' | translate}} + +
+ + --> diff --git a/www/templates/user.html b/www/templates/user.html index fc3f7d5..6b27f4c 100644 --- a/www/templates/user.html +++ b/www/templates/user.html @@ -20,13 +20,13 @@ @{{user.telegram}} - + {{user.travels.length}} Travels - {{user.favs.length}} favs + {{user.favs.length}} favs+ {{travel.from.name}} +
++ {{travel.to.name}} +
+ ++ {{travel.from.name}} +
++ {{travel.to.name}} +
+ +