Merge branch 'develop' of github.com:HabitRPG/habitrpg into mountmaster

This commit is contained in:
Blade Barringer 2015-01-12 21:50:14 -06:00
commit 385fe36a0a
4 changed files with 25 additions and 5 deletions

View file

@ -0,0 +1,5 @@
// mongo habitrpg ./node_modules/moment/moment.js ./migrations/current_period_end.js
db.users.update(
{_id:''},
{$set:{'purchased.plan.dateTerminated':moment().add({days:7}).toDate()}}
)

View file

@ -18,7 +18,7 @@
background-color: $better
color: #555
&:hover, &:focus
&:hover, &:focus, &.active
background-color: $bad
text-decoration: none

View file

@ -211,8 +211,23 @@ api.attachGroup = function(req, res, next) {
}
api.getChat = function(req, res, next) {
return res.json(res.locals.group.chat);
}
// TODO: This code is duplicated from api.get - pull it out into a function to remove duplication.
var user = res.locals.user;
var gid = req.params.gid;
var q = (gid == 'party')
? Group.findOne({type: 'party', members: {$in:[user._id]}})
: Group.findOne({$or:[
{_id:gid, privacy:'public'},
{_id:gid, privacy:'private', members: {$in:[user._id]}}
]});
populateQuery(gid, q);
q.exec(function(err, group){
if (err) return next(err);
if (!group && gid!=='party') return res.json(404,{err: "Group not found or you don't have access."});
res.json(res.locals.group.chat);
gid = null;
});
};
/**
* TODO make this it's own ngResource so we don't have to send down group data with each chat post

View file

@ -104,7 +104,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
span.glyphicon.glyphicon-comment
//left-hand size commands
.task-controls.task-primary
a.money.btn-buy.item-btn(ng-click='castStart(Content.spells.special.#{k})')
a.money.btn-buy.item-btn(ng-click='castStart(Content.spells.special.#{k})', ng-class='{active: Content.spells.special.#{k}.key == spell.key}')
if canceler
span.shop_gold
span.reward-cost {{Content.spells.special.#{k}.value}}
@ -128,7 +128,7 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
span.glyphicon.glyphicon-comment
//left-hand size commands
.task-controls.task-primary
a.money.btn-buy.item-btn(ng-click='castStart(skill)')
a.money.btn-buy.item-btn(ng-click='castStart(skill)', ng-class='{active: skill.key == spell.key}')
span.reward-cost
strong {{skill.mana}}
=env.t('mp')