From b3c0ba8a7d8ba07bd663f5f25a3e7a496771c66f Mon Sep 17 00:00:00 2001 From: kiswa Date: Sun, 26 Oct 2014 08:44:46 -0400 Subject: [PATCH 1/5] Display version number. Fixes #60. --- css/styles.css | 4 ++++ js/app.js | 4 +++- partials/header.html | 2 +- partials/login.html | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) 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/js/app.js b/js/app.js index bedbc4a..a35f6f4 100644 --- a/js/app.js +++ b/js/app.js @@ -51,8 +51,10 @@ function($routeProvider, $httpProvider) { }]); // Custom handlers for route authentication and rejection of invalid board id -taskBoard.run(['$rootScope', '$location', '$window', 'AuthenticationService', +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/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 }}

    From 487985cafc33f28bb74b63674905b77c0d8a4bc2 Mon Sep 17 00:00:00 2001 From: kiswa Date: Sun, 26 Oct 2014 08:53:45 -0400 Subject: [PATCH 2/5] Update VERSION --- VERSION | 10 ++++------ js/app.js | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) 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/js/app.js b/js/app.js index a35f6f4..4012ea4 100644 --- a/js/app.js +++ b/js/app.js @@ -51,7 +51,7 @@ function($routeProvider, $httpProvider) { }]); // Custom handlers for route authentication and rejection of invalid board id -taskBoard.run(['$rootScope', '$location', '$window', 'AuthenticationService', +taskBoard.run(['$rootScope', '$location', '$window', 'AuthenticationService', function($rootScope, $location, $window, AuthenticationService) { $rootScope.version = 'v0.2.5'; From 31aaa0581f911b3568362ebb157332af4deec534 Mon Sep 17 00:00:00 2001 From: kiswa Date: Sun, 26 Oct 2014 21:42:49 -0400 Subject: [PATCH 3/5] Partial work on #36. Created directive and works on Settings page. --- index.html | 1 + js/controllers/settingsBoardForm.js | 2 ++ js/controllers/settingsUserForm.js | 2 ++ js/directives/focus.js | 14 ++++++++++++++ partials/settingsBoardModal.html | 1 + partials/settingsUserModal.html | 2 +- 6 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 js/directives/focus.js 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/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/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
    From 9b09747b055993cb81c382877909d2157a01a14d Mon Sep 17 00:00:00 2001 From: kiswa Date: Mon, 27 Oct 2014 05:50:48 -0400 Subject: [PATCH 4/5] Finished #36. Modal now autofocus first input. --- js/controllers/boardsItemForm.js | 2 ++ partials/boardItemModal.html | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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/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 From a6d4c549cd43fc2ef47720fa71f146d23c3a90ed Mon Sep 17 00:00:00 2001 From: kiswa Date: Mon, 27 Oct 2014 21:23:06 -0400 Subject: [PATCH 5/5] Added ability to use Markdown in comments. Fixes #32. --- js/controllers/boardsItemView.js | 12 ++++++++++-- partials/boardItemViewModal.html | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) 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/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 }} +