Author: rjollos
Date: Sun Jun  2 18:27:17 2013
New Revision: 1488759

URL: http://svn.apache.org/r1488759
Log:
Refs #531: Made `id` attribute of doc widget outer div all lower-case. Removed 
unnecessary `py:attrs` directive and passing of `id` argument which can be 
created in the template code from the `title` variable.

Modified:
    bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py
    
bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_doc.html

Modified: bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py?rev=1488759&r1=1488758&r2=1488759&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py (original)
+++ bloodhound/trunk/bloodhound_dashboard/bhdashboard/api.py Sun Jun  2 
18:27:17 2013
@@ -229,7 +229,6 @@ class DashboardSystem(Component):
                 return tag.span(v.__name__, title='in ' + module)
 
         return {
-                'id': "%s-widget" % (spec['urn'],),
                 'title': spec['urn'],
                 'desc': '\n'.join(l.strip()
                                    for l in spec['desc'].splitlines()),

Modified: 
bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_doc.html
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_doc.html?rev=1488759&r1=1488758&r2=1488759&view=diff
==============================================================================
--- 
bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_doc.html
 (original)
+++ 
bloodhound/trunk/bloodhound_dashboard/bhdashboard/widgets/templates/widget_doc.html
 Sun Jun  2 18:27:17 2013
@@ -24,7 +24,7 @@
     py:strip="">
 
   <py:for each="item in items">
-    <h3 py:attrs="{'id': item.get('id')}" 
class="doc-widget-title">${item.title}</h3>
+    <h3 id="${item.title.lower() + '-widget'}" 
class="doc-widget-title">${item.title}</h3>
     <div class="doc-widget-message">
       ${wiki_to_html(context, item.desc)}
       <py:if test="item.sections">


Reply via email to