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:
Daniel Hammond
2015-03-28 01:21:39 -04:00
parent d537a7fee4
commit cea97e4da8
4 changed files with 26 additions and 629 deletions

View File

@@ -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();