# HG changeset patch # User domruf # Date 2017-08-08 23:43:11 # 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 --git a/kallithea/controllers/changelog.py b/kallithea/controllers/changelog.py --- a/kallithea/controllers/changelog.py +++ b/kallithea/controllers/changelog.py @@ -74,14 +74,6 @@ class ChangelogController(BaseRepoContro @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 --git a/kallithea/templates/changelog/changelog.html b/kallithea/templates/changelog/changelog.html --- a/kallithea/templates/changelog/changelog.html +++ b/kallithea/templates/changelog/changelog.html @@ -38,7 +38,7 @@ ${self.repo_context_bar('changelog', c.f
${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: