Fix bug when user selection was staying hidden
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -149,20 +149,20 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
||||
/**
|
||||
* Show ui-select field when clicking the add button
|
||||
*/
|
||||
$scope.showAssignUser = function() {
|
||||
$scope.status.showAssignUser = true;
|
||||
$timeout(function() {
|
||||
$('#assignUserSelect').find('a').click();
|
||||
});
|
||||
$scope.toggleAssignUser = function() {
|
||||
$scope.status.showAssignUser = !$scope.status.showAssignUser;
|
||||
if ($scope.status.showAssignUser === true) {
|
||||
$timeout(function () {
|
||||
$('#assignUserSelect').find('a').click();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide ui-select when select list is closed
|
||||
*/
|
||||
$scope.assingUserOpenClose = function(isOpen) {
|
||||
if (!isOpen) {
|
||||
$scope.status.showAssignUser = false;
|
||||
}
|
||||
$scope.status.showAssignUser = isOpen;
|
||||
};
|
||||
|
||||
$scope.addAssignedUser = function(item) {
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
</div>
|
||||
<div class="section-header">
|
||||
<h4><?php p($l->t('Assign users')); ?></h4>
|
||||
<button class="button icon-add" ng-click="showAssignUser()"></button>
|
||||
<button class="button icon-add" ng-click="toggleAssignUser()"></button>
|
||||
</div>
|
||||
<div class="section-content card-details-assign-users">
|
||||
<div class="section-content card-details-assign-users" ng-if="cardservice.getCurrent()">
|
||||
<ui-select id="assignUserSelect" class="card-details-assign-user" ng-model="status.assignedUser" ng-show="status.showAssignUser" uis-open-close="assingUserOpenClose(isOpen)"
|
||||
theme="select2"
|
||||
title="<?php p($l->t('Choose a user to assign')); ?>" placeholder="<?php p($l->t('Choose a user to assign')); ?>"
|
||||
|
||||
Reference in New Issue
Block a user