Changeset - dbc009ab5af3
[Not reviewed]
default
0 3 0
Mads Kiilerich - 8 years ago 2017-08-27 17:00:57
mads@kiilerich.com
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.
3 files changed with 1 insertions and 33 deletions:
0 comments (0 inline, 0 general)
kallithea/config/routing.py
Show inline comments
 
@@ -702,10 +702,6 @@ def make_map(config):
 
    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))
kallithea/controllers/changelog.py
Show inline comments
 
@@ -50,16 +50,8 @@ def _load_changelog_summary():
 
    # 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 @@ class ChangelogController(BaseRepoContro
 
            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()
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -369,15 +369,4 @@ $(document).ready(function(){
 
</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>
0 comments (0 inline, 0 general)