update for auto-resizing height to table body.

This commit is contained in:
kunw 2016-06-29 14:18:36 +08:00
parent 0f0bcfa484
commit 2fafa3929c
8 changed files with 16 additions and 10 deletions

View File

@ -1,6 +1,6 @@
.up-section .up-table-pane {
overflow-y: auto;
height: 180px;
height: 220px;
margin-top: -10px;
}

View File

@ -1,6 +1,6 @@
<h4 class="page-header title-color underlined">// 'popular_repositories' | tr //</h4>
<div class="col-xs-4 col-md-12 up-table-pane">
<div class="table-head-container" style="width: 650px">
<div class="table-head-container">
<table class="table table-pane table-header">
<thead>
<th width="60%">// 'repository_name' | tr //</th>
@ -9,7 +9,7 @@
</thead>
</table>
</div>
<div class="table-body-container" style="height: 120px; width: 650px">
<div class="table-body-container" ng-style="vm.customBodyHeight">
<table class="table table-pane">
<tbody>
<tr>

View File

@ -30,7 +30,9 @@
'restrict': 'E',
'templateUrl': '/static/resources/js/components/top-repository/top-repository.directive.html',
'controller': TopRepositoryController,
'scope' : true,
'scope' : {
'customBodyHeight': '='
},
'controllerAs': 'vm',
'bindToController': true
};

View File

@ -9,7 +9,7 @@
</thead>
</table>
</div>
<div class="table-body-container">
<div class="table-body-container" style="height: 220px;">
<table class="table table-pane">
<tbody>
<tr>

View File

@ -9,7 +9,8 @@
DashboardController.$inject = ['$scope'];
function DashboardController($scope) {
var vm = this;
vm.customBodyHeight = {'height': '165px'};
}
})();

View File

@ -14,8 +14,11 @@
$scope.subsSection = 32;
$scope.subsSubPane = 226;
var vm = this;
vm.customBodyHeight = {'height': '180px'};
var indexDesc = $filter('tr')('index_desc', []);
var indexDesc1 = $filter('tr')('index_desc_1', []);
var indexDesc2 = $filter('tr')('index_desc_2', []);

View File

@ -10,7 +10,7 @@
</div>
<div class="col-xs-8 col-md-8">
<div class="up-section">
<top-repository></top-repository>
<top-repository custom-body-height="vm.customBodyHeight"></top-repository>
</div>
</div>
</div>
@ -20,7 +20,7 @@
<div class="col-xs-12 col-md-12">
<div class="down-section">
<h4 class="page-header title-color underlined">// 'logs' | tr //</h4>
<user-log></user-log>
<user-log></user-log>
</div>
</div>
</div>

View File

@ -52,7 +52,7 @@
</div>
<div class="col-md-8">
<div class="down-section">
<top-repository></top-repository>
<top-repository custom-body-height="vm.customBodyHeight"></top-repository>
</div>
</div>
</div>