Skip to content

Commit

Permalink
Merge pull request #236 from kiswa/bugfixes
Browse files Browse the repository at this point in the history
Merge bugfixes branch
  • Loading branch information
kiswa committed Dec 4, 2015
2 parents 71928bb + 8d95a9e commit db0b442
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 61 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The server must have `sqlite` and `php5-sqlite` installed, as well as the `rewri

**Note:** For Apache v2.3.9 and later, virtual host for a site should have [`AllowOverride All`](http://httpd.apache.org/docs/2.4/mod/core.html#allowoverride) for TaskBoard root directory. Otherwise, .htaccess files will be completely ignored.

**Optional:** to build minimized JavaScript and CSS (Install step 3) you must have a jre installed, tested with `openjdk-7-jre` and `openjdk-8-jre`.
**Optional:** to build minimized JavaScript and CSS (Install step 3) you must have curl and a jre installed, tested with `openjdk-7-jre` and `openjdk-8-jre`.

###Install

Expand All @@ -43,9 +43,9 @@ Installing TaskBoard is as easy as 1, 2, (3), 4!

git clone https://github.com/kiswa/TaskBoard.git

2. Install the PHP dependencies via composer. Open `TaskBoard/build/` in a terminal and run `./composer.phar install`
2. Install the PHP dependencies via composer. Open `TaskBoard/` in a terminal and run `./build/composer.phar install`

3. Open `TaskBoard/build/` in a terminal and run `./build-all`.
3. (Optional) Open `TaskBoard/build/` in a terminal and run `./build-all`.

4. Visit the site and log in with the username and password `admin` (and don't forget to change the password once you're in!).

Expand Down Expand Up @@ -116,17 +116,17 @@ If you find a bug, please post it on the [Issue Tracker](https://github.com/kisw
It's silly to use [LOC](http://en.wikipedia.org/wiki/Source_lines_of_code) as a metric, but it can be interesting to see what goes into a project.
This is only for TaskBoard files (library code is excluded), using [CLOC](http://cloc.sourceforge.net/).

Count was done from parent directory of TaskBoard as `./cloc-1.62.pl TaskBoard --exclude-dir=lib,vendor`.
Count was done from parent directory of TaskBoard as `cloc TaskBoard --exclude-dir=lib,vendor`.

Language | Files | Blank Lines | Comments | Code
-------------------|-------:|-------------:|---------:|---------:
Javascript | 23 | 220 | 34 | 2092
PHP | 9 | 233 | 55 | 1216
Javascript | 23 | 220 | 34 | 2087
PHP | 9 | 235 | 55 | 1220
HTML | 24 | 12 | 10 | 1160
CSS | 1 | 13 | 26 | 703
Bourne Again Shell | 4 | 12 | 0 | 58
JSON | 1 | 0 | 0 | 17
XML | 1 | 0 | 0 | 12
__SUM:__ | __63__ | __490__ | __125__ | __5258__
__SUM:__ | __63__ | __492__ | __125__ | __5257__

Counts Last Updated: Jun 6, 2015
Counts Last Updated: Nov 8, 2015
22 changes: 6 additions & 16 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
v0.3.0
v0.3.1

Changelog

* Adding a new Column to a board correctly shows it at the end of the columns.
* The list of boards can be sorted.
* Boards can be marked inactive to disallow using them without deleting.
* The list of boards can be filtered.
* Multiple logins per user are now possible.
* Additional setting to disable animations throughout.
* Expandable text inputs expand vertically and reset size on modal open.
* 'Move to Column' context menu improvements.
* Fix for missing Authorization header on some platforms.
* Fix for missing Automatic Action trigger 'category change'.
* Add ability to have emails sent on several status changes.
* Pulled some inline styles out (two remain, but are required for coloring tasks).
* Add setting to make new tasks appear at top or bottom of columns.
* Removed "No description" text from empty tasks.
* Add setting to hide "Assigned To: Unassigned" on tasks.
* Fix automatic action color change bug.
* Fix new user default board bug.
* Fix boards button bug.
* Fix modal display bug.
* Allow email to be reset to nothing.
1 change: 1 addition & 0 deletions api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function exceptionHandler($exception) {
set_exception_handler('exceptionHandler');

R::setup('sqlite:'.__DIR__.'/taskboard.db');
R::setAutoResolve(TRUE);
createInitialUser();

$app->notFound(function() use ($app, $jsonResponse) {
Expand Down
2 changes: 1 addition & 1 deletion api/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function createInitialUser() {
$options->showAnimations = true;
$options->showAssignee = true;

$admin->ownOptions[] = $options;
$admin->xownOptionList[] = $options;

R::store($admin);
}
Expand Down
1 change: 1 addition & 0 deletions api/itemRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
}
$item->position = $posItem->position;

R::store($item);
runAutoActions($item);
R::store($item);
}
Expand Down
23 changes: 14 additions & 9 deletions api/userRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
if (validateToken()) {
$user = getUser();
if (null != $user) {
$userOptions = R::exportAll($user->ownOption);
$userOptions = R::exportAll($user->xownOptionList);
$options = [
'tasksOrder' => $userOptions[0]['tasks_order'],
'showAssignee' => $userOptions[0]['show_assignee'] == 1,
Expand All @@ -163,9 +163,9 @@
if (validateToken()) {
$user = getUser();

$user->ownOption[1]->tasksOrder = $data->tasksOrder;
$user->ownOption[1]->showAssignee = $data->showAssignee;
$user->ownOption[1]->showAnimations = $data->showAnimations;
$user->xownOptionList[0]->tasksOrder = $data->tasksOrder;
$user->xownOptionList[0]->showAssignee = $data->showAssignee;
$user->xownOptionList[0]->showAnimations = $data->showAnimations;
R::store($user);

$jsonResponse->data = $data;
Expand Down Expand Up @@ -198,15 +198,20 @@
$user->defaultBoard = $data->defaultBoard;
$user->salt = password_hash($data->username . time(), PASSWORD_BCRYPT);
$user->password = password_hash($data->password, PASSWORD_BCRYPT, array('salt' => $user->salt));

$options = R::dispense('option');
$options->newTaskPosition = 0; // Bottom of column (1 == top of column)
$options->animate = true;
$user->ownOptions = $options;
$options->tasksOrder = 0; // Bottom of column (1 == top of column)
$options->showAnimations = true;
$options->showAssignee = true;
$user->xownOptionList[] = $options;

R::store($user);
addUserToBoard($data->defaultBoard, $user);
foreach($data->boardAccess as $board) {
addUserToBoard($board, $user);

if (property_exists($data, 'boardAccess') && is_array($data->boardAccess)) {
foreach($data->boardAccess as $board) {
addUserToBoard($board, $user);
}
}

$actor = getUser();
Expand Down
Binary file modified build/composer.phar
Binary file not shown.
27 changes: 18 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,9 @@ span.filter {
float: left;
margin-bottom: 1em;
}
.board-options label {
font-weight: normal;
}
#changeUserSettings hr, .board-options hr {
clear: both;
}
Expand Down
2 changes: 1 addition & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function($routeProvider, $httpProvider) {
// Custom handlers for route authentication and rejection of invalid board id
taskBoard.run(['$rootScope', '$location', '$window', 'AuthenticationService',
function($rootScope, $location, $window, AuthenticationService) {
$rootScope.version = 'v0.3.0';
$rootScope.version = 'v0.3.1';

$rootScope.$on('$routeChangeStart', function(event, nextRoute, currentRoute) {
// Redirect to default path if authentication is required but not present.
Expand Down
21 changes: 8 additions & 13 deletions js/controllers/settingsUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,15 @@ function ($scope, $interval, UserService) {
$scope.changeEmail = function(newEmailFormData) {
$scope.emailFormData.isSaving = true;

if (newEmailFormData.newEmail === '') {
newEmailFormData.setAlert('Email cannot be blank.');
newEmailFormData.isSaving = false;
} else {
UserService.changeEmail(newEmailFormData.newEmail)
.success(function(data) {
$scope.alerts.showAlerts(data.alerts);
$scope.updateUsers(data.data);
$scope.loadCurrentUser();
UserService.changeEmail(newEmailFormData.newEmail)
.success(function(data) {
$scope.alerts.showAlerts(data.alerts);
$scope.updateUsers(data.data);
$scope.loadCurrentUser();

newEmailFormData.isSaving = false;
newEmailFormData.newUsername = '';
});
}
newEmailFormData.isSaving = false;
newEmailFormData.newUsername = '';
});
};

$scope.updatingDefaultBoard = false;
Expand Down
10 changes: 6 additions & 4 deletions partials/settingsBoardUserOptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ <h4>My Board Options</h4>
</select>
</p>
<p class="form-group form-inline">
Show animations?
<input type="checkbox" data-ng-model="currentUser.options.showAnimations"
<label>Show animations?
<input type="checkbox" data-ng-model="currentUser.options.showAnimations"
data-ng-change="saveOptions()">
</label>
</p>
<p class="form-group form-inline">
Show Assignee on item card?
<input type="checkbox" data-ng-model="currentUser.options.showAssignee"
<label>Show Assignee on item card?
<input type="checkbox" data-ng-model="currentUser.options.showAssignee"
data-ng-change="saveOptions()">
</label>
</p>
<hr>
</div>

0 comments on commit db0b442

Please sign in to comment.