-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(table): add scroll shadow to table with one section
- Loading branch information
Showing
6 changed files
with
153 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<div class="_e_table"> | ||
<div id="scr-table__sections" class="_e_table__sections _e_table__sections_shadow _e_table__sections_left-shadow _e_table__sections_shadow_on"> | ||
<div | ||
id="scr-table__section_scrollable" | ||
class="_e_table__section _e_table__section_scrollable" | ||
style="width: 100%;" | ||
> | ||
<div class="_e_thead"> | ||
<div class="_e_thead__cell" style="flex-basis: 100px; flex-grow: 1;">Критичность</div> | ||
<div class="_e_thead__cell" style="flex-basis: 140px; flex-grow: 1;">Тип заявки</div> | ||
<div class="_e_thead__cell" style="flex-basis: 200px; flex-grow: 1;">Состояние</div> | ||
<div class="_e_thead__cell" style="flex-basis: 100px; flex-grow: 1;">Ожидание</div> | ||
<div class="_e_thead__cell" style="flex-basis: 140px; flex-grow: 1;">Плановая сумма</div> | ||
<div class="_e_thead__cell" style="flex-basis: 240px; flex-grow: 1;">Тема</div> | ||
<div class="_e_thead__cell" style="flex-basis: 220px; flex-grow: 1;">Плановая дата завершения</div> | ||
<div class="_e_thead__cell" style="flex-basis: 240px; flex-grow: 1;">Продукт</div> | ||
</div> | ||
<div class="_e_tbody"> | ||
<div class="_e_tbody__row"> | ||
<div class="_e_tbody__cell" style="flex-basis: 100px; flex-grow: 1;">Обычная</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 140px; flex-grow: 1;">Несоответствие</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 200px; flex-grow: 1;">Первичная обработка</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 100px; flex-grow: 1;">Нет</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 140px; flex-grow: 1;">10 000</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 240px; flex-grow: 1;">Ничего не работает, помогите</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 220px; flex-grow: 1;">12.03.2020 17:55</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 240px; flex-grow: 1;">ЕБС. Сервис «Расширенный»</div> | ||
</div> | ||
<div class="_e_tbody__row _e_tbody__row_selected"> | ||
<div class="_e_tbody__cell" style="flex-basis: 100px; flex-grow: 1;">Обычная</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 140px; flex-grow: 1;">Несоответствие</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 200px; flex-grow: 1;">Первичная обработка</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 100px; flex-grow: 1;">Нет</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 140px; flex-grow: 1;">10 000</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 240px; flex-grow: 1;">Ничего не работает, помогите</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 220px; flex-grow: 1;">12.03.2020 17:55</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 240px; flex-grow: 1;">ЕБС. Сервис «Расширенный»</div> | ||
</div> | ||
<div class="_e_tbody__row"> | ||
<div class="_e_tbody__cell" style="flex-basis: 100px; flex-grow: 1;">Обычная</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 140px; flex-grow: 1;">Несоответствие</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 200px; flex-grow: 1;">Первичная обработка</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 100px; flex-grow: 1;">Нет</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 140px; flex-grow: 1;">10 000</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 240px; flex-grow: 1;">Ничего не работает, помогите</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 220px; flex-grow: 1;">12.03.2020 17:55</div> | ||
<div class="_e_tbody__cell" style="flex-basis: 240px; flex-grow: 1;">ЕБС. Сервис «Расширенный»</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="_e_tfoot"> | ||
<div></div> | ||
<div class="_e_tpagination"> | ||
<span class="_e_tpagination__text">1—3 из 10</span> | ||
<span class="_e_tpagination__action _e_tpagination__action_disabled"> | ||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M18.7915 11.005H7.62148L12.5015 6.12499C12.8915 5.73499 12.8915 5.09499 12.5015 4.70499C12.3147 4.51774 12.061 4.41251 11.7965 4.41251C11.532 4.41251 11.2783 4.51774 11.0915 4.70499L4.50148 11.295C4.11148 11.685 4.11148 12.315 4.50148 12.705L11.0915 19.295C11.4815 19.685 12.1115 19.685 12.5015 19.295C12.8915 18.905 12.8915 18.275 12.5015 17.885L7.62148 13.005H18.7915C19.3415 13.005 19.7915 12.555 19.7915 12.005C19.7915 11.455 19.3415 11.005 18.7915 11.005Z" /> | ||
</svg> | ||
</span> | ||
<span class="_e_tpagination__action"> | ||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M5.20898 13H16.379L11.499 17.88C11.109 18.27 11.109 18.91 11.499 19.3C11.889 19.69 12.519 19.69 12.909 19.3L19.499 12.71C19.889 12.32 19.889 11.69 19.499 11.3L12.919 4.69999C12.7322 4.51274 12.4785 4.40751 12.214 4.40751C11.9495 4.40751 11.6958 4.51274 11.509 4.69999C11.119 5.08999 11.119 5.71999 11.509 6.10999L16.379 11H5.20898C4.65898 11 4.20898 11.45 4.20898 12C4.20898 12.55 4.65898 13 5.20898 13Z" /> | ||
</svg> | ||
</span> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
window.setTimeout(function() { | ||
/* scrollable-table.html perfect scrollbar */ | ||
const scrSections = document.querySelector('#scr-table__sections'); | ||
const scrScrollable = document.querySelector('#scr-table__section_scrollable'); | ||
const scrPs = new PerfectScrollbar(scrScrollable); | ||
|
||
scrScrollable.addEventListener('ps-scroll-right', () => { | ||
scrSections.classList.add('_e_table__section_left-shadow_on'); | ||
}); | ||
|
||
scrScrollable.addEventListener('ps-x-reach-start', () => { | ||
scrSections.classList.remove('_e_table__section_left-shadow_on'); | ||
}); | ||
|
||
scrScrollable.addEventListener('ps-scroll-left', () => { | ||
scrSections.classList.add('_e_table__sections_shadow_on'); | ||
}); | ||
|
||
scrScrollable.addEventListener('ps-x-reach-end', () => { | ||
scrSections.classList.remove('_e_table__sections_shadow_on'); | ||
}); | ||
|
||
/* advanced-table.html perfect scrollbar */ | ||
const advSections = document.querySelector('#adv-table__sections'); | ||
const advFixed = document.querySelector('#adv-table__section_fixed'); | ||
const advScrollable = document.querySelector('#adv-table__section_scrollable'); | ||
const advPs = new PerfectScrollbar(advScrollable); | ||
|
||
advScrollable.addEventListener('ps-scroll-right', () => { | ||
advFixed.classList.add('_e_table__section_shadow_on'); | ||
}); | ||
|
||
advScrollable.addEventListener('ps-x-reach-start', () => { | ||
advFixed.classList.remove('_e_table__section_shadow_on'); | ||
}); | ||
|
||
advScrollable.addEventListener('ps-scroll-left', () => { | ||
advSections.classList.add('_e_table__sections_shadow_on'); | ||
}); | ||
|
||
advScrollable.addEventListener('ps-x-reach-end', () => { | ||
advSections.classList.remove('_e_table__sections_shadow_on'); | ||
}); | ||
|
||
/* advanced-table.html indeterminate checkbox */ | ||
document.querySelector('#indeterminate-checkbox').indeterminate = true; | ||
}, 3000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters