|
9 | 9 | Clipboard = require('clipboard'); |
10 | 10 |
|
11 | 11 | function expandAll() { |
12 | | - loadLazyImages(document, '.section_collapsed img'); |
| 12 | + loadLazyImages(document, '.section_collapsed .tab__item_active img'); |
13 | 13 | forEach.call(sections, function(section) { |
14 | 14 | section.classList.remove('section_collapsed'); |
15 | 15 | }); |
|
22 | 22 | } |
23 | 23 |
|
24 | 24 | function expandErrors() { |
25 | | - loadLazyImages(document, '.section_status_fail > .section__body > .image-box img'); |
26 | | - loadLazyImages(document, '.section_status_warning > .section__body > .image-box img'); |
| 25 | + loadLazyImages(document, '.section_status_fail > .section__body > .image-box .tab__item_active img'); |
| 26 | + loadLazyImages(document, '.section_status_warning > .section__body > .image-box .tab__item_active img'); |
27 | 27 | forEach.call(sections, function(section) { |
28 | 28 | if (section.classList.contains('section_status_fail') || |
29 | 29 | section.classList.contains('section_status_warning')) { |
|
35 | 35 | } |
36 | 36 |
|
37 | 37 | function expandRetries() { |
38 | | - loadLazyImages(document, '.has-retries > .section__body > .image-box img'); |
| 38 | + loadLazyImages(document, '.has-retries > .section__body > .image-box .tab__item_active img'); |
39 | 39 | forEach.call(sections, function(section) { |
40 | 40 | if (section.classList.contains('has-retries')) { |
41 | 41 | section.classList.remove('section_collapsed'); |
|
66 | 66 |
|
67 | 67 | switch_(imageBox.querySelector('.tab'), 'tab__item_active'); |
68 | 68 | switch_(imageBox.querySelector('.tab-switcher'), 'tab-switcher__button_active'); |
| 69 | + loadLazyImages(imageBox, '.tab__item_active img'); |
69 | 70 |
|
70 | 71 | function switch_(elem, selector) { |
71 | 72 | forEach.call(elem.children, function(item) { |
|
190 | 191 |
|
191 | 192 | forEach.call(document.querySelectorAll('.section'), function(section) { |
192 | 193 | section.querySelector('.section__title').addEventListener('click', function() { |
193 | | - loadLazyImages(section, ':scope > .section__body > .image-box img'); |
| 194 | + loadLazyImages(section, ':scope > .section__body > .image-box .tab__item_active img'); |
194 | 195 | section.classList.toggle('section_collapsed'); |
195 | 196 | }); |
196 | 197 | }); |
|
0 commit comments