Skip to content

Commit

Permalink
Merge pull request #66 from kiswa/dev
Browse files Browse the repository at this point in the history
Merge dev into master
  • Loading branch information
kiswa committed Oct 28, 2014
2 parents 92cd3d0 + a6d4c54 commit 8ea7692
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 12 deletions.
10 changes: 4 additions & 6 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
v0.2.4
v0.2.5

Changelog

* Bugfix for attachments downloading with hash instead of file name (#41).
* Bugfix for item positions (#37).
* noty errors are ignored now.
* Favicons added.
* API Error now returns exception message in JSON data.
* Markdown support in comments
* Cursor on default input field
* Show app version

4 changes: 4 additions & 0 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ a:hover.fa {
#board-nav :last-child.form-control {
margin-right: 0;
}
.version {
margin-top: 5px;
font-size: small !important;
}
/* #SiteNav*/
.nav {
margin-top: -.7em;
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
<script src="js/directives/clickToEdit.js"></script>
<script src="js/directives/onLoadCallback.js"></script>
<script src="js/directives/fileUpload.js"></script>
<script src="js/directives/focus.js"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ 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.5';

$rootScope.$on('$routeChangeStart', function(event, nextRoute, currentRoute) {
// Redirect to default path if authentication is required but not present.
if (nextRoute !== null && nextRoute.authRequired !== null &&
Expand Down
2 changes: 2 additions & 0 deletions js/controllers/boardsItemForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function ($scope, BoardService) {
var defaultColor = '#ffffe0';

$scope.itemFormData = {
setFocus: false,
isSaving: false,
isAdd: true,
itemId: 0,
Expand All @@ -19,6 +20,7 @@ function ($scope, BoardService) {
pointsError: false,
reset: function(laneId) {
$('.popover-dismiss').popover({html:true});
this.setFocus = true;
this.isSaving = false;
this.isAdd = true;
this.itemId = 0;
Expand Down
12 changes: 10 additions & 2 deletions js/controllers/boardsItemView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
taskBoardControllers.controller('ItemViewBoardCtrl',
['$scope', 'BoardService',
function ($scope, BoardService) {
['$scope', '$window', 'BoardService',
function ($scope, $window, BoardService) {
$scope.viewItem = {};
$scope.toggle = {
sidebar: false
Expand All @@ -15,6 +15,14 @@ function ($scope, BoardService) {
sorting: 0
};

$scope.markedComment = function(text) {
if (text) {
return $window.marked(text);
} else {
return "<p>No text</p>";
}
};

// Takes an array of timestamps and converts them to display dates.
var convertDates = function(timestampArray) {
if (undefined === timestampArray) {
Expand Down
2 changes: 2 additions & 0 deletions js/controllers/settingsBoardForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ taskBoardControllers.controller('BoardFormSettingsCtrl',
['$scope', 'BoardService',
function ($scope, BoardService) {
$scope.boardFormData = {
setFocus: false,
boardId: 0,
isAdd: true,
name: '',
Expand Down Expand Up @@ -139,6 +140,7 @@ function ($scope, BoardService) {
$scope.alerts.showAlert({ 'type': 'error', 'text': message });
},
reset: function() {
this.setFocus = true;
this.boardId = 0;
this.isAdd = true;
this.name = '';
Expand Down
2 changes: 2 additions & 0 deletions js/controllers/settingsUserForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ taskBoardControllers.controller('UserFormSettingsCtrl',
['$scope', 'UserService',
function ($scope, UserService) {
$scope.userFormData = {
setFocus: false,
userId: 0,
isAdd: true,
username: '',
Expand All @@ -23,6 +24,7 @@ function ($scope, UserService) {
},
reset: function() {
$('.popover-dismiss').popover();
this.setFocus = true;
this.userId = 0;
this.isAdd = true;
this.username = '';
Expand Down
14 changes: 14 additions & 0 deletions js/directives/focus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
taskBoardDirectives.directive('focus', ['$timeout', function($timeout) {
return {
link: function(scope, elem, attrs) {
scope.$watch(attrs.focus, function(val) {
if (angular.isDefined(val) && val) {
$timeout(function() {
elem[0].focus();
scope.$eval(attrs.focus + ' = false');
}, 500);
}
}, true);
}
};
}]);
3 changes: 2 additions & 1 deletion partials/boardItemModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ <h3 class="modal-title" id="itemLabel" data-ng-if="!itemFormData.isAdd">Edit Ite
<h5>Title</h5>
<input class="form-control" type="text" placeholder="Item Title"
data-ng-model="itemFormData.title" data-ng-disabled="itemFormData.isSaving"
data-ng-class="{ 'has-error': itemFormData.titleError }">
data-ng-class="{ 'has-error': itemFormData.titleError }"
data-focus="itemFormData.setFocus">
</div>
<div class="form-group">
<h5>Description
Expand Down
2 changes: 1 addition & 1 deletion partials/boardItemViewModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h4>Comments
data-ng-repeat="comment in viewItem.ownComment | orderBy:'timestamp':comments.sorting"
data-ng-class-even="'alternate'">
<p class="comment">
{{ comment.text }}
<span data-ng-bind-html="markedComment(comment.text)"></span>
<a class="fa fa-trash-o pull-right"
data-ng-if="currentUser.userId == comment.user_id || currentUser.isAdmin == 1"
data-ng-click="deleteComment(comment.id)"></a>
Expand Down
2 changes: 1 addition & 1 deletion partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<li data-ng-class="{ active: page.settings }"><a id="nav-settings" href="#/settings">Settings</a></li>
<li><a id="nav-logout" href="#/" data-ng-click="logout()">Logout {{ display.username }}</a></li>
</ul>
<h2>TaskBoard<small>{{ display.smallText }}</small></h2>
<h2>TaskBoard<small>{{ display.smallText }}</small><span class="version"> ({{ version }})</span></h2>
</div>
1 change: 1 addition & 0 deletions partials/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ <h2 class="form-signin-heading">TaskBoard - Sign in</h2>
</label>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</fieldset>
<p class="small text-center version">{{ version }}</p>
</form>
</div>
<div data-on-load-callback="clear"></div>
1 change: 1 addition & 0 deletions partials/settingsBoardModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ <h3 class="modal-title" id="boardLabel" data-ng-if="!boardFormData.isAdd">Edit B
<div class="form-group" data-ng-class="{ 'has-error': boardFormData.nameError }">
<h5>Board Name</h5>
<input class="form-control" type="text" placeholder="Board Name"
data-focus="boardFormData.setFocus"
data-ng-model="boardFormData.name" data-ng-disabled="boardFormData.isSaving">
</div>
<div class="form-group half-width" data-ng-class="{ 'has-error': boardFormData.lanesError }">
Expand Down
2 changes: 1 addition & 1 deletion partials/settingsUserModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h3 class="modal-title" id="userLabel" data-ng-if="!userFormData.isAdd">Edit Use
<fieldset data-ng-disabled="userFormData.isSaving">
<div class="form-group" data-ng-class="{ 'has-error': userFormData.usernameError }">
<h5><span data-ng-if="!userFormData.isAdd">Change </span>Username</h5>
<input class="form-control" type="text" placeholder="Username" data-ng-model="userFormData.username">
<input class="form-control" type="text" placeholder="Username" data-ng-model="userFormData.username" data-focus="userFormData.setFocus">
</div>
<div class="form-group" data-ng-class="{ 'has-error': userFormData.passError }">
<h5><span data-ng-if="!userFormData.isAdd">Change </span>Password</h5>
Expand Down

0 comments on commit 8ea7692

Please sign in to comment.