Created
January 10, 2014 19:54
-
-
Save eupharis/8361418 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.directive('addRemoveUsers', ['$state', function($state) { | |
return { | |
link: function(scope, element, attrs) { | |
element.on('click', function() { | |
scope.$apply(function() { | |
if (scope.circle.all_circle) { | |
var msg = [ | |
"An admin group's all circle contains all its users.", | |
"To remove users from this circle, please remove them", | |
"from the admin group." | |
].join(" "); | |
scope.alerter.add_alert({ | |
"level": "danger", | |
"content": msg | |
}); | |
} else { | |
$state.go('circle_manage.addremove_users'); | |
} | |
}); | |
}); | |
} | |
}; | |
}]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment