mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 20:41:22 +01:00
Refinement on paginations.
This commit is contained in:
parent
c3540be065
commit
712b198125
@ -56,14 +56,12 @@
|
||||
vm.pageSize = 20;
|
||||
|
||||
$scope.$watch('vm.page', function(current, origin) {
|
||||
if(current !== 1) {
|
||||
if(current) {
|
||||
vm.page = current;
|
||||
retrieve(vm.queryParams, vm.page, vm.pageSize);
|
||||
}
|
||||
});
|
||||
|
||||
retrieve(vm.queryParams, vm.page, vm.pageSize);
|
||||
|
||||
|
||||
$scope.$on('$locationChangeSuccess', function() {
|
||||
|
||||
vm.projectId = getParameterByName('project_id', $location.absUrl());
|
||||
|
@ -48,7 +48,6 @@
|
||||
vm.tagCount = {};
|
||||
|
||||
vm.projectId = getParameterByName('project_id', $location.absUrl());
|
||||
vm.retrieve();
|
||||
|
||||
$scope.$on('$locationChangeSuccess', function() {
|
||||
vm.projectId = getParameterByName('project_id', $location.absUrl());
|
||||
@ -62,11 +61,9 @@
|
||||
vm.repositories = current || [];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$scope.$watch('vm.page', function(current) {
|
||||
if(current !== 1) {
|
||||
if(current) {
|
||||
vm.page = current;
|
||||
vm.retrieve();
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
vm.publicity = 0;
|
||||
|
||||
vm.page = 1;
|
||||
vm.pageSize = 20;
|
||||
vm.pageSize = 10;
|
||||
|
||||
vm.retrieve = retrieve;
|
||||
vm.showAddProject = showAddProject;
|
||||
@ -38,7 +38,6 @@
|
||||
vm.showAddButton = showAddButton;
|
||||
vm.togglePublicity = togglePublicity;
|
||||
vm.user = currentUser.get();
|
||||
vm.retrieve();
|
||||
vm.getProjectRole = getProjectRole;
|
||||
|
||||
vm.searchProjectByKeyPress = searchProjectByKeyPress;
|
||||
@ -134,6 +133,7 @@
|
||||
function togglePublicity(e) {
|
||||
vm.publicity = e.publicity;
|
||||
vm.isOpen = false;
|
||||
vm.page = 1;
|
||||
vm.retrieve();
|
||||
console.log('vm.publicity:' + vm.publicity);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user