# HG changeset patch # User domruf # Date 2016-12-22 13:00:54 # Node ID b6eba3ea7af99faa530f6942ef24ed0424d4bf18 # Parent 94a9ce213964dad1704fc2869ee1ac5b38b35906 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. diff --git a/kallithea/model/repo.py b/kallithea/model/repo.py --- a/kallithea/model/repo.py +++ b/kallithea/model/repo.py @@ -223,6 +223,7 @@ class RepoModel(BaseModel): 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(), diff --git a/kallithea/templates/index_base.html b/kallithea/templates/index_base.html --- a/kallithea/templates/index_base.html +++ b/kallithea/templates/index_base.html @@ -89,8 +89,8 @@ 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},