mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Documenting the (Bootstrap recommended!) wrapper workaround for tooltips
on disabled elements. Added code to prevent user from posting blank messages by using meta-enter as a workaround.
This commit is contained in:
@@ -86,7 +86,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
});
|
||||
}else{
|
||||
$scope.removeMemberData = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$scope.openInviteModal = function(group){
|
||||
@@ -118,7 +118,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
$rootScope.openModal('private-message',{controller:'MemberModalCtrl'});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}])
|
||||
|
||||
.controller('InviteToGroupCtrl', ['$scope', 'User', 'Groups', 'injectedGroup', '$http', 'Notification', function($scope, User, Groups, injectedGroup, $http, Notification){
|
||||
@@ -159,6 +159,9 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
$scope.profile = member;
|
||||
});
|
||||
$scope.sendPrivateMessage = function(uuid, message){
|
||||
// Don't do anything if the user somehow gets here without a message.
|
||||
if (!message) return;
|
||||
|
||||
$http.post('/api/v2/members/'+uuid+'/message',{message:message}).success(function(){
|
||||
Notification.text(window.env.t('messageSentAlert'));
|
||||
$rootScope.User.sync();
|
||||
|
||||
Reference in New Issue
Block a user