Pre-merge work on additional settings.
This commit is contained in:
parent
2140e0afac
commit
683e271f17
@ -374,6 +374,13 @@ function createInitialUser() {
|
|||||||
$admin->password = password_hash('admin', PASSWORD_BCRYPT, array('salt' => $admin->salt));
|
$admin->password = password_hash('admin', PASSWORD_BCRYPT, array('salt' => $admin->salt));
|
||||||
$admin->email = '';
|
$admin->email = '';
|
||||||
|
|
||||||
|
$options = R::dispense('option');
|
||||||
|
$options->tasksOrder = 0;
|
||||||
|
$options->showAnimations = true;
|
||||||
|
$options->showAssignee = true;
|
||||||
|
|
||||||
|
$admin->ownOptions = $options;
|
||||||
|
|
||||||
R::store($admin);
|
R::store($admin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,12 +137,17 @@ $app->get('/users/current', function() use($app, $jsonResponse) {
|
|||||||
if (validateToken()) {
|
if (validateToken()) {
|
||||||
$user = getUser();
|
$user = getUser();
|
||||||
if (null != $user) {
|
if (null != $user) {
|
||||||
|
$options = [];
|
||||||
|
foreach($user->ownOptions as $option) {
|
||||||
|
$options[] = $option;
|
||||||
|
}
|
||||||
$jsonResponse->data = [
|
$jsonResponse->data = [
|
||||||
'userId' => $user->id,
|
'userId' => $user->id,
|
||||||
'username' => $user->username,
|
'username' => $user->username,
|
||||||
'isAdmin' => $user->isAdmin,
|
'isAdmin' => $user->isAdmin,
|
||||||
'email' => $user->email,
|
'email' => $user->email,
|
||||||
'defaultBoard' => $user->defaultBoard
|
'defaultBoard' => $user->defaultBoard,
|
||||||
|
'options' => $options
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,9 +180,9 @@ $app->post('/users', function() use($app, $jsonResponse) {
|
|||||||
$user->salt = password_hash($data->username . time(), PASSWORD_BCRYPT);
|
$user->salt = password_hash($data->username . time(), PASSWORD_BCRYPT);
|
||||||
$user->password = password_hash($data->password, PASSWORD_BCRYPT, array('salt' => $user->salt));
|
$user->password = password_hash($data->password, PASSWORD_BCRYPT, array('salt' => $user->salt));
|
||||||
$options = R::dispense('option');
|
$options = R::dispense('option');
|
||||||
$options->newTaskPosition = 1; // Bottom of column (0 == top of column)
|
$options->newTaskPosition = 0; // Bottom of column (1 == top of column)
|
||||||
$options->animate = true;
|
$options->animate = true;
|
||||||
$user->ownOptions[] = $options;
|
$user->ownOptions = $options;
|
||||||
|
|
||||||
R::store($user);
|
R::store($user);
|
||||||
addUserToBoard($data->defaultBoard, $user);
|
addUserToBoard($data->defaultBoard, $user);
|
||||||
|
@ -21,7 +21,7 @@ function ($scope, $routeParams, $location, $interval, $window,
|
|||||||
if (text) {
|
if (text) {
|
||||||
return $window.marked(text);
|
return $window.marked(text);
|
||||||
} else {
|
} else {
|
||||||
return "<p>No Description</p>";
|
return '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ function ($scope, UserService, AlertService) {
|
|||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
$scope.currentUser = data.data;
|
$scope.currentUser = data.data;
|
||||||
$scope.loadingCurrentUser = false;
|
$scope.loadingCurrentUser = false;
|
||||||
|
console.log($scope.currentUser.options[0]);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$scope.loadCurrentUser();
|
$scope.loadCurrentUser();
|
||||||
|
@ -29,6 +29,16 @@ function ($scope, $interval, BoardService) {
|
|||||||
$scope.interval = $interval(loadBoards, 5000);
|
$scope.interval = $interval(loadBoards, 5000);
|
||||||
$scope.$on('$destroy', function () { $interval.cancel($scope.interval); });
|
$scope.$on('$destroy', function () { $interval.cancel($scope.interval); });
|
||||||
|
|
||||||
|
$scope.userOptions = {
|
||||||
|
tasksAt: [
|
||||||
|
{ id: 0, text: 'bottom of column'},
|
||||||
|
{ id: 1, text: 'top of column'}
|
||||||
|
],
|
||||||
|
taskOrder: 0,
|
||||||
|
showAnimations: true,
|
||||||
|
showAssignee: true
|
||||||
|
};
|
||||||
|
|
||||||
$scope.boardSort = {
|
$scope.boardSort = {
|
||||||
options: [
|
options: [
|
||||||
{ sort: 'id', name: 'Creation Date' },
|
{ sort: 'id', name: 'Creation Date' },
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
<div class="widget-content board-options">
|
<div class="widget-content board-options">
|
||||||
<h4>My Board Options</h4>
|
<h4>My Board Options</h4>
|
||||||
<p class="form-group form-inline">New tasks appear at
|
<p class="form-group form-inline">New tasks appear at
|
||||||
<select class="form-control">
|
<select class="form-control" data-ng-model="userOptions.taskOrder"
|
||||||
<option>bottom of column</option>
|
data-ng-options="option.id as option.text for option in userOptions.tasksAt">
|
||||||
<option>top of column</option>
|
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p class="form-group form-inline">Show animations? <input type="checkbox"></p>
|
<p class="form-group form-inline">
|
||||||
|
Show animations? <input type="checkbox" data-ng-model="userOptions.showAnimations">
|
||||||
|
</p>
|
||||||
|
<p class="form-group form-inline">
|
||||||
|
Show Assignee on item card? <input type="checkbox" data-ng-model="userOptions.showAssignee">
|
||||||
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user