Changeset 82
- Timestamp:
- 05/01/08 21:36:34 (5 months ago)
- Files:
-
- trunk/trac/trac/htdocs/js/keyboard_nav.js (modified) (2 diffs)
- trunk/trac/trac/templates/layout.html (modified) (1 diff)
- trunk/trac/trac/templates/theme.html (modified) (1 diff)
- trunk/trac/trac/versioncontrol/web_ui/browser.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/trac/trac/htdocs/js/keyboard_nav.js
r81 r82 1 1 (function($){ 2 2 var SELECTED_FILE_ELEM = null; 3 var ENABLE_KEY_NAV = true; 3 4 4 5 $(document).keydown(function(event) { 6 if (!ENABLE_KEY_NAV) 7 return true; 5 8 var selection = SELECTED_FILE_ELEM; 6 9 switch (event.keyCode) { … … 46 49 return false; 47 50 }); 51 52 $(function() { 53 $('a,input,select,textarea,button') 54 .focus(function(event) { 55 ENABLE_KEY_NAV = false; 56 }) 57 .blur(function(event) { 58 ENABLE_KEY_NAV = true; 59 }); 60 }); 48 61 })(jQuery); trunk/trac/trac/templates/layout.html
r81 r82 29 29 </head></py:match> 30 30 31 <div py:def="navigation(category)" id="${category}" class="nav">32 <ul py:if="chrome.nav[category]">33 <li py:for="idx, item in enumerate(chrome.nav[category])"34 class="${classes(first_last(idx, chrome.nav[category]), active=item.active)}">${item.label}</li>35 </ul>36 </div>37 38 31 <py:match path="body" once="true"><body> 39 32 ${select('*|text()')} 40 41 <script type="text/javascript" py:if="chrome.late_links">42 <py:for each="link in chrome.late_links.get('stylesheet')">43 jQuery.loadStyleSheet("${link.href}", "${link.title}");44 </py:for>45 </script>46 <script py:for="script in chrome.late_scripts"47 type="${script.type}" src="${script.href}"></script>48 33 49 <div id="altlinks" py:if="'alternate' in chrome.links"> 50 <h3>Download in other formats:</h3> 51 <ul> 52 <li py:for="idx, link in enumerate(chrome.links.alternate)" 53 class="${first_last(idx, chrome.links.alternate)}"> 54 <a rel="nofollow" href="${link.href}" class="${link['class']}" 55 py:content="link.title" /> 56 </li> 57 </ul> 58 </div> 59 </body></py:match> 60 34 <script type="text/javascript" py:if="chrome.late_links"> 35 <py:for each="link in chrome.late_links.get('stylesheet')"> 36 jQuery.loadStyleSheet("${link.href}", "${link.title}"); 37 </py:for> 38 </script> 39 <script py:for="script in chrome.late_scripts" 40 type="${script.type}" src="${script.href}"></script> 41 42 <div id="altlinks" py:if="'alternate' in chrome.links"> 43 <h3>Download in other formats:</h3> 44 <ul> 45 <li py:for="idx, link in enumerate(chrome.links.alternate)" 46 class="${first_last(idx, chrome.links.alternate)}"> 47 <a rel="nofollow" href="${link.href}" class="${link['class']}" 48 py:content="link.title" /> 49 </li> 50 </ul> 51 </div> 52 </body></py:match> 53 61 54 <xi:include href="$chrome.theme"><xi:fallback /></xi:include> 62 55 <xi:include href="$chrome.theme"><xi:fallback /></xi:include> trunk/trac/trac/templates/theme.html
r81 r82 6 6 xmlns:py="http://genshi.edgewall.org/" 7 7 py:strip=""> 8 <py:match path="body" once="true"><body> 8 9 <div py:def="navigation(category)" id="${category}" class="nav"> 10 <ul py:if="chrome.nav[category]"> 11 <li py:for="idx, item in enumerate(chrome.nav[category])" 12 class="${classes(first_last(idx, chrome.nav[category]), active=item.active)}">${item.label}</li> 13 </ul> 14 </div> 15 16 <py:match path="body" once="true" buffer="false"><body> 9 17 <div id="banner"> 10 18 <div id="header" py:choose=""> trunk/trac/trac/versioncontrol/web_ui/browser.py
r81 r82 386 386 href=req.href.browser(node.created_path, 387 387 rev=node.rev, 388 annotate= 1))388 annotate='blame')) 389 389 add_ctxtnav(req, _('Revision Log'), 390 390 href=req.href.log(path, rev=rev))