# HG changeset patch # User Mads Kiilerich # Date 2015-04-28 16:45:43 # Node ID 2881dd265f21721f57a55c63e56da21b33c74962 # Parent 58e4670c79024d2e4a55bf3a5bde6240876bb88b templates: only bind pager event handlers once - avoid "leaks" and repeated page loads Summary page ended up hammering the server and when pages were loaded one time extra for each paging click. Just moving javascript code from the data template (where it would be re-run on each paging) and to the main page template. diff --git a/kallithea/templates/changelog/changelog_summary_data.html b/kallithea/templates/changelog/changelog_summary_data.html --- a/kallithea/templates/changelog/changelog_summary_data.html +++ b/kallithea/templates/changelog/changelog_summary_data.html @@ -72,16 +72,6 @@ - -
${c.repo_changesets.pager('$link_previous ~2~ $link_next')}
diff --git a/kallithea/templates/followers/followers.html b/kallithea/templates/followers/followers.html --- a/kallithea/templates/followers/followers.html +++ b/kallithea/templates/followers/followers.html @@ -12,6 +12,7 @@ <%block name="header_menu"> ${self.menu('repositories')} + <%def name="main()"> ${self.repo_context_bar('followers')}
@@ -26,4 +27,17 @@ ${self.repo_context_bar('followers')}
+ diff --git a/kallithea/templates/followers/followers_data.html b/kallithea/templates/followers/followers_data.html --- a/kallithea/templates/followers/followers_data.html +++ b/kallithea/templates/followers/followers_data.html @@ -16,18 +16,5 @@ % endfor
- ${c.followers_pager.pager('$link_previous ~2~ $link_next')}
diff --git a/kallithea/templates/forks/forks.html b/kallithea/templates/forks/forks.html --- a/kallithea/templates/forks/forks.html +++ b/kallithea/templates/forks/forks.html @@ -27,4 +27,17 @@ ${self.repo_context_bar('showforks')} + diff --git a/kallithea/templates/forks/forks_data.html b/kallithea/templates/forks/forks_data.html --- a/kallithea/templates/forks/forks_data.html +++ b/kallithea/templates/forks/forks_data.html @@ -24,19 +24,6 @@ % endfor
- ${c.forks_pager.pager('$link_previous ~2~ $link_next')}
% else: diff --git a/kallithea/templates/journal/journal.html b/kallithea/templates/journal/journal.html --- a/kallithea/templates/journal/journal.html +++ b/kallithea/templates/journal/journal.html @@ -70,7 +70,7 @@ - + + + diff --git a/kallithea/templates/journal/journal_data.html b/kallithea/templates/journal/journal_data.html --- a/kallithea/templates/journal/journal_data.html +++ b/kallithea/templates/journal/journal_data.html @@ -38,24 +38,6 @@
${c.journal_pager.pager('$link_previous ~2~ $link_next')}
- %else:
${_('No entries yet')} diff --git a/kallithea/templates/summary/summary.html b/kallithea/templates/summary/summary.html --- a/kallithea/templates/summary/summary.html +++ b/kallithea/templates/summary/summary.html @@ -397,4 +397,15 @@ $(document).ready(function(){ %endif +## Shortlog paging + +