Skip to content

Commit

Permalink
1.7.1dev: merge [17864:17865] from 1.6-stable (fix for #13802)
Browse files Browse the repository at this point in the history
git-svn-id: http://trac.edgewall.org/intertrac/log:/trunk@17866 af82e41b-90c4-0310-8c96-b1721e28e2e2
  • Loading branch information
jomae committed Oct 28, 2024
2 parents 0515844 + 0814f4a commit 22b2955
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions trac/htdocs/css/diff.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,4 @@ pre.diff .add { background: #dfd; }

/* Styles for the diff page */
.trac-autocomplete-dir { font-weight: bold }
.trac-autocomplete-dir .ui-state-active { font-weight: inherit }
26 changes: 12 additions & 14 deletions trac/versioncontrol/templates/diff_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,18 @@
${ super() }
<script>
jQuery(function($) {
$("#anydiff input[name$='_path']").autocomplete({
source: window.location.pathname
}).each(function() {
$(this).data("ui-autocomplete")._renderItem = function(ul, item) {
return $("<li>")
.data("ui-autocomplete-item", item.value)
.addClass(function() {
return item.isdir ? "trac-autocomplete-dir"
: "trac-autocomplete-file";
})
.append(item.label)
.appendTo(ul);
}
})
var _renderItem = function(ul, item) {
return $("<li>")
.addClass(item.isdir ? "trac-autocomplete-dir"
: "trac-autocomplete-file")
.append($("<div>").append(item.label)) // ui-menu-item-wrapper
.appendTo(ul);
};
$("#anydiff input[name$='_path']")
.autocomplete({source: window.location.pathname})
.each(function() {
$(this).autocomplete("instance")._renderItem = _renderItem;
});
});
</script>
# endblock head
Expand Down
3 changes: 2 additions & 1 deletion trac/versioncontrol/web_ui/changeset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,8 @@ def kind_order(entry):
if not reponame:
entries.extend((True, repos.reponame, '/' + repos.reponame)
for repos in rm.get_real_repositories()
if repos.is_viewable(req.perm))
if repos.reponame and
repos.is_viewable(req.perm))

paths = [{'label': path + ('/' if isdir else ''), 'value': path,
'isdir': isdir}
Expand Down

0 comments on commit 22b2955

Please sign in to comment.