minor CSS improvements; suppress listing of old events

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2423 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-03-03 08:54:36 +00:00
parent 8660f12f5e
commit a1de35aeb3
3 changed files with 24 additions and 11 deletions

View file

@ -412,8 +412,8 @@ class BaseView(GenericView, I18NView):
cm.register('js-execute', jsCall, jsCall=jsCall) cm.register('js-execute', jsCall, jsCall=jsCall)
cm.register('css', identifier='tundra.css', position=0, cm.register('css', identifier='tundra.css', position=0,
resourceName='ajax.dojo/dijit/themes/tundra/tundra.css', media='all') resourceName='ajax.dojo/dijit/themes/tundra/tundra.css', media='all')
cm.register('css', identifier='dojo.css', position=1, #cm.register('css', identifier='dojo.css', position=1,
resourceName='ajax.dojo/dojo/resources/dojo.css', media='all') # resourceName='ajax.dojo/dojo/resources/dojo.css', media='all')
def registerDojoDateWidget(self): def registerDojoDateWidget(self):
self.registerDojo() self.registerDojo()

View file

@ -5,12 +5,15 @@
*/ */
/* general */
a[href]:hover { a[href]:hover {
text-decoration: none; text-decoration: none;
color: #803000; color: #803000;
} }
pre { pre {
font-size: 100%;
background-color: #f4f4f4; background-color: #f4f4f4;
overflow: scroll; overflow: scroll;
max-height: 35em; max-height: 35em;
@ -21,6 +24,12 @@ ul, p {
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
ol li, ul li {
line-height: 1.5em;
}
/* class-specific */
table.listing td { table.listing td {
white-space: normal; white-space: normal;
} }
@ -63,31 +72,30 @@ fieldset.box td {
} }
.content-1 h1, h1 { .content-1 h1, h1 {
font-size: 160%; font-size: 180%;
margin-top: 0.8em; margin-top: 0.8em;
padding-bottom: 3px;
} }
.content-2 h1, .content-1 h2, h2 { .content-2 h1, .content-1 h2, h2 {
font-size: 140%; font-size: 160%;
font-weight: normal; font-weight: normal;
margin-top: 0.7em; margin-top: 0.7em;
} }
.content-3 h1, .content-2 h2, .content-1 h3, h3 { .content-3 h1, .content-2 h2, .content-1 h3, h3 {
font-size: 130%; font-size: 145%;
font-weight: normal; font-weight: normal;
margin-top: 0.7em; margin-top: 0.7em;
} }
.content-4 h1, .content-3 h2, .content-2 h3, .content-1 h4, h4 { .content-4 h1, .content-3 h2, .content-2 h3, .content-1 h4, h4 {
font-size: 120%; font-size: 125%;
font-weight: normal; font-weight: normal;
margin-top: 0.7em; margin-top: 0.7em;
} }
.content-5 h1, .content-4 h2, .content-3 h3, content-2 h4 { .content-5 h1, .content-4 h2, .content-3 h3, content-2 h4 {
font-size: 100%; font-size: 110%;
border: none; border: none;
margin-top: 0.7em; margin-top: 0.7em;
} }

View file

@ -22,6 +22,7 @@ Definition of view classes and other browser related stuff for tasks.
$Id$ $Id$
""" """
from datetime import datetime
from zope import interface, component from zope import interface, component
from zope.app.pagetemplate import ViewPageTemplateFile from zope.app.pagetemplate import ViewPageTemplateFile
from zope.cachedescriptors.property import Lazy from zope.cachedescriptors.property import Lazy
@ -59,7 +60,11 @@ class Events(ConceptView):
cm = self.loopsRoot.getConceptManager() cm = self.loopsRoot.getConceptManager()
tEvent = cm['event'] tEvent = cm['event']
hasType = cm.getTypePredicate() hasType = cm.getTypePredicate()
sort = lambda x: adapted(x.second).start sort = lambda x: x.adapted.start
for r in tEvent.getChildRelations([hasType], sort=sort): now = datetime.today()
yield self.childViewFactory(r, self.request, contextIsSecond=True) relViews = (self.childViewFactory(r, self.request, contextIsSecond=True)
for r in tEvent.getChildRelations([hasType], sort=None))
return sorted((rv for rv in relViews
if not rv.adapted.end or rv.adapted.end >= now),
key=sort)