Final adjustments to PR #5114

* Added test for header ctrl
* Made openModal function more readable
* Only show setting to disable invite friends if party is exactly 1 member big
* Use party.memberCount instead of party.members.length because it's more expressive
This commit is contained in:
Blade Barringer
2015-06-04 08:16:43 -05:00
parent 2234c7219e
commit 7a1c5835d0
4 changed files with 66 additions and 7 deletions

View File

@@ -18,10 +18,12 @@ habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User', '$location', '$ro
$scope.inviteOrStartParty = function(group) {
if (group.type === "party") {
$rootScope.openModal('invite-friends', {controller:'InviteToGroupCtrl', resolve:
{injectedGroup: function(){
return group;
}}});
$rootScope.openModal('invite-friends', {
controller:'InviteToGroupCtrl',
resolve: {
injectedGroup: function(){ return group; }
}
});
} else {
$location.path("/options/groups/party");
}