Mercurial > kallithea
changeset 7468:1f3b311e865f
front-end: remove code that is unused after autocomplete switched to At.js
author | domruf <dominikruf@gmail.com> |
---|---|
date | Wed, 11 Oct 2017 19:37:03 +0200 |
parents | 2e7ffb755d4f |
children | 11800a6e526c |
files | kallithea/controllers/changeset.py kallithea/controllers/pullrequests.py kallithea/model/repo.py kallithea/templates/changeset/changeset.html kallithea/templates/pullrequests/pullrequest_show.html |
diffstat | 5 files changed, 0 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/changeset.py Mon Dec 10 22:54:04 2018 +0100 +++ b/kallithea/controllers/changeset.py Wed Oct 11 19:37:03 2017 +0200 @@ -291,10 +291,6 @@ super(ChangesetController, self)._before(*args, **kwargs) c.affected_files_cut_off = 60 - def __load_data(self): - repo_model = RepoModel() - c.users_array = repo_model.get_users_js() - def _index(self, revision, method): c.pull_request = None c.anchor_url = anchor_url @@ -413,7 +409,6 @@ response.content_type = 'text/plain' return raw_diff elif method == 'show': - self.__load_data() if len(c.cs_ranges) == 1: return render('changeset/changeset.html') else:
--- a/kallithea/controllers/pullrequests.py Mon Dec 10 22:54:04 2018 +0100 +++ b/kallithea/controllers/pullrequests.py Wed Oct 11 19:37:03 2017 +0200 @@ -450,8 +450,6 @@ @LoginRequired(allow_default_user=True) @HasRepoPermissionLevelDecorator('read') def show(self, repo_name, pull_request_id, extra=None): - repo_model = RepoModel() - c.users_array = repo_model.get_users_js() c.pull_request = PullRequest.get_or_404(pull_request_id) c.allowed_to_change_status = self._is_allowed_to_change_status(c.pull_request) cc_model = ChangesetCommentsModel()
--- a/kallithea/model/repo.py Mon Dec 10 22:54:04 2018 +0100 +++ b/kallithea/model/repo.py Wed Oct 11 19:37:03 2017 +0200 @@ -122,21 +122,6 @@ repos = [x[0] for x in filter(access_check, repos.items())] return Repository.query().filter(Repository.repo_name.in_(repos)) - def get_users_js(self): - users = User.query() \ - .filter(User.active == True) \ - .order_by(User.name, User.lastname) \ - .all() - return [ - { - 'id': u.user_id, - 'fname': h.escape(u.name), - 'lname': h.escape(u.lastname), - 'nname': u.username, - 'gravatar_lnk': h.gravatar_url(u.email, size=28, default='default'), - 'gravatar_size': 14, - } for u in users] - @classmethod def _render_datatable(cls, tmpl, *args, **kwargs): import kallithea
--- a/kallithea/templates/changeset/changeset.html Mon Dec 10 22:54:04 2018 +0100 +++ b/kallithea/templates/changeset/changeset.html Wed Oct 11 19:37:03 2017 +0200 @@ -23,7 +23,6 @@ ${self.breadcrumbs()} </div> <script> - var _USERS_AC_DATA = ${h.js(c.users_array)}; AJAX_COMMENT_URL = ${h.js(url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id))}; AJAX_COMMENT_DELETE_URL = ${h.js(url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__'))}; </script>
--- a/kallithea/templates/pullrequests/pullrequest_show.html Mon Dec 10 22:54:04 2018 +0100 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Wed Oct 11 19:37:03 2017 +0200 @@ -313,7 +313,6 @@ </div> </div> <script> - var _USERS_AC_DATA = ${h.js(c.users_array)}; // TODO: switch this to pyroutes AJAX_COMMENT_URL = ${h.js(url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id))}; AJAX_COMMENT_DELETE_URL = ${h.js(url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__'))};