Mercurial > kallithea
changeset 6847:dbc009ab5af3
summary: drop the in-page paging and replace it with simpler page reload
This makes code and future refactorings simpler, and it only losses a little
bit of nice-ness.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 27 Aug 2017 17:00:57 +0200 |
parents | 4f3447149c98 |
children | e6e69ed2c89e |
files | kallithea/config/routing.py kallithea/controllers/changelog.py kallithea/templates/summary/summary.html |
diffstat | 3 files changed, 1 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/config/routing.py Sun Aug 27 16:39:35 2017 +0200 +++ b/kallithea/config/routing.py Sun Aug 27 17:00:57 2017 +0200 @@ -702,10 +702,6 @@ rmap.connect('changelog_home', '/{repo_name:.*?}/changelog', controller='changelog', conditions=dict(function=check_repo)) - rmap.connect('changelog_summary_home', '/{repo_name:.*?}/changelog_summary', - controller='changelog', action='changelog_summary', - conditions=dict(function=check_repo)) - rmap.connect('changelog_file_home', '/{repo_name:.*?}/changelog/{revision}/{f_path:.*}', controller='changelog', f_path=None, conditions=dict(function=check_repo))
--- a/kallithea/controllers/changelog.py Sun Aug 27 16:39:35 2017 +0200 +++ b/kallithea/controllers/changelog.py Sun Aug 27 17:00:57 2017 +0200 @@ -50,16 +50,8 @@ # only used from summary ... p = safe_int(request.GET.get('page'), 1) size = safe_int(request.GET.get('size'), 10) - - def url_generator(**kw): - return url('changelog_summary_home', - repo_name=c.db_repo.repo_name, size=size, **kw) - collection = c.db_repo_scm_instance - - c.cs_pagination = RepoPage(collection, page=p, - items_per_page=size, - url=url_generator) + c.cs_pagination = RepoPage(collection, page=p, items_per_page=size) page_revisions = [x.raw_id for x in list(c.cs_pagination)] c.cs_comments = c.db_repo.get_comments(page_revisions) c.cs_statuses = c.db_repo.statuses(page_revisions) @@ -183,12 +175,3 @@ c.cs = c.db_repo_scm_instance.get_changeset(cs) return render('changelog/changelog_details.html') raise HTTPNotFound() - - @LoginRequired() - @HasRepoPermissionLevelDecorator('read') - def changelog_summary(self, repo_name): - if request.environ.get('HTTP_X_PARTIAL_XHR'): - _load_changelog_summary() - - return render('changelog/changelog_summary_data.html') - raise HTTPNotFound()
--- a/kallithea/templates/summary/summary.html Sun Aug 27 16:39:35 2017 +0200 +++ b/kallithea/templates/summary/summary.html Sun Aug 27 17:00:57 2017 +0200 @@ -369,15 +369,4 @@ </script> %endif -## Shortlog paging -<script type="text/javascript"> - $(document).ready(function(){ - var $shortlog_data = $('#shortlog_data'); - $shortlog_data.on('click','.pager_link',function(e){ - asynchtml(e.target.href, $shortlog_data, function(){tooltip_activate();}); - e.preventDefault(); - }); - }); -</script> - </%def>