how to tweak e.g. a given plugin's background color
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 20 Mar 2013 10:01:37 +0000 (11:01 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 20 Mar 2013 10:01:37 +0000 (11:01 +0100)
plugins/stack/stack.html
plugins/stack/stack.py
trash/css/dashboard.css
trash/dashboard.py
unfold/plugin.py
unfold/templates/plugin.html

index f765cd1..00863e4 100644 (file)
@@ -1,7 +1,7 @@
 <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 %}
index 3ccfa54..c8ddbea 100644 (file)
@@ -5,3 +5,7 @@ from unfold.composite import Composite
 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
index 598d944..3bd686b 100644 (file)
@@ -1,3 +1,7 @@
 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;
+}
index 74493af..719210c 100644 (file)
@@ -47,6 +47,7 @@ def dashboard_view (request):
                 toggled=False,
                 ),
             QuickFilter (
+                domid='quickfilter',
                 page=page,
                 title='play with filters',
                 criterias=quickfilter_criterias,
index 7ae4745..e56690b 100644 (file)
@@ -16,8 +16,8 @@ from unfold.prelude import Prelude
 # . 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):
index c77ad6f..56ec166 100644 (file)
@@ -1,6 +1,6 @@
 {#<!--begin {{ classname }}{{ domid }}-->#}
 {% if visible %}
-<div class='plugin-toggle{% if need_spin %} need-spin{% endif %}' id='toggle-{{ domid }}'>
+<div class='plugin-toggle{% if need_spin %} need-spin{% endif %}' id='complete-{{ 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>