File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments