mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
Updates for refinements of UX.
This commit is contained in:
parent
35217b251c
commit
10f69d5250
@ -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);
|
||||
|
||||
|
@ -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});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<div class="well well-custom" style="position: absolute; margin-left: 10px; margin-top: 5px; width: 96%;">
|
||||
<div class="well well-custom" style="position: absolute; margin-left: 10px; margin-top: 5px; width: 94%;">
|
||||
<form name="form" class="css-form form-custom" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-xs-10 col-md-10">
|
||||
|
@ -97,18 +97,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
function addProject() {
|
||||
addProject.$inject = ['$timeout'];
|
||||
|
||||
function addProject($timeout) {
|
||||
var directive = {
|
||||
'restrict': 'E',
|
||||
'templateUrl': '/static/resources/js/components/project/add-project.directive.html',
|
||||
'controller': AddProjectController,
|
||||
'link': link,
|
||||
'scope' : {
|
||||
'isOpen': '='
|
||||
},
|
||||
'controllerAs': 'vm',
|
||||
'bindToController': true
|
||||
};
|
||||
return directive;
|
||||
return directive;
|
||||
|
||||
function link(scope, element, attrs, ctrl) {
|
||||
scope.$watch('vm.isOpen', function(current) {
|
||||
if(current) {
|
||||
$timeout(function() {
|
||||
element.find(':input[name=uProjectName]').focus();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
|
@ -290,6 +290,8 @@
|
||||
|
||||
}
|
||||
|
||||
listReplication.inject = ['$timeout', 'I18nService'];
|
||||
|
||||
function listReplication($timeout, I18nService) {
|
||||
var directive = {
|
||||
'restrict': 'E',
|
||||
@ -398,12 +400,24 @@
|
||||
element.find('#txtSearchPolicyInput').on('keydown', function(e) {
|
||||
if($(this).is(':focus') && e.keyCode === 13) {
|
||||
ctrl.searchReplicationPolicy();
|
||||
} else {
|
||||
$timeout(function() {
|
||||
if(ctrl.replicationPolicyName.length === 0) {
|
||||
ctrl.searchReplicationPolicy();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
element.find('#txtSearchJobInput').on('keydown', function(e) {
|
||||
if($(this).is(':focus') && e.keyCode === 13) {
|
||||
ctrl.searchReplicationJob();
|
||||
} else {
|
||||
$timeout(function() {
|
||||
if(ctrl.replicationJobName.length === 0) {
|
||||
ctrl.searchReplicationJob();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -192,7 +192,9 @@
|
||||
|
||||
}
|
||||
|
||||
function listRepository() {
|
||||
listRepository.$inject = ['$timeout'];
|
||||
|
||||
function listRepository($timeout) {
|
||||
var directive = {
|
||||
'restrict': 'E',
|
||||
'templateUrl': '/static/resources/js/components/repository/list-repository.directive.html',
|
||||
@ -212,6 +214,12 @@
|
||||
element.find('#txtSearchInput').on('keydown', function(e) {
|
||||
if($(this).is(':focus') && e.keyCode === 13) {
|
||||
ctrl.retrieve();
|
||||
} else {
|
||||
$timeout(function() {
|
||||
if(ctrl.filterInput.length === 0) {
|
||||
ctrl.retrieve();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -103,7 +103,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function destination() {
|
||||
destination.$inject = ['$timeout'];
|
||||
|
||||
function destination($timeout) {
|
||||
var directive = {
|
||||
'restrict': 'E',
|
||||
'templateUrl': '/static/resources/js/components/system-management/destination.directive.html',
|
||||
@ -119,6 +121,12 @@
|
||||
element.find('#txtSearchInput').on('keydown', function(e) {
|
||||
if($(this).is(':focus') && e.keyCode === 13) {
|
||||
ctrl.retrieve();
|
||||
} else {
|
||||
$timeout(function() {
|
||||
if(ctrl.destinationName.length === 0) {
|
||||
ctrl.retrieve();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -106,7 +106,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function replication() {
|
||||
replication.$inject = ['$timeout'];
|
||||
|
||||
function replication($timeout) {
|
||||
var directive = {
|
||||
'restrict': 'E',
|
||||
'templateUrl': '/static/resources/js/components/system-management/replication.directive.html',
|
||||
@ -122,6 +124,12 @@
|
||||
element.find('#txtSearchInput').on('keydown', function(e) {
|
||||
if($(this).is(':focus') && e.keyCode === 13) {
|
||||
ctrl.retrieve();
|
||||
} else {
|
||||
$timeout(function() {
|
||||
if(ctrl.replicationName.length === 0) {
|
||||
ctrl.retrieve();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -93,7 +93,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function listUser() {
|
||||
listUser.$inject = ['$timeout'];
|
||||
|
||||
function listUser($timeout) {
|
||||
var directive = {
|
||||
'restrict': 'E',
|
||||
'templateUrl': '/static/resources/js/components/user/list-user.directive.html',
|
||||
@ -111,6 +113,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();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -119,8 +119,8 @@
|
||||
|
||||
$scope.$on('addedSuccess', function(e, val) {
|
||||
vm.retrieve();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function showAddProject() {
|
||||
vm.isOpen = vm.isOpen ? false : true;
|
||||
}
|
||||
@ -144,6 +144,12 @@
|
||||
var keyCode = $event.which || $event.keyCode;
|
||||
if(keyCode === 13) {
|
||||
vm.retrieve();
|
||||
} else {
|
||||
$timeout(function() {
|
||||
if(vm.projectName.length === 0) {
|
||||
vm.retrieve();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,12 +12,25 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<style>
|
||||
.custom-section {
|
||||
padding: 15px;
|
||||
margin-top: 20px;
|
||||
background-color: #FFFFFF;
|
||||
min-height: 672px;
|
||||
width: 100%;
|
||||
height: 950px;
|
||||
}
|
||||
.custom-sub-pane {
|
||||
height: 800px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="container-fluid container-fluid-custom" element-height ng-controller="ProjectController as vm">
|
||||
<modal-dialog modal-title="// vm.modalTitle //" modal-message="// vm.modalMessage //" confirm-only="vm.confirmOnly" action="vm.action()"></modal-dialog>
|
||||
<div class="container container-custom">
|
||||
<div class="row extend-height">
|
||||
<div class="col-xs-12 col-md-12 extend-height">
|
||||
<div class="section">
|
||||
<div class="custom-section">
|
||||
<h4 class="page-header">
|
||||
<span ng-if="vm.isPublic === 0">// 'my_projects' | tr //</span>
|
||||
<a ng-if="vm.isPublic === 1" href="javascript:void(0);" ng-click="vm.togglePublicity({isPublic: 0})">// 'my_projects' | tr //</a>
|
||||
@ -39,7 +52,7 @@
|
||||
</div>
|
||||
<add-project ng-show="vm.isOpen" is-open="vm.isOpen"></add-project>
|
||||
<div class="each-tab-pane">
|
||||
<div class="sub-pane">
|
||||
<div class="custom-sub-pane">
|
||||
<div class="table-head-container">
|
||||
<table class="table table-pane table-header">
|
||||
<thead>
|
||||
|
Loading…
Reference in New Issue
Block a user