diff --git a/www/img/help.png b/www/img/help.png new file mode 100644 index 0000000..84ce649 Binary files /dev/null and b/www/img/help.png differ diff --git a/www/js/app.js b/www/js/app.js index 39c774a..f6314a0 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -43,6 +43,15 @@ angular.module('starter', ['ionic', } } }) + .state('app.help', { + url: '/help', + views: { + 'menuContent': { + templateUrl: 'templates/help.html', + controller: 'HelpCtrl' + } + } + }) .state('app.users', { url: '/users', diff --git a/www/js/controllers.js b/www/js/controllers.js index 8ac5abd..399b6d2 100644 --- a/www/js/controllers.js +++ b/www/js/controllers.js @@ -1,6 +1,6 @@ -//var urlapi="http://localhost:3000/api/"; -var urlapi="https://collectivecar.paas.primustech.io/api/"; +var urlapi="http://localhost:3000/api/"; +//var urlapi="https://collectivecar.paas.primustech.io/api/"; //localStorage.setItem("c_username", "user2"); @@ -460,6 +460,7 @@ angular.module('starter.controllers', ['pascalprecht.translate']) $scope.travels=response.data; localStorage.setItem('c_travels', JSON.stringify($scope.travels)); localStorage.setItem('c_travelsLastDate', JSON.stringify(new Date())); + $scope.travel = $filter('filter')($scope.travels, $stateParams.travelId, true)[0]; }, function(response) { // optional @@ -487,6 +488,7 @@ angular.module('starter.controllers', ['pascalprecht.translate']) $scope.travels=response.data; localStorage.setItem('c_travels', JSON.stringify($scope.travels)); localStorage.setItem('c_travelsLastDate', JSON.stringify(new Date())); + $scope.travel = $filter('filter')($scope.travels, $stateParams.travelId, true)[0]; }, function(response) { // optional @@ -601,7 +603,8 @@ console.log($scope.newComment); .then(function(result){ travels = result.data; }); -}).controller('SettingsCtrl', function($scope, $stateParams, $translate) { +}) +.controller('SettingsCtrl', function($scope, $stateParams, $translate) { if(localStorage.getItem('lang'))//initialization { $scope.lang=localStorage.getItem('lang'); @@ -615,4 +618,7 @@ console.log($scope.newComment); window.localStorage.setItem('lang', lang); $translate.use(lang); }; +}) +.controller('HelpCtrl', function($scope, $stateParams, $translate) { + console.log("help page"); }); diff --git a/www/js/translations.js b/www/js/translations.js index 7bc7c69..6e41fe5 100644 --- a/www/js/translations.js +++ b/www/js/translations.js @@ -8,6 +8,7 @@ var translations = { "Users": "Users", "Logout": "Logout", "Settings": "Settings", + "Help": "Help", "Login": "Login", "Username": "Username", "Password": "Password", diff --git a/www/templates/help.html b/www/templates/help.html new file mode 100644 index 0000000..28895f0 --- /dev/null +++ b/www/templates/help.html @@ -0,0 +1,16 @@ + + +

{{'Help' | translate}}

+ +

+ + + +

+

+ + + +

+
+
diff --git a/www/templates/menu.html b/www/templates/menu.html index 224b19d..13b514d 100644 --- a/www/templates/menu.html +++ b/www/templates/menu.html @@ -40,6 +40,10 @@ {{'Settings' | translate }} + + + {{'Help' | translate }} + {{'Logout' | translate }} diff --git a/www/templates/travel.html b/www/templates/travel.html index 0844218..ad24a94 100644 --- a/www/templates/travel.html +++ b/www/templates/travel.html @@ -52,15 +52,15 @@

- {{'Ask_to_join' | translate}} - {{'Offer_car' | translate}} - {{'Offer_car' | translate}} + {{'Ask_to_join' | translate}} + {{'Offer_car' | translate}} + {{'Offer_car' | translate}}
- {{'Unjoin' | translate}} - {{'Unoffer_car' | translate}} - {{'Unoffer_car' | translate}} + {{'Unjoin' | translate}} + {{'Unoffer_car' | translate}} + {{'Unoffer_car' | translate}}