diff --git a/src/ui/static/resources/js/components/element-height/element-height.inspector.js b/src/ui/static/resources/js/components/element-height/element-height.inspector.js index 40d638adf..bf7350a97 100644 --- a/src/ui/static/resources/js/components/element-height/element-height.inspector.js +++ b/src/ui/static/resources/js/components/element-height/element-height.inspector.js @@ -48,8 +48,6 @@ element.find('.section').css({'height': (h - scope.subsHeight - scope.subsSection) + 'px'}); element.find('.sub-pane').css({'height': (h - scope.subsHeight - scope.subsSubPane) + 'px'}); element.find('.tab-pane').css({'height': (h - scope.subsHeight - scope.subsSubPane - scope.subsSection -100) + 'px'}); -// var subPaneHeight = element.find('.sub-pane').height(); -// element.find('.table-body-container').css({'height': (subPaneHeight - scope.subsTblBody) + 'px'}); } }, true); diff --git a/src/ui/static/resources/js/components/log/list-log.directive.js b/src/ui/static/resources/js/components/log/list-log.directive.js index ae0f60fce..481b1c28c 100644 --- a/src/ui/static/resources/js/components/log/list-log.directive.js +++ b/src/ui/static/resources/js/components/log/list-log.directive.js @@ -143,7 +143,9 @@ } - function listLog() { + listLog.$inject = ['$timeout']; + + function listLog($timeout) { var directive = { 'restrict': 'E', 'templateUrl': '/static/resources/js/components/log/list-log.directive.html', @@ -162,6 +164,12 @@ element.find('#txtSearchInput').on('keydown', function(e) { if($(this).is(':focus') && e.keyCode === 13) { ctrl.search({'op': ctrl.op, 'username': ctrl.username}); + } else { + $timeout(function() { + if(ctrl.username.length === 0) { + ctrl.search({'op': ctrl.op, 'username': ctrl.username}); + } + }); } }); } diff --git a/src/ui/static/resources/js/components/project-member/add-project-member.directive.js b/src/ui/static/resources/js/components/project-member/add-project-member.directive.js index a872ba04b..7018ad5b3 100644 --- a/src/ui/static/resources/js/components/project-member/add-project-member.directive.js +++ b/src/ui/static/resources/js/components/project-member/add-project-member.directive.js @@ -88,8 +88,10 @@ } } + + addProjectMember.$inject = ['$timeout']; - function addProjectMember() { + function addProjectMember($timeout) { var directive = { 'restrict': 'E', 'templateUrl': '/static/resources/js/components/project-member/add-project-member.directive.html', @@ -109,6 +111,13 @@ function link(scope, element, attrs, ctrl) { scope.form.$setPristine(); scope.form.$setUntouched(); + scope.$watch('vm.isOpen', function(current) { + if(current) { + $timeout(function() { + element.find('[name=uUsername]:input').focus(); + }); + } + }); } } diff --git a/src/ui/static/resources/js/components/project-member/list-project-member.directive.js b/src/ui/static/resources/js/components/project-member/list-project-member.directive.js index 6fa330532..ba582dcae 100644 --- a/src/ui/static/resources/js/components/project-member/list-project-member.directive.js +++ b/src/ui/static/resources/js/components/project-member/list-project-member.directive.js @@ -96,7 +96,9 @@ } - function listProjectMember() { + listProjectMember.$inject = ['$timeout']; + + function listProjectMember($timeout) { var directive = { 'restrict': 'E', 'templateUrl': '/static/resources/js/components/project-member/list-project-member.directive.html', @@ -116,6 +118,12 @@ element.find('#txtSearchInput').on('keydown', function(e) { if($(this).is(':focus') && e.keyCode === 13) { ctrl.retrieve(); + } else { + $timeout(function() { + if(ctrl.username.length === 0) { + ctrl.retrieve(); + } + }); } }); } diff --git a/src/ui/static/resources/js/components/project/add-project.directive.html b/src/ui/static/resources/js/components/project/add-project.directive.html index 31987a983..76afdc46f 100644 --- a/src/ui/static/resources/js/components/project/add-project.directive.html +++ b/src/ui/static/resources/js/components/project/add-project.directive.html @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. --> -