Mercurial > kallithea
changeset 7087:1174b9f0afc4
changelog: cleanup url hack
Instead of using a hack, that removes the 'set' parameter from the request,
don't give the submit button a name and therefore don't submit the parameter
in the first place.
Related to 97c12433267a
author | domruf <dominikruf@gmail.com> |
---|---|
date | Tue, 08 Aug 2017 23:43:11 +0200 |
parents | 438876d818d3 |
children | b83adf1509d6 |
files | kallithea/controllers/changelog.py kallithea/templates/changelog/changelog.html |
diffstat | 2 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/changelog.py Thu Jan 11 19:59:10 2018 +0100 +++ b/kallithea/controllers/changelog.py Tue Aug 08 23:43:11 2017 +0200 @@ -74,14 +74,6 @@ @LoginRequired() @HasRepoPermissionLevelDecorator('read') def index(self, repo_name, revision=None, f_path=None): - # Fix URL after page size form submission via GET - # TODO: Somehow just don't send this extra junk in the GET URL - if request.GET.get('set'): - request.GET.pop('set', None) - if revision is None: - raise HTTPFound(location=url('changelog_home', repo_name=repo_name, **request.GET)) - raise HTTPFound(location=url('changelog_file_home', repo_name=repo_name, revision=revision, f_path=f_path, **request.GET)) - limit = 2000 default = 100 if request.GET.get('size'):
--- a/kallithea/templates/changelog/changelog.html Thu Jan 11 19:59:10 2018 +0100 +++ b/kallithea/templates/changelog/changelog.html Tue Aug 08 23:43:11 2017 +0200 @@ -38,7 +38,7 @@ <div class="changelog-heading clearfix" style="${'display:none' if c.changelog_for_path else ''}"> <div class="pull-left"> ${h.form(h.url.current(),method='get',class_="form-inline")} - ${h.submit('set',_('Show'),class_="btn btn-default btn-sm")} + ${h.submit(None,_('Show'),id='set_size_submit',class_="btn btn-default btn-sm")} ${h.text('size',size=3,value=c.size,class_='form-control')} ${_('revisions')} %if c.branch_name: