allow scrolling in some boxes
This commit is contained in:
parent
a641202ffa
commit
18fa9eb714
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -4,3 +4,4 @@ class App(BaseApp):
|
|||
template_name = 'apps/welcome.html'
|
||||
sizex = 2
|
||||
sizey = 2
|
||||
scroll = True
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
|
Reference in New Issue