Skip to content

Commit 22b2955

Browse files
author
jomae
committed
1.7.1dev: merge [17864:17865] from 1.6-stable (fix for #13802)
git-svn-id: http://trac.edgewall.org/intertrac/log:/trunk@17866 af82e41b-90c4-0310-8c96-b1721e28e2e2
2 parents 0515844 + 0814f4a commit 22b2955

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

trac/htdocs/css/diff.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,4 @@ pre.diff .add { background: #dfd; }
218218

219219
/* Styles for the diff page */
220220
.trac-autocomplete-dir { font-weight: bold }
221+
.trac-autocomplete-dir .ui-state-active { font-weight: inherit }

trac/versioncontrol/templates/diff_form.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,18 @@
2323
${ super() }
2424
<script>
2525
jQuery(function($) {
26-
$("#anydiff input[name$='_path']").autocomplete({
27-
source: window.location.pathname
28-
}).each(function() {
29-
$(this).data("ui-autocomplete")._renderItem = function(ul, item) {
30-
return $("<li>")
31-
.data("ui-autocomplete-item", item.value)
32-
.addClass(function() {
33-
return item.isdir ? "trac-autocomplete-dir"
34-
: "trac-autocomplete-file";
35-
})
36-
.append(item.label)
37-
.appendTo(ul);
38-
}
39-
})
26+
var _renderItem = function(ul, item) {
27+
return $("<li>")
28+
.addClass(item.isdir ? "trac-autocomplete-dir"
29+
: "trac-autocomplete-file")
30+
.append($("<div>").append(item.label)) // ui-menu-item-wrapper
31+
.appendTo(ul);
32+
};
33+
$("#anydiff input[name$='_path']")
34+
.autocomplete({source: window.location.pathname})
35+
.each(function() {
36+
$(this).autocomplete("instance")._renderItem = _renderItem;
37+
});
4038
});
4139
</script>
4240
# endblock head

trac/versioncontrol/web_ui/changeset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,8 @@ def kind_order(entry):
11891189
if not reponame:
11901190
entries.extend((True, repos.reponame, '/' + repos.reponame)
11911191
for repos in rm.get_real_repositories()
1192-
if repos.is_viewable(req.perm))
1192+
if repos.reponame and
1193+
repos.is_viewable(req.perm))
11931194

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

0 commit comments

Comments
 (0)