Skip to content

Commit

Permalink
save 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumu Des Bois authored and thmslmr committed Jun 22, 2016
1 parent bfcd7b7 commit 2ce3843
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 48 deletions.
17 changes: 0 additions & 17 deletions client/animation/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,6 @@ Template.inbox.uihooks({

});

// Template.inbox.uihooks({
//
// '.message__layout *': {
// insert: function(node, next, tp1){
// conv = Router.current().url.indexOf('conversation') > -1 ? true : false
// $(node).insertBefore(next);
// if(conv){
// $(node).velocity('transition.slideLeftBigIn',{
// duration: 500
// });
// }
// },
//
// remove:
// }
// })

Template.conversation.uihooks({
'.message__layout': {
insert: function(node, next, tp1){
Expand Down
7 changes: 5 additions & 2 deletions client/controllers/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Fonction exécutée au rendu du template index
Template.index.onRendered(function(){
if( Meteor.userId() )
Meteor.subscribe('userData');
this.autorun(function(){
if( Meteor.userId() )
Meteor.subscribe('userData');
})


// Initialisation de Google Maps (tout ce passe ici pour la map, aller voir dans js/googlemap.js)
initGoogleMaps();
Expand Down
2 changes: 1 addition & 1 deletion client/controllers/lesson.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Template.lesson.onRendered(function(){
directionsService.route({
origin : new google.maps.LatLng(Session.get('userLatLng')[0], Session.get('userLatLng')[1]),
destination : new google.maps.LatLng(lessonLocation[1], lessonLocation[0]),
travelMode : google.maps.TravelMode.BICYCLING,
travelMode : google.maps.TravelMode.DRIVING,
}, function(result, status) {
if (status == google.maps.DirectionsStatus.OK) {
data = result.routes[0].legs[0];
Expand Down
1 change: 0 additions & 1 deletion client/controllers/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Template.profile.helpers({

'userBadge' : function(){
nb = Lessons.find({'private.owner' : this._id}).count();
console.log(nb);
level = 1;

if(nb>49){
Expand Down
4 changes: 0 additions & 4 deletions client/controllers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ Template.register.events({
Meteor.loginWithFacebook({loginStyle : 'redirect'}, function(err){
if(err){
console.log(err.reason);
}else{
Meteor.subscribe('userData');
}
});
},
'click .js-google' : function(evt){
Meteor.loginWithGoogle({loginStyle : 'redirect'}, function(err){
if(err){
console.log(err.reason);
}else{
Meteor.subscribe('userData');
}
});
}
Expand Down
55 changes: 32 additions & 23 deletions client/template/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,42 @@ <h2 class="step-title">{{public.title}}</h2>
</div>
</div>
<div class="right-part">
{{#each userNotices.array}}
<div class="commentary">
<div class="commentary__user">
<div class="commentary__user--picture">
<img src="{{userPicture user}}" />
{{#with userNotices _id}}
{{#if noNotices}}
<div class="nocommentary">
<img src="/img/empty_commentary.svg"/>
</div>
<p class="commentary__user--name">{{userName user}}</p>
</div>
<div class="commentary__content">
<p class="commentary__content--paragraph">
{{comment}}
</p>
<div class="commentary__content--footer">
<p class="commentary__content--date">{{dateFromNow createdAt}}</p>
<div class="commentary__content--rating">
<p class="rating-mark">
{{#with percentNotice}}
{{> notice}}
{{/with}}
{{grade}} / 5
{{/if}}
{{/with}}
{{#with userNotices _id}}
{{#each array}}
<div class="commentary">
<div class="commentary__user">
<div class="commentary__user--picture">
<img src="{{userPicture user}}" />
</div>
<p class="commentary__user--name">{{userName user}}</p>
</div>
<div class="commentary__content">
<p class="commentary__content--paragraph">
{{user}} {{comment}}
</p>
<div class="commentary__content--footer">
<p class="commentary__content--date">{{dateFromNow createdAt}}</p>
<div class="commentary__content--rating">
<p class="rating-mark">
{{#with percentNotice}}
{{> notice}}
{{/with}}
{{grade}} / 5
</p>
</div>
</div>
<div class="commentary__limit"></div>
</div>
</div>
<div class="commentary__limit"></div>
</div>
</div>
{{/each}}
{{/each}}
{{/with}}
</div>
</div>
<section class="profil__footer">
Expand Down

0 comments on commit 2ce3843

Please sign in to comment.