From e4ad25ea815b026d81c241445d8efdca7910c95c Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 21 Sep 2016 14:23:32 -0400 Subject: [PATCH] Add repository list pagination Also changes our binds to be bind-once, which should significantly reduce memory and increase performance for large lists Fixes #1856 --- static/css/core-ui.css | 14 +++++++-- static/directives/repo-list-table.html | 35 +++++++++++++++------- static/directives/repo-list-view.html | 2 +- static/js/directives/ng-image-watch.js | 8 +++-- static/js/directives/ui/repo-list-table.js | 10 +++++-- static/js/directives/ui/repo-list-view.js | 6 ++++ 6 files changed, 55 insertions(+), 20 deletions(-) diff --git a/static/css/core-ui.css b/static/css/core-ui.css index 68b326c80..26fb1b5cf 100644 --- a/static/css/core-ui.css +++ b/static/css/core-ui.css @@ -1310,6 +1310,10 @@ a:focus { padding-left: 4px; } +.co-top-bar { + height: 50px; +} + .co-check-bar .co-checked-actions .btn { margin-left: 6px; } @@ -1318,21 +1322,25 @@ a:focus { margin-right: 4px; } -.co-check-bar .co-filter-box { +.co-check-bar .co-filter-box, .co-top-bar .co-filter-box { float: right; } -.co-check-bar .co-filter-box .page-controls { +.co-check-bar .co-filter-box .page-controls, .co-top-bar .co-filter-box .page-controls { margin-right: 6px; margin-bottom: 6px; } -.co-check-bar .co-filter-box input { +.co-check-bar .co-filter-box input, .co-top-bar .co-filter-box input { width: 300px; display: inline-block; vertical-align: middle; } +.co-top-bar .co-filter-box input { + vertical-align: top; +} + .empty { border-bottom: none !important; } diff --git a/static/directives/repo-list-table.html b/static/directives/repo-list-table.html index 4707551b8..e4a9bcd49 100644 --- a/static/directives/repo-list-table.html +++ b/static/directives/repo-list-table.html @@ -1,11 +1,24 @@
-
+ +
+ + + + +
+ +
You do not have any viewable repositories.
This namespace doesn't have any viewable repositories.
Either no repositories exist yet or you may not have permission to view any. If you have permission, try creating a new repository.
+
+
No matching repositories
+
There are not matching repositories for the entered filter
+
+ - + diff --git a/static/directives/repo-list-view.html b/static/directives/repo-list-view.html index 6e85e828a..3e3271185 100644 --- a/static/directives/repo-list-view.html +++ b/static/directives/repo-list-view.html @@ -1,6 +1,6 @@
-
+
- - - {{ repository.namespace }} - {{ repository.name }} + + + {{ ::repository.namespace }} + {{ ::repository.name }} - - {{ repository.last_modified * 1000 | amCalendar }} + + {{ ::repository.last_modified * 1000 | amCalendar }} - (Empty Repository) + (Empty Repository) -