Merge branch 'develop' of https://github.com/lefnire/habitrpg into develop

This commit is contained in:
Matteo Pagliazzi 2013-09-13 18:31:16 +02:00
commit 2523643dd5
3 changed files with 17 additions and 19 deletions

View file

@ -51,8 +51,7 @@ angular.module('guideServices', []).
$('.main-herobox').popover('destroy');
var tour = new Tour({
onEnd: function(){
User.user.flags.showTour = false;
User.log({op:'set',data:{'flags.showTour':false}});
User.set('flags.showTour', false);
}
});
tourSteps.forEach(function(step) {

View file

@ -135,38 +135,37 @@ angular.module('userServices', []).
},
log: function (action, cb) {
//push by one buy one if an array passed in.
if (_.isArray(action)) {
action.forEach(function (a) {
settings.sync.queue.push(a);
});
} else {
settings.sync.queue.push(action);
}
//push by one buy one if an array passed in.
if (_.isArray(action)) {
action.forEach(function (a) {
settings.sync.queue.push(a);
});
} else {
settings.sync.queue.push(action);
}
save();
syncQueue(cb);
save();
syncQueue(cb);
},
/*
Very simple path-set. `set('preferences.gender','m')` for example. We'll deprecate this once we have a complete API
*/
set: function(k, v) {
var self = userServices;
var log = { op: 'set', data: {} };
window.habitrpgShared.helpers.dotSet(k, v, userServices.user);
window.habitrpgShared.helpers.dotSet(k, v, this.user);
log.data[k] = v;
userServices.log(log);
this.log(log);
},
setMultiple: function(obj){
var self = this;
var log = { op: 'set', data: {} };
_.each(obj, function(v,k){
window.habitrpgShared.helpers.dotSet(k, v, userServices.user);
window.habitrpgShared.helpers.dotSet(k, v, self.user);
log.data[k] = v;
})
userServices.log(log);
});
self.log(log);
},
save: save,

View file

@ -64,7 +64,7 @@
Helped HabitRPG grow by filling out <a href='http://community.habitrpg.com/node/290' target='_blank'>this survey.</a>
hr
div(ng-if='profile.achievements.originalUser || profile.achievements.veteranUser')
div(ng-if='profile.achievements.originalUser || profile.achievements.veteran')
.achievement.achievement-cake
div(ng-if='profile.achievements.veteran')
h5 Veteran