diff options
author | Phil Hughes <me@iamphill.com> | 2017-09-27 14:37:44 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-27 14:37:44 +0100 |
commit | c940fe2ad9173b8716b14a5672fc9dc2d89e2d14 (patch) | |
tree | bb8cc1bf80ef879b34809ac0a95e7c289610a89e /app/assets/javascripts | |
parent | 05d8e87dba4abaf9eb495bac147c4d4c5426da2e (diff) | |
download | gitlab-ce-c940fe2ad9173b8716b14a5672fc9dc2d89e2d14.tar.gz |
Lazy load images in mobile sidebar & header
Closes #38276
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/main.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/right_sidebar.js | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index ec001b9b31c..3b8e2c5b2f3 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -302,7 +302,10 @@ $(function () { return $container.remove(); // Commit show suppressed diff }); - $('.navbar-toggle').on('click', () => $('.header-content').toggleClass('menu-expanded')); + $('.navbar-toggle').on('click', () => { + $('.header-content').toggleClass('menu-expanded'); + gl.lazyLoader.loadCheck(); + }); // Show/hide comments on diff $body.on('click', '.js-toggle-diff-comments', function (e) { var $this = $(this); diff --git a/app/assets/javascripts/right_sidebar.js b/app/assets/javascripts/right_sidebar.js index a4eae135403..48eed79eb38 100644 --- a/app/assets/javascripts/right_sidebar.js +++ b/app/assets/javascripts/right_sidebar.js @@ -43,6 +43,8 @@ import Cookies from 'js-cookie'; $allGutterToggleIcons.removeClass('fa-angle-double-left').addClass('fa-angle-double-right'); $('aside.right-sidebar').removeClass('right-sidebar-collapsed').addClass('right-sidebar-expanded'); $('.page-with-sidebar').removeClass('right-sidebar-collapsed').addClass('right-sidebar-expanded'); + + gl.lazyLoader.loadCheck(); } if (!triggered) { return Cookies.set("collapsed_gutter", $('.right-sidebar').hasClass('right-sidebar-collapsed')); |