Skip to content

Commit df90e8e

Browse files
committed
[PRAC/cont] Correct table structure.. "first" row
Attempt to exclude stretching "first" row.. whole height (fixed) of tbl. Worth noting: - that it's/tbl definitely gotten better. core: B-3 / JS-BL
1 parent 36cbcf2 commit df90e8e

File tree

2 files changed

+61
-8
lines changed

2 files changed

+61
-8
lines changed

core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/css/crm-output.css

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,45 @@
3939

4040
.crm__output-table {
4141
margin-bottom: 0;
42-
/* min-height: 322px; */
42+
border-collapse: collapse;
43+
width: 100%;
44+
height: 322px;
4345
font-family: var(--open-sans), sans-serif;
4446
font-weight: var(--regular);
4547
background-color: var(--white);
4648
}
4749

50+
.crm__output-table thead {
51+
display: table;
52+
width: 100%;
53+
table-layout: fixed;
54+
}
55+
56+
.crm__output-table thead tr {
57+
display: table-row;
58+
width: 100%;
59+
}
60+
61+
.crm__output-table thead th {
62+
text-align: left;
63+
}
64+
65+
.crm__output-table tbody {
66+
display: table;
67+
width: 100%;
68+
}
69+
70+
.crm__output-table tbody tr {
71+
display: table-row;
72+
width: 100%;
73+
table-layout: fixed;
74+
}
75+
76+
.crm__output-table tbody td {
77+
width: auto;
78+
text-align: left;
79+
}
80+
4881
.crm__output-table tr th {
4982
border: none;
5083
font-weight: var(--regular);
@@ -58,6 +91,17 @@
5891
cursor: pointer;
5992
}
6093

94+
.crm__output-table-body-empty-row {
95+
width: 100%;
96+
height: 65px;
97+
text-align: center;
98+
}
99+
100+
.crm__output-table-body-empty-row td {
101+
width: 100%;
102+
text-align: center;
103+
}
104+
61105
.table-hover tbody tr:not(.table-dark) {
62106
--bs-table-hover-bg: rgba(0, 0, 0, 0.02) !important;
63107
}
@@ -67,28 +111,36 @@
67111
text-align: start;
68112
}
69113

70-
.crm__output-table #table-th-id {
71-
padding-left: 15px;
114+
.crm__output-table #table-th-id,
115+
.crm__output-table .crm__output-table-body-cell_id {
116+
padding-left: 20px;
72117
width: 95px;
73118
}
74119

75-
.crm__output-table #table-th-fio {
120+
.crm__output-table #table-th-fio,
121+
.crm__output-table .crm__output-table-body-cell_fio {
76122
width: 360px;
77123
}
78124

79-
.crm__output-table #table-th-dt {
125+
.crm__output-table #table-th-dt,
126+
.crm__output-table .crm__output-table-body-cell_crt-d-time {
80127
width: 195px;
81128
}
82129

83-
.crm__output-table #table-th-change {
130+
.crm__output-table #table-th-change,
131+
.crm__output-table .crm__output-table-body-cell_chg-d-time {
84132
width: 195px;
85133
}
86134

87135
.crm__output-table #table-th-contact {
88-
width: 130px;
89136
cursor: default;
90137
}
91138

139+
.crm__output-table #table-th-contact,
140+
.crm__output-table .crm__output-table #table-th-contact {
141+
width: 130px;
142+
}
143+
92144
.crm__output-table #table-th-action {
93145
cursor: default;
94146
}
@@ -177,7 +229,6 @@
177229
}
178230

179231
.crm__output-table-body-row .crm__output-table-body-cell_id {
180-
padding-left: 15px;
181232
color: var(--text-gray);
182233
}
183234

core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/js/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@
337337
const emptyTableTrRow = document.createElement('tr');
338338
const emptyTableTdCell = document.createElement('td');
339339

340+
emptyTableTrRow.classList.add('crm__output-table-body-empty-row');
341+
340342
emptyTableTdCell.colSpan = 6; // объединение всех колонок
341343
emptyTableTdCell.textContent =
342344
'Пусто.. измените фильтрацию, добавьте клиента!? Запустите сервер?';

0 commit comments

Comments
 (0)