# HG changeset patch # User domruf # Date 1502228591 -7200 # Node ID 1174b9f0afc462959a81014a5cf5650eb3ac6928 # Parent 438876d818d3463b54d938ca62aa3d1dcb5e1deb 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 diff -r 438876d818d3 -r 1174b9f0afc4 kallithea/controllers/changelog.py --- 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'): diff -r 438876d818d3 -r 1174b9f0afc4 kallithea/templates/changelog/changelog.html --- 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 @@
${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: