Flag icon opens blank modal

This commit is contained in:
Blade Barringer 2014-12-04 21:42:41 -06:00 committed by Matteo Pagliazzi
parent d0cf285468
commit 5e1e1b2c13
3 changed files with 13 additions and 1 deletions

View file

@ -105,6 +105,11 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
$rootScope.openModal('private-message',{controller:'MemberModalCtrl'});
});
}
$scope.flagChat = function(uid) {
Members.selectMember(uid, function(){
$rootScope.openModal('flag',{controller:'MemberModalCtrl'});
});
}
}
])

View file

@ -25,6 +25,8 @@ mixin chatMessages(inbox)
|        
a(ng-click='#{inbox? "user.ops.deletePM({params:{id:message.$key}})" : "deleteChatMessage(group, message)"}', ng-if='#{inbox ? "true" : ":: user.contributor.admin || message.uuid == user.id"}')
span.glyphicon.glyphicon-trash(tooltip=env.t('delete'))
a(ng-click="flagChat(message.uuid)", ng-if='#{inbox ? "true" : ":: message.uuid != user.id"}')
span.glyphicon.glyphicon-flag(tooltip=env.t('flag'))
span.float-label
a.label.label-default.chat-message(ng-if=':: message.user', ng-class='::userLevelStyleFromLevel(message.contributor.level, message.backer.npc, style)', ng-click='clickMember(message.uuid, true)')
span.glyphicon.glyphicon-arrow-right(ng-if='::message.sent')

View file

@ -88,4 +88,9 @@ script(type='text/ng-template', id='modals/send-gift.html')
button.btn.btn-primary(ng-show=fromBal, ng-click='sendGift(profile._id, gift)')=env.t("send")
a.btn.btn-primary(ng-hide=fromBal, ng-click='Payments.showStripe({gift:gift, uuid:profile._id})')=env.t('card')
a.btn.btn-warning(ng-hide=fromBal, href='/paypal/checkout?_id={{::user._id}}&apiToken={{::user.apiToken}}&gift={{Payments.encodeGift(profile._id, gift)}}') PayPal
button.btn.btn-default(ng-click='$close()')=env.t('cancel')
button.btn.btn-default(ng-click='$close()')=env.t('cancel')
script(type='text/ng-template', id='modals/flag.html')
.modal-header
.modal-body
.modal-footer