Browse Source

bugs fixed

master
arnaucode 8 years ago
parent
commit
d85a3e06a7
5 changed files with 31 additions and 27 deletions
  1. +7
    -7
      www/js/travel.js
  2. +1
    -0
      www/templates/login.html
  3. +9
    -10
      www/templates/search.html
  4. +8
    -8
      www/templates/travel.html
  5. +6
    -2
      www/templates/travels.html

+ 7
- 7
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;

+ 1
- 0
www/templates/login.html

@ -30,6 +30,7 @@
</p>-->
<div class="bar bar-footer o_transparentBackground">
<a class="button o_purple300 pull-right" ng-href="#/app/signup">
<i class="icon ion-android-person-add"></i>
{{'SIGN UP' | translate}}
</a>
</div>

+ 9
- 10
www/templates/search.html

@ -10,20 +10,19 @@
Travels
</div>
<a ng-repeat="travel in travels | orderBy: 'date'"
class="item item-avatar" href="#/app/travels/{{travel._id}}">
<img ng-src="img/{{travel.type}}.png"/>
<h2 class="o_text_purple600">{{travel.title}}</h2>
class="item item-icon-left" href="#/app/travels/{{travel._id}}">
<i class="icon ion-android-car o_text_grey700"></i>
<h2 class="o_text_grey800">{{travel.title}}</h2>
<div class="item-note text-right">
<div class="o_text_purple400">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple400">{{travel.date | date:"HH:mm"}}h</div>
<!--<div class="badge badge-calm">{{travel.owner}}</div>-->
<div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple300">{{travel.date | date:"HH:mm"}}h</div>
</div>
<p>
{{travel.description}}
{{travel.from.name}}
</p>
<p>
{{travel.to.name}}
</p>
<!--<p class="" ng-show="travel.modality=='offering'">nºseats: {{travel.seats}}</p>
<p class="" ng-show="travel.modality=='asking'">nºpeople: {{travel.seats}}</p>-->
<p class="">{{travel.from}} --> {{travel.to}}</p>
</a>
<div class="item item-divider o_purple300" ng-show="users[0]">
Users

+ 8
- 8
www/templates/travel.html

@ -101,12 +101,12 @@
</a>
</div>
<div class="col" ng-show="travel.user._id==storageuser._id">
<button class="button button-small o_grey600" ng-click="declineJoin(joinPetition)">
<div class="button button-small o_grey600" ng-click="declineJoin(joinPetition)">
<i class="icon ion-close"></i>
</button><br>
<button class="button button-small o_purple400" ng-click="acceptJoin(joinPetition)">
</div><br>
<div class="button button-small o_purple400" ng-click="acceptJoin(joinPetition)">
<i class="icon ion-checkmark"></i>
</button><br>
</div><br>
</div>
</div>
</div>
@ -133,12 +133,12 @@
<input ng-model="newComment.comment" type="text" placeholder="Comment">
</label>
<button ng-click="closeNewComment()" class="button button-small button-assertive">
<div ng-click="closeNewComment()" class="button button-small button-assertive">
{{'Cancel' | translate}}
</button>
<button ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm">
</div>
<div ng-click="doNewComment()" ng-show="newComment.comment" class="button button-small button-calm">
{{'Post_comment' | translate}}
</button>
</div>
</form>
</div>
</ion-content>

+ 6
- 2
www/templates/travels.html

@ -26,8 +26,12 @@
<div class="o_text_purple300">{{travel.date | date:"dd/MM"}}</div>
<div class="o_text_purple300">{{travel.date | date:"HH:mm"}}h</div>
</div>
<p>{{travel.from.name}}</p>
<p>{{travel.to.name}}</p>
<p>
{{travel.from.name}}
</p>
<p>
{{travel.to.name}}
</p>
</a>
</div>
</ion-content>

Loading…
Cancel
Save