allow scrolling in some boxes

This commit is contained in:
Frédéric Péters 2013-03-15 09:43:29 +01:00
parent a641202ffa
commit 18fa9eb714
5 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,7 @@ class BaseApp(object):
sizey = 1
template_name = None
background_color = None
scroll = False
def __init__(self, app_id, row=1, col=1, background_color=None):
self.app_id = app_id

View File

@ -5,6 +5,7 @@ class App(BaseApp):
template_name = 'apps/feed.html'
sizex = 2
sizey = 2
scroll = True
def __init__(self, app_id, feed_url='#', **kwargs):
super(App, self).__init__(app_id, **kwargs)

View File

@ -4,3 +4,4 @@ class App(BaseApp):
template_name = 'apps/welcome.html'
sizex = 2
sizey = 2
scroll = True

View File

@ -34,6 +34,10 @@ div.gridster > ul > li {
box-shadow: 0 0 5px black;
}
div.gridster > ul > li.scroll {
overflow-y: auto;
}
div.rssHeader {
text-align: center;
}
@ -102,7 +106,6 @@ ul li h2 {
/* rss */
.feed {
padding: 10px;
overflow: scroll;
}
div.rssHeader a {

View File

@ -23,6 +23,7 @@ Univcloud
{% for app in apps %}
<li data-row="{{ app.row }}" data-col="{{ app.col }}"
data-sizex="{{ app.sizex }}" data-sizey="{{ app.sizey }}"
class="{% if app.scroll %}scroll {% endif %}"
{% if app.background_color %}style="background-color: {{app.background_color}}"{% endif %}>
<span class="color">o</span>
<span class="close">×</span>