You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/05/17 17:12:11 UTC

svn commit: r1339633 - in /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard: htdocs/timeline.css widgets/timeline.py

Author: gjm
Date: Thu May 17 15:12:10 2012
New Revision: 1339633

URL: http://svn.apache.org/viewvc?rev=1339633&view=rev
Log:
dashboard: limiting the scope of timeline css - #64 (from olemis)

Added:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/timeline.css   (with props)
Modified:
    incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py

Added: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/timeline.css
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/timeline.css?rev=1339633&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/timeline.css (added)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/timeline.css Thu May 17 15:12:10 2012
@@ -0,0 +1,103 @@
+/* Timeline */
+
+* html .timeline #prefs { width: 34em } /* Set width only for IE */
+.timeline #prefs fieldset label { display: block }
+.timeline #prefs .buttons { margin-top: -1.6em }
+
+.timeline h2 {
+ background: #f7f7f7;
+ border-bottom: 1px solid #d7d7d7;
+ font-size: 105%;
+ margin: 2em 0 .5em;
+}
+.timeline dl {
+ line-height: 1.3em;
+ margin-left: 1em;
+}
+.timeline dl.unread { 
+ margin-left: 0.38em;
+ border-left: 0.31em solid #c0f0c0;
+ padding-left: 0.31em;
+}
+
+.timeline dt { background: 3px 4px no-repeat; padding: 0 }
+.timeline dt :link, .timeline dt :visited {
+ background: 3px 3px no-repeat;
+ border: none;
+ color: #000;
+ padding: 0 4px 2px 22px;
+}
+.timeline dt>:link, .timeline dt>:visited {
+ /* Hide from IE/Win */
+ background-position: 3px 4px;
+}
+.timeline dt :link:hover, .timeline dt :visited:hover { background-color: #eed; color: #000 }
+.timeline dt em {
+ border-bottom: 1px dotted #bbb;
+ color: #b00;
+ font-style: normal;
+ text-decoration: none;
+}
+.timeline dt .time { color: #999; font-size: 80%; }
+.timeline dt .author { color: #666; }
+.timeline dt.highlight { background-color: #ffa; } 
+.timeline dd { 
+ font-size: 80%;
+ margin: 0 0 .75em 5.8em;
+ padding: 0;
+ color: #776;
+}
+
+/* Apply icon background-image twice to avoid hover-flicker in IE/Win */
+.timeline dt.changeset, .timeline dt.changeset a { background-image: url(../changeset.png) !important }
+.timeline dt.newticket, .timeline dt.newticket a { background-image: url(../newticket.png) !important }
+.timeline dt.reopenedticket, .timeline dt.reopenedticket a { background-image: url(../newticket.png) !important }
+.timeline dt.editedticket, .timeline dt.editedticket a { background-image: url(../editedticket.png) !important }
+.timeline dt.closedticket, .timeline dt.closedticket a { background-image: url(../closedticket.png) !important }
+.timeline dt.batchmodify, .timeline dt.batchmodify a { background-image: url(../batchmodify.png) !important }
+.timeline dt.wiki, .timeline dt.wiki a { background-image: url(../wiki.png) !important }
+.timeline dt.milestone, .timeline dt.milestone a { background-image: url(../milestone.png) !important }
+.timeline dt.attachment, .timeline dt.attachment a { background-image: url(../attachment.png) !important }
+
+/* styles for the 'changeset_long_messages' option */
+.timeline dd.changeset p { margin: 0; padding: 0 }
+.timeline dd.changeset ul { padding-left: 15px; }
+
+/* Styles for the 'changeset_show_files' option */
+.timeline dd.changeset .changes { color: #aaa; font-size: 90%; }
+.timeline dd.changeset ul.changes { 
+ padding-left: 0;
+ list-style-type: none;
+}
+.timeline dd.changeset .changes li div {
+ border: 1px solid #999;
+ float: left;
+ margin: .5em .5em 0 0;
+ overflow: hidden;
+ width: .8em; height: .8em;
+}
+.timeline dd.changeset .changes li span { 
+ float: left;
+ margin-right: .8em;
+}
+.timeline dd.changeset .changes .add     { background: #bfb }
+.timeline dd.changeset .changes .delete  { background: #f88 }
+.timeline dd.changeset .changes .edit    { background: #fd8 }
+.timeline dd.changeset .changes .copy    { background: #88f }
+.timeline dd.changeset .changes .move    { background: #ccc }
+.timeline dt.changeset .branch, .timeline dt.changeset .tag {
+ color: #777;
+ font-size: 80%;
+ background: #f6f6f6;
+ border: 1px solid #ddd;
+ margin: 0 0 0 .5em;
+ padding: 0 .2em;
+}
+.timeline dt.changeset .head {
+ background: #d0ffd0;
+ border: 1px solid #9d9;
+}
+.timeline dt.changeset .tag {
+ background: #ffa;
+ border: 1px solid #fe0;
+}

Propchange: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/timeline.css
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/timeline.css
------------------------------------------------------------------------------
    svn:mime-type = text/css

Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py?rev=1339633&r1=1339632&r2=1339633&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/timeline.py Thu May 17 15:12:10 2012
@@ -32,6 +32,7 @@ from trac.core import implements, TracEr
 from trac.config import IntOption
 from trac.timeline.web_ui import TimelineModule
 from trac.util.translation import _
+from trac.web.chrome import add_stylesheet
 
 from bhdashboard.api import DateField, EnumField, ListField
 from bhdashboard.util import WidgetBase, InvalidIdentifier, \
@@ -110,7 +111,8 @@ class TimelineWidget(WidgetBase):
                 exc.title = data.get('title', 'TracReports')
             raise
         else:
-            merge_links(srcreq=fakereq, dstreq=req)
+            merge_links(srcreq=fakereq, dstreq=req, exclude=["stylesheet"])
+            add_stylesheet(req, 'dashboard/timeline.css')
             data['today'] = today = datetime.now(req.tz)
             data['yesterday'] = today - timedelta(days=1)
             return 'widget_timeline.html', \