Fixes #65. Settings now allow disabling animations.

This commit is contained in:
Matthew Ross 2015-06-06 12:34:34 -04:00
parent f989b2acb3
commit 998531a1b4
7 changed files with 11 additions and 13 deletions

View File

@ -141,8 +141,8 @@ $app->get('/users/current', function() use($app, $jsonResponse) {
$userOptions = R::exportAll($user->ownOption);
$options = [
'tasksOrder' => $userOptions[0]['tasks_order'],
'showAssignee' => $userOptions[0]['show_assignee'],
'showAnimations' => $userOptions[0]['show_animations']
'showAssignee' => $userOptions[0]['show_assignee'] == 1,
'showAnimations' => $userOptions[0]['show_animations'] == 1
];
$jsonResponse->data = [
'userId' => $user->id,

View File

@ -29,10 +29,8 @@ function ($scope, UserService, AlertService) {
loadOptionsData = function (data) {
$scope.currentUser.options.tasksOrder = parseInt(data.options.tasksOrder);
$scope.currentUser.options.showAnimations = typeof data.options.showAnimations === "string" ?
data.options.showAnimations === "1" : data.options.showAnimations;
$scope.currentUser.options.showAssignee = typeof data.options.showAssignee === "string" ?
data.options.showAssignee === "1" : data.options.showAssignee;
$scope.currentUser.options.showAnimations = data.options.showAnimations;
$scope.currentUser.options.showAssignee = data.options.showAssignee;
};
$scope.saveOptions = function() {

View File

@ -65,14 +65,14 @@
</div>
<div class="description" data-ng-bind-html="marked(item.description)"></div>
<p class="assignee">
<span data-ng-show="currentUser.options.showAssignee === '1'">
<span data-ng-show="currentUser.options.showAssignee">
<span data-ng-if="userNames[item.assignee]">Assigned To: </span>
{{ userNames[item.assignee] }}
</span>
<span class="pull-right">
<span data-ng-if="item.ownComment" class="fa fa-comments-o"
<span data-ng-if="item.ownComment.length" class="fa fa-comments-o"
title="{{ item.ownComment.length }} Comments"></span>
<span data-ng-if="item.ownAttachment" class="fa fa-paperclip"
<span data-ng-if="item.ownAttachment.length" class="fa fa-paperclip"
title="{{ item.ownAttachment.length }} Attachments"></span>
<span data-ng-if="item.due_date" data-ng-class="{'dateNear': item.dateNear, 'datePast': item.datePast}">
Due: {{ item.due_date }}

View File

@ -1,4 +1,4 @@
<div class="modal fade itemModal" tabindex="-1" role="dialog" aria-labelledby="itemLabel" aria-hidden="true">
<div class="modal itemModal" data-ng-class="{ fade: currentUser.options.showAnimations }" tabindex="-1" role="dialog" aria-labelledby="itemLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content" id="addEdit" data-ng-controller="ItemFormBoardCtrl">
<div class="modal-header">

View File

@ -1,4 +1,4 @@
<div class="modal fade itemViewModal" tabindex="-1" role="dialog"
<div class="modal itemViewModal" data-ng-class="{ fade: currentUser.options.showAnimations }" tabindex="-1" role="dialog"
aria-labelledby="itemViewLabel" aria-hidden="true"
data-ng-controller="ItemViewBoardCtrl">
<div class="modal-dialog">

View File

@ -1,4 +1,4 @@
<div class="modal fade boardModal" tabindex="-1" role="dialog" aria-labelledby="boardLabel" aria-hidden="true">
<div class="modal boardModal" data-ng-class="{ fade: currentUser.options.showAnimations }" tabindex="-1" role="dialog" aria-labelledby="boardLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content" data-ng-controller="BoardFormSettingsCtrl">
<div class="modal-header">

View File

@ -1,4 +1,4 @@
<div class="modal fade userModal" tabindex="-1" role="dialog" aria-labelledby="userLabel" aria-hidden="true">
<div class="modal userModal" data-ng-class="{ fade: currentUser.options.showAnimations }" tabindex="-1" role="dialog" aria-labelledby="userLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content" data-ng-controller="UserFormSettingsCtrl">
<div class="modal-header">