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 b6ce208a..6ec8df14 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 bedbc4a6..a35f6f46 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 ec882431..efac0d5a 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 de61c8bd..45cf49be 100644 --- a/partials/login.html +++ b/partials/login.html @@ -10,6 +10,7 @@

    TaskBoard - Sign in

    +

    {{ 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 dd2cde1e..165c730c 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 a35f6f46..4012ea4b 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 eba5fca0..87a3a360 100644 --- a/index.html +++ b/index.html @@ -78,5 +78,6 @@ + diff --git a/js/controllers/settingsBoardForm.js b/js/controllers/settingsBoardForm.js index 2c936750..d3e22d36 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 a8d6c7eb..49090a2c 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 00000000..63bf69ba --- /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 dd27f2d6..4731b5fc 100644 --- a/partials/settingsBoardModal.html +++ b/partials/settingsBoardModal.html @@ -13,6 +13,7 @@