From cded535892caffc9b034bd72d1a1eff3bb27935c Mon Sep 17 00:00:00 2001 From: kunw Date: Sun, 26 Jun 2016 12:56:58 +0800 Subject: [PATCH] update for auto-resize of UI. --- static/resources/css/project.css | 2 +- static/resources/css/replication.css | 5 +- .../element-height.inspector.js | 10 +-- .../js/components/log/list-log.directive.html | 4 +- .../js/components/log/list-log.directive.js | 3 + .../list-project-member.directive.js | 3 + .../destination.directive.html | 4 +- .../destination.directive.js | 3 + .../replication.directive.html | 6 +- .../replication.directive.js | 7 +- .../components/user/list-user.directive.html | 76 ++++++++++--------- .../js/components/user/list-user.directive.js | 3 + .../admin-option/admin-option.controller.js | 3 +- views/repository.htm | 1 + 14 files changed, 76 insertions(+), 54 deletions(-) diff --git a/static/resources/css/project.css b/static/resources/css/project.css index 27a6ba12b..3b602fdce 100644 --- a/static/resources/css/project.css +++ b/static/resources/css/project.css @@ -42,7 +42,7 @@ .sub-pane { margin: 15px; - min-height: 300px; + min-height: 1px; overflow-y: auto; } diff --git a/static/resources/css/replication.css b/static/resources/css/replication.css index 1da6786d7..82d38918c 100644 --- a/static/resources/css/replication.css +++ b/static/resources/css/replication.css @@ -42,7 +42,7 @@ cursor: all-scroll; } #down-pane { - height: 80px; + height: 100%; min-height: 80px; } @@ -54,7 +54,8 @@ } .well-split { - margin-bottom: 0; + margin: 0; + position: relative; } .split-handle { diff --git a/static/resources/js/components/element-height/element-height.inspector.js b/static/resources/js/components/element-height/element-height.inspector.js index 3428029eb..2f063f54b 100644 --- a/static/resources/js/components/element-height/element-height.inspector.js +++ b/static/resources/js/components/element-height/element-height.inspector.js @@ -23,15 +23,15 @@ if(!angular.isDefined(scope.subsHeight)) scope.subsHeight = 110; if(!angular.isDefined(scope.subsSection)) scope.subsSection = 32; if(!angular.isDefined(scope.subsSubPane)) scope.subsSubPane = 226; - if(!angular.isDefined(scope.subsTabPane)) scope.subsTabPane = 226; - + if(!angular.isDefined(scope.subsTabPane)) scope.subsTabPane = 66; + scope.$watch(scope.getDimension, function(current) { if(current) { var h = current.h; - element.css({'height' : (h - scope.subsHeight) + 'px'}); - element.find('.section').css({'height': (h - scope.subsHeight - scope.subsSection) + 'px'}); + element.css({'height' : (h - scope.subsHeight) + 'px'}); + 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.subsTabPane) + 'px'}); + element.find('.tab-pane').css({'height': (h - scope.subsHeight - scope.subsTabPane) + 'px'}); } }, true); diff --git a/static/resources/js/components/log/list-log.directive.html b/static/resources/js/components/log/list-log.directive.html index db09a5dba..54a2f62a8 100644 --- a/static/resources/js/components/log/list-log.directive.html +++ b/static/resources/js/components/log/list-log.directive.html @@ -1,4 +1,4 @@ -
+
@@ -20,7 +20,7 @@ - //log.username////log.repo_name////log.operation////log.op_time | dateL : 'YYYY-MM-DD HH:mm:ss'// + //log.username////log.repo_name////log.operation////log.op_time | dateL : 'YYYY-MM-DD HH:mm:ss'// diff --git a/static/resources/js/components/log/list-log.directive.js b/static/resources/js/components/log/list-log.directive.js index 899141522..5213330d8 100644 --- a/static/resources/js/components/log/list-log.directive.js +++ b/static/resources/js/components/log/list-log.directive.js @@ -9,6 +9,9 @@ ListLogController.$inject = ['$scope','ListLogService', 'getParameterByName', '$location']; function ListLogController($scope, ListLogService, getParameterByName, $location) { + + $scope.subsTabPane = 20; + var vm = this; vm.isOpen = false; 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 73d523c87..454950a9c 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 @@ -9,6 +9,9 @@ ListProjectMemberController.$inject = ['$scope', 'ListProjectMemberService', 'DeleteProjectMemberService', 'getParameterByName', '$location', 'currentUser', '$filter', 'trFilter']; function ListProjectMemberController($scope, ListProjectMemberService, DeleteProjectMemberService, getParameterByName, $location, currentUser, $filter, trFilter) { + + $scope.subsTabPane = 110; + var vm = this; vm.isOpen = false; diff --git a/static/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html index 1367b1c47..aaafe23ef 100644 --- a/static/resources/js/components/system-management/destination.directive.html +++ b/static/resources/js/components/system-management/destination.directive.html @@ -1,5 +1,5 @@ -
+
@@ -38,6 +38,6 @@
-
//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //
+
//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //
\ No newline at end of file diff --git a/static/resources/js/components/system-management/destination.directive.js b/static/resources/js/components/system-management/destination.directive.js index a1028440f..7dcc5ba22 100644 --- a/static/resources/js/components/system-management/destination.directive.js +++ b/static/resources/js/components/system-management/destination.directive.js @@ -9,6 +9,9 @@ DestinationController.$inject = ['$scope', 'ListDestinationService', 'DeleteDestinationService', '$filter', 'trFilter']; function DestinationController($scope, ListDestinationService, DeleteDestinationService, $filter, trFilter) { + + $scope.subsSubPane = 276; + var vm = this; vm.retrieve = retrieve; diff --git a/static/resources/js/components/system-management/replication.directive.html b/static/resources/js/components/system-management/replication.directive.html index c61ba1976..5d347df23 100644 --- a/static/resources/js/components/system-management/replication.directive.html +++ b/static/resources/js/components/system-management/replication.directive.html @@ -1,4 +1,4 @@ -
+
@@ -46,10 +46,10 @@ - + well-split
-
//vm.replications ? vm.replications.length : 0// // 'items' | tr //
+
//vm.replications ? vm.replications.length : 0// // 'items' | tr //
\ No newline at end of file diff --git a/static/resources/js/components/system-management/replication.directive.js b/static/resources/js/components/system-management/replication.directive.js index 7218849d9..e49dcc2d1 100644 --- a/static/resources/js/components/system-management/replication.directive.js +++ b/static/resources/js/components/system-management/replication.directive.js @@ -6,9 +6,12 @@ .module('harbor.system.management') .directive('replication', replication); - ReplicationController.$inject = ['ListReplicationPolicyService', 'ToggleReplicationPolicyService']; + ReplicationController.$inject = ['$scope', 'ListReplicationPolicyService', 'ToggleReplicationPolicyService']; - function ReplicationController(ListReplicationPolicyService, ToggleReplicationPolicyService) { + function ReplicationController($scope, ListReplicationPolicyService, ToggleReplicationPolicyService) { + + $scope.subsSubPane = 276; + var vm = this; vm.retrieve = retrieve; vm.search = search; diff --git a/static/resources/js/components/user/list-user.directive.html b/static/resources/js/components/user/list-user.directive.html index 9b2b2f07d..4c82a1a8e 100644 --- a/static/resources/js/components/user/list-user.directive.html +++ b/static/resources/js/components/user/list-user.directive.html @@ -1,40 +1,44 @@ -
-
-
- - - - +
+
+
+
+ + + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + +
// 'username' | tr //// 'email' | tr //// 'registration_time' | tr //// 'administrator' | tr //// 'operation' | tr //
//u.username////u.email////u.creation_time | dateL : 'YYYY-MM-DD HH:mm:ss'// + + +    +
+
+
+
//vm.users ? vm.users.length : 0// items
+
-
-
- -
- - - - - - - - - - - - - - - - - -
// 'username' | tr //// 'email' | tr //// 'registration_time' | tr //// 'administrator' | tr //// 'operation' | tr //
//u.username////u.email////u.creation_time | dateL : 'YYYY-MM-DD HH:mm:ss'// - - -    -
-
-
-
//vm.users ? vm.users.length : 0// items
+
diff --git a/static/resources/js/components/user/list-user.directive.js b/static/resources/js/components/user/list-user.directive.js index 677ea160d..73bc82dfb 100644 --- a/static/resources/js/components/user/list-user.directive.js +++ b/static/resources/js/components/user/list-user.directive.js @@ -9,6 +9,9 @@ ListUserController.$inject = ['$scope', 'ListUserService', 'DeleteUserService']; function ListUserController($scope, ListUserService, DeleteUserService) { + + $scope.subsSubPane = 226; + var vm = this; vm.username = ''; diff --git a/static/resources/js/layout/admin-option/admin-option.controller.js b/static/resources/js/layout/admin-option/admin-option.controller.js index f26e0987c..c16082d15 100644 --- a/static/resources/js/layout/admin-option/admin-option.controller.js +++ b/static/resources/js/layout/admin-option/admin-option.controller.js @@ -10,7 +10,8 @@ function AdminOptionController($scope) { - $scope.subsSubPane = 276; + $scope.subsSubPane = 296; + var vm = this; vm.toggle = false; vm.toggleAdminOption = toggleAdminOption; diff --git a/views/repository.htm b/views/repository.htm index 9320dbe35..282979f48 100644 --- a/views/repository.htm +++ b/views/repository.htm @@ -23,6 +23,7 @@ +