diff --git a/VERSION b/VERSION index dd2cde1..165c730 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/css/styles.css b/css/styles.css index b6ce208..6ec8df1 100644 --- a/css/styles.css +++ b/css/styles.css @@ -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; diff --git a/index.html b/index.html index eba5fca..87a3a36 100644 --- a/index.html +++ b/index.html @@ -78,5 +78,6 @@ + diff --git a/js/app.js b/js/app.js index bedbc4a..4012ea4 100644 --- a/js/app.js +++ b/js/app.js @@ -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 && diff --git a/js/controllers/boardsItemForm.js b/js/controllers/boardsItemForm.js index a1b2ff2..7950338 100644 --- a/js/controllers/boardsItemForm.js +++ b/js/controllers/boardsItemForm.js @@ -4,6 +4,7 @@ function ($scope, BoardService) { var defaultColor = '#ffffe0'; $scope.itemFormData = { + setFocus: false, isSaving: false, isAdd: true, itemId: 0, @@ -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; diff --git a/js/controllers/boardsItemView.js b/js/controllers/boardsItemView.js index 93574c2..cce27d9 100644 --- a/js/controllers/boardsItemView.js +++ b/js/controllers/boardsItemView.js @@ -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 @@ -15,6 +15,14 @@ function ($scope, BoardService) { sorting: 0 }; + $scope.markedComment = function(text) { + if (text) { + return $window.marked(text); + } else { + return "

No text

"; + } + }; + // Takes an array of timestamps and converts them to display dates. var convertDates = function(timestampArray) { if (undefined === timestampArray) { diff --git a/js/controllers/settingsBoardForm.js b/js/controllers/settingsBoardForm.js index 2c93675..d3e22d3 100644 --- a/js/controllers/settingsBoardForm.js +++ b/js/controllers/settingsBoardForm.js @@ -2,6 +2,7 @@ taskBoardControllers.controller('BoardFormSettingsCtrl', ['$scope', 'BoardService', function ($scope, BoardService) { $scope.boardFormData = { + setFocus: false, boardId: 0, isAdd: true, name: '', @@ -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 = ''; diff --git a/js/controllers/settingsUserForm.js b/js/controllers/settingsUserForm.js index a8d6c7e..49090a2 100644 --- a/js/controllers/settingsUserForm.js +++ b/js/controllers/settingsUserForm.js @@ -2,6 +2,7 @@ taskBoardControllers.controller('UserFormSettingsCtrl', ['$scope', 'UserService', function ($scope, UserService) { $scope.userFormData = { + setFocus: false, userId: 0, isAdd: true, username: '', @@ -23,6 +24,7 @@ function ($scope, UserService) { }, reset: function() { $('.popover-dismiss').popover(); + this.setFocus = true; this.userId = 0; this.isAdd = true; this.username = ''; diff --git a/js/directives/focus.js b/js/directives/focus.js new file mode 100644 index 0000000..63bf69b --- /dev/null +++ b/js/directives/focus.js @@ -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); + } + }; +}]); diff --git a/partials/boardItemModal.html b/partials/boardItemModal.html index c0d31e0..91599d0 100644 --- a/partials/boardItemModal.html +++ b/partials/boardItemModal.html @@ -14,7 +14,8 @@
Title
+ data-ng-class="{ 'has-error': itemFormData.titleError }" + data-focus="itemFormData.setFocus">
Description diff --git a/partials/boardItemViewModal.html b/partials/boardItemViewModal.html index 5e969ca..6dcec9e 100644 --- a/partials/boardItemViewModal.html +++ b/partials/boardItemViewModal.html @@ -87,7 +87,7 @@ data-ng-repeat="comment in viewItem.ownComment | orderBy:'timestamp':comments.sorting" data-ng-class-even="'alternate'">

- {{ comment.text }} + diff --git a/partials/header.html b/partials/header.html index ec88243..efac0d5 100644 --- a/partials/header.html +++ b/partials/header.html @@ -4,5 +4,5 @@

  • Settings
  • Logout {{ display.username }}
  • -

    TaskBoard{{ display.smallText }}

    +

    TaskBoard{{ display.smallText }} ({{ version }})

    diff --git a/partials/login.html b/partials/login.html index de61c8b..45cf49b 100644 --- a/partials/login.html +++ b/partials/login.html @@ -10,6 +10,7 @@ +

    {{ version }}

    diff --git a/partials/settingsBoardModal.html b/partials/settingsBoardModal.html index dd27f2d..4731b5f 100644 --- a/partials/settingsBoardModal.html +++ b/partials/settingsBoardModal.html @@ -13,6 +13,7 @@
    Board Name
    diff --git a/partials/settingsUserModal.html b/partials/settingsUserModal.html index ebddfcd..fe16c19 100644 --- a/partials/settingsUserModal.html +++ b/partials/settingsUserModal.html @@ -14,7 +14,7 @@
    Change Username
    - +
    Change Password