git://git.onelab.eu
/
unfold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
19a0ef3
)
how to tweak e.g. a given plugin's background color
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Wed, 20 Mar 2013 10:01:37 +0000
(11:01 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Wed, 20 Mar 2013 10:01:37 +0000
(11:01 +0100)
plugins/stack/stack.html
patch
|
blob
|
history
plugins/stack/stack.py
patch
|
blob
|
history
trash/css/dashboard.css
patch
|
blob
|
history
trash/dashboard.py
patch
|
blob
|
history
unfold/plugin.py
patch
|
blob
|
history
unfold/templates/plugin.html
patch
|
blob
|
history
diff --git
a/plugins/stack/stack.html
b/plugins/stack/stack.html
index
f765cd1
..
00863e4
100644
(file)
--- a/
plugins/stack/stack.html
+++ b/
plugins/stack/stack.html
@@
-1,7
+1,7
@@
<div id='div-{{ domid }}'>
{% for son in sons %}
{#<h3>{{ son.title }}</h3>#}
<div id='div-{{ domid }}'>
{% for son in sons %}
{#<h3>{{ son.title }}</h3>#}
-<div id='
tab
-{{ son.domid }}'>
+<div id='
stack
-{{ son.domid }}'>
{{ son.rendered }}
</div>
{% endfor %}
{{ son.rendered }}
</div>
{% endfor %}
diff --git
a/plugins/stack/stack.py
b/plugins/stack/stack.py
index
3ccfa54
..
c8ddbea
100644
(file)
--- a/
plugins/stack/stack.py
+++ b/
plugins/stack/stack.py
@@
-5,3
+5,7
@@
from unfold.composite import Composite
class Stack (Composite) :
def template_file (self): return "stack.html"
class Stack (Composite) :
def template_file (self): return "stack.html"
+ def template_env (self, request):
+ env = Composite.template_env (self, request)
+ env['domid'] = self.domid
+ return env
diff --git
a/trash/css/dashboard.css
b/trash/css/dashboard.css
index
598d944
..
3bd686b
100644
(file)
--- a/
trash/css/dashboard.css
+++ b/
trash/css/dashboard.css
@@
-1,3
+1,7
@@
div#sidelist table.with-datatables {
font-size: 130%;
}
div#sidelist table.with-datatables {
font-size: 130%;
}
+# demo to show how to tweak a given section by setting its domid
+#complete-quickfilter {
+ background-color: #f080f0;
+}
diff --git
a/trash/dashboard.py
b/trash/dashboard.py
index
74493af
..
719210c
100644
(file)
--- a/
trash/dashboard.py
+++ b/
trash/dashboard.py
@@
-47,6
+47,7
@@
def dashboard_view (request):
toggled=False,
),
QuickFilter (
toggled=False,
),
QuickFilter (
+ domid='quickfilter',
page=page,
title='play with filters',
criterias=quickfilter_criterias,
page=page,
title='play with filters',
criterias=quickfilter_criterias,
diff --git
a/unfold/plugin.py
b/unfold/plugin.py
index
7ae4745
..
e56690b
100644
(file)
--- a/
unfold/plugin.py
+++ b/
unfold/plugin.py
@@
-16,8
+16,8
@@
from unfold.prelude import Prelude
# . True : to debug all plugin
DEBUG= False
# . True : to debug all plugin
DEBUG= False
-DEBUG= [ 'SimpleList' ]
-DEBUG=True
+
#
DEBUG= [ 'SimpleList' ]
+
#
DEBUG=True
# decorator to deflect calls on Plugin to its Prelude through self.page.prelude
def to_prelude (method):
# decorator to deflect calls on Plugin to its Prelude through self.page.prelude
def to_prelude (method):
diff --git
a/unfold/templates/plugin.html
b/unfold/templates/plugin.html
index
c77ad6f
..
56ec166
100644
(file)
--- a/
unfold/templates/plugin.html
+++ b/
unfold/templates/plugin.html
@@
-1,6
+1,6
@@
{#<!--begin {{ classname }}{{ domid }}-->#}
{% if visible %}
{#<!--begin {{ classname }}{{ domid }}-->#}
{% if visible %}
-<div class='plugin-toggle{% if need_spin %} need-spin{% endif %}' id='
toggl
e-{{ domid }}'>
+<div class='plugin-toggle{% if need_spin %} need-spin{% endif %}' id='
complet
e-{{ domid }}'>
{% if togglable %}
<h4 id='show-{{ domid }}' class='plugin-show'{% if toggled %} style='display:none;'{% endif %}><i class="icon-hand-right"></i>
<a href='#' class='plugin-tooltip' data-toggle='tooltip' data-original-title='Show plugin "{{ title }}" ({{ classname }})'>{{ title }}</a></h4>
{% if togglable %}
<h4 id='show-{{ domid }}' class='plugin-show'{% if toggled %} style='display:none;'{% endif %}><i class="icon-hand-right"></i>
<a href='#' class='plugin-tooltip' data-toggle='tooltip' data-original-title='Show plugin "{{ title }}" ({{ classname }})'>{{ title }}</a></h4>