From e4a642681fb113ba257a8e0a750012845814b549 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 27 Feb 2018 18:53:32 +0100 Subject: [PATCH] Added lazy load for issue list --- public/js/index.js | 10 +++++++++- templates/repo/issue/view_content/sidebar.tmpl | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index c6a1cbee9..d4bf8053a 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2156,4 +2156,12 @@ function buildIssuesList() { } } -buildIssuesList(); +var buildIssuesListOnce = (function() { + var executed = false; + return function() { + if (!executed) { + executed = true; + buildIssuesList(); + } + }; +})(); diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 74b8cfd13..3d9942223 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -278,7 +278,7 @@
{{$.CsrfTokenHtml}}
-