mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Add buttons to challenge participant modal
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User', 'Challenges', 'Notification', '$compile', 'Groups', '$state', '$stateParams', 'Tasks',
|
||||
function($rootScope, $scope, Shared, User, Challenges, Notification, $compile, Groups, $state, $stateParams, Tasks) {
|
||||
habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User', 'Challenges', 'Notification', '$compile', 'Groups', '$state', '$stateParams', 'Members', 'Tasks',
|
||||
function($rootScope, $scope, Shared, User, Challenges, Notification, $compile, Groups, $state, $stateParams, Members, Tasks) {
|
||||
|
||||
// Use presence of cid to determine whether to show a list or a single
|
||||
// challenge
|
||||
@@ -313,6 +313,18 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
|
||||
}
|
||||
}
|
||||
|
||||
$scope.sendMessageToChallengeParticipant = function(uid) {
|
||||
Members.selectMember(uid, function(){
|
||||
$rootScope.openModal('private-message',{controller:'MemberModalCtrl'});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.sendGiftToChallengeParticipant = function(uid) {
|
||||
Members.selectMember(uid, function(){
|
||||
$rootScope.openModal('send-gift',{controller:'MemberModalCtrl'})
|
||||
});
|
||||
};
|
||||
|
||||
function _calculateMaxPrize(gid) {
|
||||
|
||||
var userBalance = User.getBalanceInGems() || 0;
|
||||
|
||||
Reference in New Issue
Block a user