Changeset - b6eba3ea7af9
[Not reviewed]
default
0 2 0
domruf - 9 years ago 2016-12-22 13:00:54
dominikruf@gmail.com
datatables: use more robust filter function for filtering repository names

This way it does not depend on a class attribute and it is more clear what it
does.
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/model/repo.py
Show inline comments
 
@@ -220,12 +220,13 @@ class RepoModel(BaseModel):
 
                        'repository.admin'
 
                )(repo.repo_name, 'get_repos_as_dict check'):
 
                    continue
 
            cs_cache = repo.changeset_cache
 
            row = {
 
                "raw_name": repo.repo_name,
 
                "just_name": repo.just_name,
 
                "name": repo_lnk(repo.repo_name, repo.repo_type,
 
                                 repo.repo_state, repo.private, repo.fork),
 
                "last_change_iso": repo.last_db_change.isoformat(),
 
                "last_change": last_change(repo.last_db_change),
 
                "last_changeset": last_rev(repo.repo_name, cs_cache),
 
                "last_rev_raw": cs_cache.get('revision'),
kallithea/templates/index_base.html
Show inline comments
 
@@ -86,14 +86,14 @@
 
        var data = ${c.data|n},
 
            $dataTable = $("#repos_list_wrap").DataTable({
 
                data: data.records,
 
                columns: [
 
                    {data: "raw_name", visible: false, searchable: false},
 
                    {title: "${_('Repository')}", data: "name", orderData: 1, render: {
 
                        filter: function(data) {
 
                            return $(data).find(".dt_repo_name").text();
 
                        filter: function(data, type, row, meta) {
 
                            return row.just_name;
 
                        }
 
                    }},
 
                    {data: "desc", title: "${_('Description')}", searchable: false},
 
                    {data: "last_change_iso", visible: false, searchable: false},
 
                    {data: "last_change", title: "${_('Last Change')}", orderData: 4, searchable: false},
 
                    {data: "last_rev_raw", visible: false, searchable: false},
0 comments (0 inline, 0 general)