Changeset 60 for branches/trac.upstream-r6735
- Timestamp:
- 03/20/08 13:47:26 (10 months ago)
- Files:
-
- branches/trac.upstream-r6735/trac/admin/console.py (modified) (1 diff)
- branches/trac.upstream-r6735/trac/htdocs/js/keyboard_nav.js (modified) (2 diffs)
- branches/trac.upstream-r6735/trac/templates/layout.html (modified) (1 diff)
- branches/trac.upstream-r6735/trac/templates/theme.html (modified) (1 diff)
- branches/trac.upstream-r6735/trac/ticket/admin.py (modified) (10 diffs)
- branches/trac.upstream-r6735/trac/ticket/templates/milestone_view.html (modified) (1 diff)
- branches/trac.upstream-r6735/trac/versioncontrol/web_ui/browser.py (modified) (2 diffs)
- branches/trac.upstream-r6735/trac/web/chrome.py (modified) (1 diff)
- branches/trac.upstream-r6735/trac/web/main.py (modified) (1 diff)
- branches/trac.upstream-r6735/trac/web/standalone.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/trac.upstream-r6735/trac/admin/console.py
r52 r60 1174 1174 source = os.path.normpath(root) 1175 1175 print ' ', source 1176 dest = os.path.join(target, key)1177 copytree(source, dest)1178 1176 if os.path.exists(source): 1177 dest = os.path.join(target, key) 1178 copytree(source, dest) 1179 1179 1180 1180 branches/trac.upstream-r6735/trac/htdocs/js/keyboard_nav.js
r55 r60 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); branches/trac.upstream-r6735/trac/templates/layout.html
r55 r60 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="site.html"><xi:fallback /></xi:include> 63 64 56 </html> branches/trac.upstream-r6735/trac/templates/theme.html
r55 r60 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=""> branches/trac.upstream-r6735/trac/ticket/admin.py
r52 r60 24 24 25 25 26 class TicketAdminPa ge(Component):26 class TicketAdminPanel(Component): 27 27 28 28 implements(IAdminPanelProvider) … … 45 45 46 46 47 class ComponentAdminPa ge(TicketAdminPage):47 class ComponentAdminPanel(TicketAdminPanel): 48 48 49 49 _type = 'components' 50 50 _label = ('Component', 'Components') 51 51 52 # TicketAdminPa gemethods52 # TicketAdminPanel methods 53 53 54 54 def _render_admin_panel(self, req, cat, page, component): … … 122 122 123 123 124 class MilestoneAdminPa ge(TicketAdminPage):124 class MilestoneAdminPanel(TicketAdminPanel): 125 125 126 126 _type = 'milestones' 127 127 _label = ('Milestone', 'Milestones') 128 128 129 # TicketAdminPa gemethods129 # TicketAdminPanel methods 130 130 131 131 def _render_admin_panel(self, req, cat, page, milestone): … … 204 204 205 205 206 class VersionAdminPa ge(TicketAdminPage):206 class VersionAdminPanel(TicketAdminPanel): 207 207 208 208 _type = 'versions' 209 209 _label = ('Version', 'Versions') 210 210 211 # TicketAdminPa gemethods211 # TicketAdminPanel methods 212 212 213 213 def _render_admin_panel(self, req, cat, page, version): … … 276 276 277 277 278 class AbstractEnumAdminPa ge(TicketAdminPage):278 class AbstractEnumAdminPanel(TicketAdminPanel): 279 279 implements(IAdminPanelProvider) 280 280 abstract = True … … 284 284 _label = ('(Undefined)', '(Undefined)') 285 285 286 # TicketAdminPa gemethods286 # TicketAdminPanel methods 287 287 288 288 def _render_admin_panel(self, req, cat, page, path_info): … … 362 362 363 363 364 class PriorityAdminPa ge(AbstractEnumAdminPage):364 class PriorityAdminPanel(AbstractEnumAdminPanel): 365 365 _type = 'priority' 366 366 _enum_cls = model.Priority … … 368 368 369 369 370 class ResolutionAdminPa ge(AbstractEnumAdminPage):370 class ResolutionAdminPanel(AbstractEnumAdminPanel): 371 371 _type = 'resolution' 372 372 _enum_cls = model.Resolution … … 374 374 375 375 376 class SeverityAdminPa ge(AbstractEnumAdminPage):376 class SeverityAdminPanel(AbstractEnumAdminPanel): 377 377 _type = 'severity' 378 378 _enum_cls = model.Severity … … 380 380 381 381 382 class TicketTypeAdminPa ge(AbstractEnumAdminPage):382 class TicketTypeAdminPanel(AbstractEnumAdminPanel): 383 383 _type = 'type' 384 384 _enum_cls = model.Type branches/trac.upstream-r6735/trac/ticket/templates/milestone_view.html
r46 r60 55 55 <table summary="Shows the milestone completion status grouped by ${grouped_by}"> 56 56 <tr py:for="group in groups"> 57 <th scope="row"><a href="${group.stats_href}">${group.name}</a></th> 57 <th scope="row" py:choose=""> 58 <i py:when="not group.name"><a href="${group.stats_href}">(none)</a></i> 59 <a py:otherwise="" href="${group.stats_href}">${group.name}</a> 60 </th> 58 61 <td> 59 62 ${progress_bar(group.stats, group.interval_hrefs, branches/trac.upstream-r6735/trac/versioncontrol/web_ui/browser.py
r55 r60 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)) … … 528 528 if 'annotate' in req.args: 529 529 force_source = True 530 annotations.insert(0, 'blame')530 annotations.insert(0, req.args['annotate']) 531 531 preview_data = mimeview.preview_data(context, node.get_content(), 532 532 node.get_content_length(), branches/trac.upstream-r6735/trac/web/chrome.py
r55 r60 334 334 fileobj.write("""<html xmlns="http://www.w3.org/1999/xhtml" 335 335 xmlns:py="http://genshi.edgewall.org/" py:strip=""> 336 <!-- Custom match templates go here -->336 <!--! Custom match templates go here --> 337 337 </html>""") 338 338 finally: branches/trac.upstream-r6735/trac/web/main.py
r55 r60 533 533 req.display(template) 534 534 535 markuptemplate = TemplateLoader(loadpaths).load(template) 536 stream = markuptemplate.generate(**data) 535 loader = TemplateLoader(loadpaths, variable_lookup='lenient') 536 tmpl = loader.load(template) 537 stream = tmpl.generate(**data) 537 538 output = stream.render('xhtml', doctype=DocType.XHTML_STRICT) 538 539 req.send(output, 'text/html') branches/trac.upstream-r6735/trac/web/standalone.py
r52 r60 153 153 parser.add_option('--base-path', action='store', type='string', # XXX call this url_base_path? 154 154 dest='base_path', 155 help=' base path')155 help='the initial portion of the request URL\'s "path"') 156 156 157 157 parser.add_option('-r', '--auto-reload', action='store_true',