Skip to content

Commit

Permalink
Merge pull request #112 from kiswa/dev
Browse files Browse the repository at this point in the history
Merge dev into master
  • Loading branch information
kiswa committed Dec 5, 2014
2 parents fdf4dfc + 23e4332 commit 2399f26
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 40 deletions.
16 changes: 9 additions & 7 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
v0.2.6
v0.2.7

Changelog

* Settings Updates
* Choose to hide items on filter
* Choose boards when creating/editing a user
* Comments can be edited
* Dates show up on comments and attachments without reload
* Opening login page redirects to boards if a valid token is found
* Additional way to dismiss Activity Log in Settings
* Image attachments resize to fit preview pane
* Uploaded files show username immediately
* Items can be moved to collapsed columns with new context menu item
* Automatic actions bugfix.
* The color picker has a pre-defined palette to choose from
* Edit Board Columns and Categories input box bugfix

19 changes: 18 additions & 1 deletion css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ p.detail {
.list-group-item.small {
padding: 3px;
}
.list-group.editable > .list-group-item {
overflow: hidden;
}
td > .list-group {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -572,6 +575,10 @@ input.custom-inline {
}

/* #FilesPage */
.files-wrapper {
height: 100%;
}

.files-widget {
border: 1px solid rgba(51,51,51,.2);
border-radius: 5px;
Expand All @@ -580,6 +587,10 @@ input.custom-inline {
height: 100%;
}

.files-widget .widget-content {
height: 90%;
}

.files-widget .small.pull-right {
margin-top: .3em;
}
Expand All @@ -593,7 +604,6 @@ input.custom-inline {
border: 1px solid rgba(51,51,51,.3);
width: 100%;
height: 100%;
min-height: 500px;
}

/* #3rdParty */
Expand Down Expand Up @@ -633,6 +643,9 @@ input.custom-inline {
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
.sp-container {
width: 202px;
}
.sp-disabled {
background-color: #eee;
}
Expand All @@ -650,6 +663,10 @@ input.custom-inline {
.sp-cf:before, .sp-cf:after {
display: none !important;
}
.sp-palette-container {
border: none;
padding-bottom: 290px;
}
/* jQueryUI Datepicker */
.ui-datepicker {
border: 1px solid rgba(51,51,51,.5);
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.2.6';
$rootScope.version = 'v0.2.7';

$rootScope.$on('$routeChangeStart', function(event, nextRoute, currentRoute) {
// Redirect to default path if authentication is required but not present.
Expand Down
7 changes: 7 additions & 0 deletions js/controllers/boards.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ function ($scope, $routeParams, $location, $interval, $window,
$scope.deleteItem();
};

$scope.changeItemLane = function() {
$scope.itemFormData.loadItem($scope.contextItem);
$scope.itemFormData.isAdd = false;

$scope.submitItem($scope.itemFormData);
};

$scope.contextItem = {}; // Needs to exist prior to onContextMenu call.
$scope.onContextMenu = function(laneId, item) {
$scope.contextItem = item;
Expand Down
3 changes: 2 additions & 1 deletion js/controllers/boardsItemForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function ($scope, BoardService) {
allowEmpty: false,
localStorageKey: 'taskboard.colorPalette',
showPalette: true,
palette: [[]],
palette: [ ['#fff', '#ececec', '#ffffe0', '#ffe0fa', '#bee7f4', '#c3f4b5', '#debee8', '#ffdea9', '#ffbaba'] ],
showSelectionPalette: true,
showButtons: false,
showInput: true,
Expand Down Expand Up @@ -120,6 +120,7 @@ function ($scope, BoardService) {
});
}
};
$scope.$parent.submitItem = $scope.submitItem;

var isSuccess = function(data) {
$scope.alerts.showAlerts(data.alerts);
Expand Down
54 changes: 35 additions & 19 deletions js/controllers/settingsAutoActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,12 @@ function ($scope, $interval, BoardService) {
{ id: 2, action: 'Set item assignee' },
{ id: 3, action: 'Clear item due date' }
];

$scope.actionOptions = {
triggers: [
{
id: 0,
trigger: 'Item moves to column'
},
{
id: 1,
trigger: 'Item assigned to user'
},
{
id: 2,
trigger: 'Item set to category'
}
{ id: 0, trigger: 'Item moves to column' },
{ id: 1, trigger: 'Item assigned to user' },
{ id: 2, trigger: 'Item set to category' }
]
};

Expand All @@ -63,10 +55,21 @@ function ($scope, $interval, BoardService) {
getCategories = function(boardData) {
var categories = [{ id: '0', name: 'Uncategorized' }];

if (boardData) {
if (boardData && boardData.ownCategory) {
boardData.ownCategory.forEach(function(category) {
categories.push(category);
});
} else {
$scope.actionOptions.triggers.forEach(function(trigger, index) {
if (trigger.id === 2) {
$scope.actionOptions.triggers.splice(index, 1);
}
});
$scope.actionTypes.forEach(function(type, index) {
if (type.id === 1) {
$scope.actionTypes.splice(index, 1);
}
});
}
return categories;
},
Expand Down Expand Up @@ -144,16 +147,29 @@ function ($scope, $interval, BoardService) {

updateAutoActions = function(actions) {
if (!actions) {
$scope.actions = [];
return;
}

var mappedActions = [];
actions.forEach(function(action) {
var actionTrigger, actionType;
$scope.actionOptions.triggers.forEach(function(trigger) {
if (trigger.id === parseInt(action.trigger_id)) {
actionTrigger = trigger.trigger;
}
});
$scope.actionTypes.forEach(function(type) {
if (type.id === parseInt(action.action_id)) {
actionType = type.action;
}
});

mappedActions.push({
id: action.id,
board: $scope.boardLookup[action.board_id],
trigger: $scope.actionOptions.triggers[action.trigger_id].trigger + getSecondaryText(action),
action: $scope.actionTypes[action.action_id].action + getActionText(action)
trigger: actionTrigger + getSecondaryText(action),
action: actionType + getActionText(action)
});
});

Expand Down Expand Up @@ -256,7 +272,7 @@ function ($scope, $interval, BoardService) {
allowEmpty: false,
localStorageKey: 'taskboard.colorPalette',
showPalette: true,
palette: [[]],
palette: [ ['#fff', '#ececec', '#ffffe0', '#ffe0fa', '#bee7f4', '#c3f4b5', '#debee8', '#ffdea9', '#ffbaba'] ],
showSelectionPalette: true,
showButtons: false,
showInput: true,
Expand All @@ -274,13 +290,13 @@ function ($scope, $interval, BoardService) {
$scope.actionData.color = null;
};

// Check every 250ms to see if a board has been chosen.
// Check every 500ms to see if a board has been chosen.
var updateIfBoardChosen = function() {
if ($scope.actionData.board !== null) {
$interval.cancel($scope.interval); // Stop checking once it has.
$interval.cancel($scope.interval);
$scope.getTriggerWord();
}
};
$scope.interval = $interval(updateIfBoardChosen, 250);
$scope.interval = $interval(updateIfBoardChosen, 500);
$scope.$on('$destroy', function () { $interval.cancel($scope.interval); });
}]);
9 changes: 9 additions & 0 deletions partials/board.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ <h4>{{ item.title }}</h4>
</a>
</li>
<li role="presentation" class="divider"></li>
<li role="presentation">
Move to Column:<br />
<select class="form-control"
data-ng-model="contextItem.lane_id"
data-ng-change="changeItemLane()"
data-ng-options="lane.id as lane.name for lane in currentBoard.ownLane | orderBy:'position':false">
</select>
</li>
<li role="presentation" class="divider"></li>
<li role="presentation">
<a role="menuitem" style="cursor: default" data-ng-click="openAddItem()">
Add New Item
Expand Down
2 changes: 1 addition & 1 deletion partials/boardItemViewModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h4>Attachments</h4>
data-ng-repeat="attachment in viewItem.ownAttachment" data-ng-class-even="'alternate'">
{{ attachment.name }}
<span class="detail">
Uploaded by {{ userNames[attachment.userId] }} on {{ attachment.date }}
Uploaded by {{ userNames[attachment.user_id] }} on {{ attachment.date }}
</span>
<span class="links pull-right" data-ng-show="attachmentDeleting[attachment.id]">
<span class="fa fa-refresh fa-spin"></span> Deleting...
Expand Down
2 changes: 1 addition & 1 deletion partials/files.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div include-replace="partials/header.html"></div>
<div class="content">
<div id="widget-container">
<div class="col-md-8 col-md-offset-2 min-padding">
<div class="col-md-10 col-md-offset-1 min-padding files-wrapper">
<div class="files-widget">
<h3 data-ng-if="!file.loading && !file.error" class="widget-header">
Attachment: {{ file.data.name }}
Expand Down
4 changes: 3 additions & 1 deletion partials/settings.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div data-include-replace="partials/header.html"></div>
<div class="slide-menu" data-ng-class="{ 'slide-menu-open': slide.open }" data-ng-if="currentUser.isAdmin">
<div class="settings-widget">
<h3 class="widget-header text-center">Activity Log</h3>
<h3 class="widget-header text-center">Activity Log
<a class="pull-left fa fa-times small" data-ng-click="slide.open = false"></a>
</h3>
<div class="widget-content">
<p data-ng-if="actionsLoading" class="text-center">
<span class="fa fa-refresh fa-spin"></span> Loading...
Expand Down
4 changes: 2 additions & 2 deletions partials/settingsBoardModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h5>Board Name</h5>
<div class="form-group half-width" data-ng-class="{ 'has-error': boardFormData.lanesError }">
<form role="form" class="form form-inline" data-ng-submit="boardFormData.addLane()">
<h5>Columns</h5>
<ul class="list-group lanes">
<ul class="list-group lanes editable">
<li class="list-group-item small" data-ng-class="{ disabled: boardFormData.isSaving }"
data-ng-repeat="lane in boardFormData.lanes | orderBy:'position':false">
<span class="fa fa-arrows-v"></span>
Expand All @@ -42,7 +42,7 @@ <h5>Columns</h5>
<div class="form-group half-width" data-ng-class="{ 'has-error': boardFormData.categoriesError }">
<form role="form" class="form form-inline" data-ng-submit="boardFormData.addCategory()">
<h5>Categories</h5>
<ul class="list-group">
<ul class="list-group editable">
<li class="list-group-item small" data-ng-class="{ disabled: boardFormData.isSaving }"
data-ng-repeat="category in boardFormData.categories | orderBy:'category':false">
<span class="item-text">{{ category.name }}</span>
Expand Down
6 changes: 5 additions & 1 deletion partials/settingsUserTable.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ <h4>TaskBoard Users</h4>
</tbody>
</table>
<div data-ng-if="currentUser.isAdmin == '1'">
<p><a role="button" id="addUser" class="btn btn-info" data-toggle="modal" data-target=".userModal" data-ng-click="userFormData.reset()" title="Add User"><span class="fa fa-plus"></span> Add User</a></p>
<p>
<a role="button" id="addUser" class="btn btn-info" data-toggle="modal" data-target=".userModal" data-ng-click="userFormData.reset()" title="Add User">
<span class="fa fa-plus"></span> Add User
</a>
</p>
</div>
</div>
11 changes: 6 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ Count was done from parent directory of TaskBoard as `./cloc-1.62.pl TaskBoard -

Language | Files | Blank Lines | Comments | Code
-------------------|-------:|-------------:|---------:|---------:
Javascript | 23 | 194 | 34 | 1915
HTML | 17 | 10 | 10 | 1015
Javascript | 23 | 198 | 34 | 1935
HTML | 17 | 10 | 10 | 1030
PHP | 6 | 156 | 58 | 875
CSS | 1 | 11 | 33 | 636
CSS | 1 | 13 | 33 | 651
Bourne Again Shell | 4 | 10 | 0 | 53
XML | 1 | 0 | 0 | 12
__SUM:__ | __52__ | __381__ | __135__ | __4506__
__SUM:__ | __52__ | __387__ | __135__ | __4556__

Counts Last Updated: Dec. 4, 2014

Counts Last Updated: Nov. 10, 2014

0 comments on commit 2399f26

Please sign in to comment.