Skip to Content

JavaScript File

URL: https://static.insales-cdn.com/assets/static-versioned/5.83/static/libs/my-layout/1.0.0/my-layout.js
HTTP Status: 200 OK
MIME Type: text/javascript
Last Modified: Fri, 29 Aug 2025 06:44:47 GMT
Download Time: Less than a second
Cookies: None
Size: 4 KB
HTTP Headers:  16 headers
Links In:  1 pages
OK Issues: No issues found

1window.addEventListener("load", (event) => {

2 let setWindowHeightVariable = () => {

3 let vh = window.innerHeight;

4 document.querySelector('html').style.setProperty('--vh', `${vh}px`);

5 }

6

7 if (typeof EventBus != 'undefined') {

8 EventBus.subscribe('errors:insales:quick_checkout', function () {

9 if ($('.m-modal-heading').length > 0) {

10 $('.m-modal-heading')[0].scrollIntoView({ block: "center", behavior: "smooth" });

11 }

12 });

13 }

14

15 let setFixedPanelOffsetVariable = (panelPosition, value) => {

16 let css_variable = '';

17

18 if (panelPosition == 'top') {

19 css_variable = '--fixed-panels-top-offset';

20 }

21

22 if (panelPosition == 'bottom') {

23 css_variable = '--fixed-panels-bottom-offset';

24 }

25

26 document.querySelector('html').style.setProperty(css_variable, `${value}px`);

27 }

28

29 let isEmptyFixedPanel = (panel) => {

30 const layouts = panel.querySelectorAll(".layout");

31 return (layouts.length == 0) ? true : false;

32 }

33

34 let checkSidebarHeight = () => {

35 const asideArea = document.querySelector('.page_layout > aside');

36 const sidebar = document.querySelector('[data-sidebar]');

37 const fixedPanelTop = document.querySelector('[data-fixed-panels="top"]');

38

39 if (!asideArea) {

40 return;

...

</html>