From 0f2adcad14b6a8a8ddfa1c39b7ca90d7252e5b01 Mon Sep 17 00:00:00 2001 From: K Bell Date: Tue, 6 Jan 2015 11:44:44 -0500 Subject: [PATCH 1/5] highlight spell item when it has class of 'active' --- public/css/items.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/items.styl b/public/css/items.styl index 213e499835..166ab09321 100644 --- a/public/css/items.styl +++ b/public/css/items.styl @@ -18,7 +18,7 @@ background-color: $better color: #555 - &:hover, &:focus + &:hover, &:focus, &.active background-color: $bad text-decoration: none From d6dc2119cb98785d1209cbccc9521c60ddb4a8a2 Mon Sep 17 00:00:00 2001 From: K Bell Date: Thu, 8 Jan 2015 19:55:49 -0500 Subject: [PATCH 2/5] add active class to spell item when it is selected --- views/shared/tasks/lists.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/shared/tasks/lists.jade b/views/shared/tasks/lists.jade index 0333238b2d..0250e0435b 100644 --- a/views/shared/tasks/lists.jade +++ b/views/shared/tasks/lists.jade @@ -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') From 22446a5ddbee4a1f00f90aab7312d881b8551f90 Mon Sep 17 00:00:00 2001 From: "K. Belardinelli" Date: Sat, 10 Jan 2015 11:06:39 -0500 Subject: [PATCH 3/5] apply active class to special spells too --- views/shared/tasks/lists.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/shared/tasks/lists.jade b/views/shared/tasks/lists.jade index 0250e0435b..e02ef29de3 100644 --- a/views/shared/tasks/lists.jade +++ b/views/shared/tasks/lists.jade @@ -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}} From ca2d45113c7f0d9ad5b59ac919355bb0d93737ef Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Mon, 12 Jan 2015 11:50:46 -0700 Subject: [PATCH 4/5] fix(billing): script to fix current_period_end, see #4420 --- migrations/current_period_end.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 migrations/current_period_end.js diff --git a/migrations/current_period_end.js b/migrations/current_period_end.js new file mode 100644 index 0000000000..31e33e4a79 --- /dev/null +++ b/migrations/current_period_end.js @@ -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()}} +) \ No newline at end of file From 0bd22e7c77dad436030428fb867e92e19854175e Mon Sep 17 00:00:00 2001 From: Alice Harris Date: Tue, 13 Jan 2015 06:10:46 +1000 Subject: [PATCH 5/5] disallow fetching of chat messages --- src/controllers/groups.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/controllers/groups.js b/src/controllers/groups.js index 3891c70618..9ef34b9c67 100644 --- a/src/controllers/groups.js +++ b/src/controllers/groups.js @@ -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