Merge pull request #835 from mjibson/shared-tags-lines

Add page offset to track line tag index
This commit is contained in:
Matt Jibson 2015-11-09 16:23:16 -05:00
commit 7e8981a38a
2 changed files with 2 additions and 1 deletions

View file

@ -53,7 +53,7 @@
</span> </span>
<span class="co-filter-box"> <span class="co-filter-box">
<span class="page-controls" total-count="tags.length" current-page="options.page" page-size="50"></span> <span class="page-controls" total-count="tags.length" current-page="options.page" page-size="tagsPerPage"></span>
<input class="form-control" type="text" ng-model="options.tagFilter" placeholder="Filter Tags..."> <input class="form-control" type="text" ng-model="options.tagFilter" placeholder="Filter Tags...">
</span> </span>
</div> </div>

View file

@ -169,6 +169,7 @@ angular.module('quay').directive('repoPanelTags', function () {
$scope.trackLineClass = function(index, track_info) { $scope.trackLineClass = function(index, track_info) {
var startIndex = $.inArray(track_info.tags[0], $scope.tags); var startIndex = $.inArray(track_info.tags[0], $scope.tags);
var endIndex = $.inArray(track_info.tags[track_info.tags.length - 1], $scope.tags); var endIndex = $.inArray(track_info.tags[track_info.tags.length - 1], $scope.tags);
index += $scope.options.page * $scope.tagsPerPage;
if (index == startIndex) { if (index == startIndex) {
return 'start'; return 'start';