diff --git a/static/resources/js/components/log/list-log.directive.html b/static/resources/js/components/log/list-log.directive.html index 912498dd4..8446a66a9 100644 --- a/static/resources/js/components/log/list-log.directive.html +++ b/static/resources/js/components/log/list-log.directive.html @@ -16,7 +16,7 @@
- + diff --git a/static/resources/js/components/log/list-log.directive.js b/static/resources/js/components/log/list-log.directive.js index 5c4868125..06c99c6ba 100644 --- a/static/resources/js/components/log/list-log.directive.js +++ b/static/resources/js/components/log/list-log.directive.js @@ -145,19 +145,28 @@ function listLog() { var directive = { - restrict: 'E', - templateUrl: '/static/resources/js/components/log/list-log.directive.html', - scope: { + 'restrict': 'E', + 'templateUrl': '/static/resources/js/components/log/list-log.directive.html', + 'scope': { 'sectionHeight': '=', 'target': '=', 'publicity': '=' }, - controller: ListLogController, - controllerAs: 'vm', - bindToController: true + 'link': link, + 'controller': ListLogController, + 'controllerAs': 'vm', + 'bindToController': true }; return directive; + + function link(scope, element, attrs, ctrl) { + element.find('#txtSearchInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.search({'op': ctrl.op, 'username': ctrl.username}); + } + }); + } } })(); \ No newline at end of file diff --git a/static/resources/js/components/project-member/list-project-member.directive.html b/static/resources/js/components/project-member/list-project-member.directive.html index 7e2654168..469022452 100644 --- a/static/resources/js/components/project-member/list-project-member.directive.html +++ b/static/resources/js/components/project-member/list-project-member.directive.html @@ -16,7 +16,7 @@
- + diff --git a/static/resources/js/components/project-member/list-project-member.directive.js b/static/resources/js/components/project-member/list-project-member.directive.js index cdcc28607..efcd9d900 100644 --- a/static/resources/js/components/project-member/list-project-member.directive.js +++ b/static/resources/js/components/project-member/list-project-member.directive.js @@ -106,12 +106,21 @@ 'sectionHeight': '=', 'target': '=' }, + 'link': link, 'controller': ListProjectMemberController, 'controllerAs': 'vm', 'bindToController': true }; return directive; + + function link(scope, element, attrs, ctrl) { + element.find('#txtSearchInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.retrieve(); + } + }); + } } })(); \ No newline at end of file diff --git a/static/resources/js/components/replication/list-replication.directive.html b/static/resources/js/components/replication/list-replication.directive.html index 2d8eb16f6..428eaef6c 100644 --- a/static/resources/js/components/replication/list-replication.directive.html +++ b/static/resources/js/components/replication/list-replication.directive.html @@ -16,7 +16,7 @@
- + @@ -79,7 +79,7 @@
- + diff --git a/static/resources/js/components/replication/list-replication.directive.js b/static/resources/js/components/replication/list-replication.directive.js index 04411646c..28e8560ea 100644 --- a/static/resources/js/components/replication/list-replication.directive.js +++ b/static/resources/js/components/replication/list-replication.directive.js @@ -143,7 +143,7 @@ $scope.$emit('raiseAlert', alertInfo); vm.searchJobTIP = false; vm.refreshJobTIP = false; - } + }searchReplicationJob function listReplicationJobFailed(data, status) { console.log('Failed to list replication job:' + data); @@ -303,6 +303,19 @@ element.find('#toDatePicker').on('blur', function(){ ctrl.pickUp({'key': 'toDate', 'value': $(this).val()}); }); + + element.find('#txtSearchPolicyInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.searchReplicationPolicy(); + } + }); + + element.find('#txtSearchJobInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.searchReplicationJob(); + } + }); + } } diff --git a/static/resources/js/components/repository/list-repository.directive.html b/static/resources/js/components/repository/list-repository.directive.html index 518d96611..23ad69a99 100644 --- a/static/resources/js/components/repository/list-repository.directive.html +++ b/static/resources/js/components/repository/list-repository.directive.html @@ -2,7 +2,7 @@
- + diff --git a/static/resources/js/components/repository/list-repository.directive.js b/static/resources/js/components/repository/list-repository.directive.js index 0c509777d..7f12a7891 100644 --- a/static/resources/js/components/repository/list-repository.directive.js +++ b/static/resources/js/components/repository/list-repository.directive.js @@ -175,7 +175,11 @@ return directive; function link(scope, element, attr, ctrl) { - + element.find('#txtSearchInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.retrieve(); + } + }); } } diff --git a/static/resources/js/components/search/search-input.directive.js b/static/resources/js/components/search/search-input.directive.js index 5fd9173d5..cf71be575 100644 --- a/static/resources/js/components/search/search-input.directive.js +++ b/static/resources/js/components/search/search-input.directive.js @@ -57,7 +57,7 @@ .on('keydown', keydownHandler); function keydownHandler(e) { - if(e.keyCode === 13) { + if($(this).is(':focus') && e.keyCode === 13) { ctrl.searchFor($(this).val()); } } diff --git a/static/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html index 37774c994..6d47cec4d 100644 --- a/static/resources/js/components/system-management/destination.directive.html +++ b/static/resources/js/components/system-management/destination.directive.html @@ -16,7 +16,7 @@
- + diff --git a/static/resources/js/components/system-management/destination.directive.js b/static/resources/js/components/system-management/destination.directive.js index 071fee268..541c15516 100644 --- a/static/resources/js/components/system-management/destination.directive.js +++ b/static/resources/js/components/system-management/destination.directive.js @@ -108,11 +108,20 @@ 'restrict': 'E', 'templateUrl': '/static/resources/js/components/system-management/destination.directive.html', 'scope': true, + 'link': link, 'controller': DestinationController, 'controllerAs': 'vm', 'bindToController': true }; return directive; + + function link(scope, element, attrs, ctrl) { + element.find('#txtSearchInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.retrieve(); + } + }); + } } })(); \ No newline at end of file diff --git a/static/resources/js/components/system-management/replication.directive.html b/static/resources/js/components/system-management/replication.directive.html index 90c1bb7ec..01cc5c232 100644 --- a/static/resources/js/components/system-management/replication.directive.html +++ b/static/resources/js/components/system-management/replication.directive.html @@ -16,7 +16,7 @@
- + diff --git a/static/resources/js/components/system-management/replication.directive.js b/static/resources/js/components/system-management/replication.directive.js index 99c453d3f..a66da4e55 100644 --- a/static/resources/js/components/system-management/replication.directive.js +++ b/static/resources/js/components/system-management/replication.directive.js @@ -111,11 +111,20 @@ 'restrict': 'E', 'templateUrl': '/static/resources/js/components/system-management/replication.directive.html', 'scope': true, + 'link': link, 'controller': ReplicationController, 'controllerAs': 'vm', 'bindToController': true }; return directive; + + function link(scope, element, attrs, ctrl) { + element.find('#txtSearchInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.retrieve(); + } + }); + } } })(); \ No newline at end of file diff --git a/static/resources/js/components/user/list-user.directive.html b/static/resources/js/components/user/list-user.directive.html index f84eedc46..893ad7060 100644 --- a/static/resources/js/components/user/list-user.directive.html +++ b/static/resources/js/components/user/list-user.directive.html @@ -16,7 +16,7 @@
- + diff --git a/static/resources/js/components/user/list-user.directive.js b/static/resources/js/components/user/list-user.directive.js index bbd7c929c..1e9d42ec2 100644 --- a/static/resources/js/components/user/list-user.directive.js +++ b/static/resources/js/components/user/list-user.directive.js @@ -102,8 +102,12 @@ }; return directive; - function link(scope, element, attrs) { - + function link(scope, element, attrs, ctrl) { + element.find('#txtSearchInput').on('keydown', function(e) { + if($(this).is(':focus') && e.keyCode === 13) { + ctrl.retrieve(); + } + }); } } diff --git a/static/resources/js/layout/project/project.controller.js b/static/resources/js/layout/project/project.controller.js index cb497daf5..9a7291eeb 100644 --- a/static/resources/js/layout/project/project.controller.js +++ b/static/resources/js/layout/project/project.controller.js @@ -38,6 +38,8 @@ vm.retrieve(); vm.getProjectRole = getProjectRole; + vm.searchProjectByKeyPress = searchProjectByKeyPress; + //Error message dialog handler for project. $scope.$on('modalTitle', function(e, val) { @@ -116,6 +118,13 @@ console.log('vm.publicity:' + vm.publicity); } + function searchProjectByKeyPress($event) { + var keyCode = $event.which || $event.keyCode; + if(keyCode === 13) { + vm.retrieve(); + } + } + } })(); \ No newline at end of file diff --git a/views/project.htm b/views/project.htm index 25519610a..ac5da5e06 100644 --- a/views/project.htm +++ b/views/project.htm @@ -28,7 +28,7 @@
- +