Ticket #3132: t3132.diff
| File t3132.diff, 3.6 KB (added by Tim Hatch <trac@…>, 5 years ago) |
|---|
-
htdocs/css/timeline.css
16 16 background: 3px 3px no-repeat; 17 17 border: none; 18 18 color: #000; 19 padding: 0 4px 2px22px;19 padding: 0 4px 0 22px; 20 20 } 21 dt>:link, dt>:visited { 22 /* Hide from IE/Win */ 23 background-position: 3px 4px; 24 display: block; 25 } 21 dt:hover { background-color: #eed; } 22 26 23 dt :link:hover, dt :visited:hover { background-color: #eed; color: #000 } 27 24 dt em { 28 25 border-bottom: 1px dotted #bbb; … … 39 36 } 40 37 41 38 /* Apply icon background-image twice to avoid hover-flicker in IE/Win */ 42 dt.changeset , dt.changeseta { background-image: url(../changeset.png) !important }43 dt.newticket , dt.newticketa { background-image: url(../newticket.png) !important }44 dt.editedticket , dt.editedticketa { background-image: url(../editedticket.png) !important }45 dt.closedticket , dt.closedticketa { background-image: url(../closedticket.png) !important }46 dt.wiki , dt.wikia { background-image: url(../wiki.png) !important }47 dt.milestone , dt.milestonea { background-image: url(../milestone.png) !important }48 dt.attachment , dt.attachmenta { background-image: url(../attachment.png) !important }39 dt.changeset a { background-image: url(../changeset.png) !important } 40 dt.newticket a { background-image: url(../newticket.png) !important } 41 dt.editedticket a { background-image: url(../editedticket.png) !important } 42 dt.closedticket a { background-image: url(../closedticket.png) !important } 43 dt.wiki a { background-image: url(../wiki.png) !important } 44 dt.milestone a { background-image: url(../milestone.png) !important } 45 dt.attachment a { background-image: url(../attachment.png) !important } 49 46 50 47 /* styles for the 'changeset_long_messages' option */ 51 48 dd.changeset p { margin: 0; padding: 0 } -
trac/web/api.py
22 22 import os 23 23 from StringIO import StringIO 24 24 import sys 25 from time import time 25 26 import urlparse 26 27 27 28 from trac.core import Interface … … 346 347 self.write(data) 347 348 raise RequestDone 348 349 349 def send_file(self, path, mimetype=None ):350 def send_file(self, path, mimetype=None, expires=None): 350 351 """Send a local file to the browser. 351 352 352 353 This method includes the "Last-Modified", "Content-Type" and … … 374 375 self.send_header('Content-Type', mimetype) 375 376 self.send_header('Content-Length', stat.st_size) 376 377 self.send_header('Last-Modified', last_modified) 378 if expires: 379 exp = datetime.fromtimestamp(time()+expires, localtz) 380 self.send_header('Expires', http_date(exp)) 377 381 self.end_headers() 378 382 379 383 if self.method != 'HEAD': -
trac/web/chrome.py
276 276 path = os.path.normpath(os.path.join(dir, filename)) 277 277 assert os.path.commonprefix([dir, path]) == dir 278 278 if os.path.isfile(path): 279 req.send_file(path, mimeview.get_mimetype(path)) 279 req.send_file(path, mimeview.get_mimetype(path), 280 path[:-4] in ('.png', '.gif', '.jpg') and 281 2592000 or None) 280 282 281 283 self.log.warning('File %s not found in any of %s', filename, dirs) 282 284 raise HTTPNotFound('File %s not found', filename)
