Frontend: Add UI for user assignment

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-10-01 14:20:57 +02:00
committed by Julius Härtl
parent f746588111
commit 01f11d1be9
4 changed files with 63 additions and 10 deletions

View File

@@ -23,7 +23,7 @@
/* global app */
/* global moment */
app.controller('CardController', function ($scope, $rootScope, $routeParams, $location, $stateParams, $interval, BoardService, CardService, StackService, StatusService) {
app.controller('CardController', function ($scope, $rootScope, $routeParams, $location, $stateParams, $interval, $timeout, BoardService, CardService, StackService, StatusService) {
$scope.sidebar = $rootScope.sidebar;
$scope.status = {
lastEdit: 0,
@@ -139,4 +139,34 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
CardService.update(element);
StackService.updateCard(element);
};
/**
* Assigning users to cards
*/
/**
* Show ui-select field when clicking the add button
*/
$scope.showAssignUser = function() {
$scope.status.showAssignUser = true;
$timeout(function() {
$("#assignUserSelect").find('a')[0].click();
});
};
$scope.assingUserOpenClose = function(isOpen) {
if (!isOpen) {
$scope.status.showAssignUser = false;
}
};
$scope.addAssignedUser = function(item) {
$scope.status.showAssignUser = false;
$('assignUserSelect').hide();
console.log(a);
};
$scope.removeAssignedUser = function() {
};
});