[Cvs-annodex] commit (annodex): cmmlwiki/trunk/cmmlwiki/clipsummary.py cmmlwiki/trunk/cmmlwiki/handler.py

conrad nobody at lists.annodex.net
Tue Sep 12 08:05:24 UTC 2006


Update of /var/local/lib/svn/annodex (new revision 2466)

Modified files:
   cmmlwiki/trunk/cmmlwiki/clipsummary.py
   cmmlwiki/trunk/cmmlwiki/handler.py

Log Message:
fix bug in rendering clips without desc (was skipping trailing </div>)


Modified: cmmlwiki/trunk/cmmlwiki/clipsummary.py
===================================================================
--- cmmlwiki/trunk/cmmlwiki/clipsummary.py	2006-09-12 07:45:39 UTC (rev 2465)
+++ cmmlwiki/trunk/cmmlwiki/clipsummary.py	2006-09-12 08:05:24 UTC (rev 2466)
@@ -74,7 +74,7 @@
     for row in self.inspector.cur.fetchall():
 
         divid='clip-%d-%s' % (self.ixc, xmlescape(row['ixc']))
-        s += '<div id="%s" class="block-clips">' % divid
+        s += '\n<div id="%s" class="block-clips">\n' % divid
 
         start_time = time2npt (row['start_time'])
         play_url = WikiURL(self.name, type='media').template(vars)
@@ -93,7 +93,7 @@
             
         if (self.editable and key_isprintable (row, 'ixc')):
             url = WikiURL('Edit:Clip/%s?ixc=%s' % (self.name, row['ixc'])).template(vars)
-            s += '<li><a href="%s">edit</a> |' % (url)
+            s += '<li><a href="%s">edit</a> |</li>' % (url)
 
             url = WikiURL('Edit:DeleteClip/%s?ixc=%s' % (self.name, row['ixc'])).template(vars)
             s += '<li><a href="%s">delete</a> |</li>' % (url)
@@ -111,7 +111,7 @@
             s += '<a href="%s?id=%s"><h2 class="bold">%s</h2></a>\n' % (w, row_id, row_id)
         if (key_isprintable (row, 'start_time')):
             w = WikiURL(self.name).template(vars)
-            s += '<p class="time"><a href="%s?t=%s">%s</a></p>\n' % (w, start_time, start_time)
+            s += '<p class="time"><a href="%s?t=%s">%s</a></p>' % (w, start_time, start_time)
 #        s += '</div></div>\n'
 
         if (key_isprintable (row, 'a_href')):
@@ -126,12 +126,10 @@
 """ % (a_href, link_summary)
 
         if (key_isprintable (row, 'desc')):
-            s += """
-<p>%20s</p>
-</div>
+            s += """<p>%20s</p>
 """ % (field_summary(xmlescape(row['desc']),160))
 
 
-        s += '</div><!-- end block-clips -->\n'
+        s += '</div></div><!-- end block-clips -->\n'
 
     return s

Modified: cmmlwiki/trunk/cmmlwiki/handler.py
===================================================================
--- cmmlwiki/trunk/cmmlwiki/handler.py	2006-09-12 07:45:39 UTC (rev 2465)
+++ cmmlwiki/trunk/cmmlwiki/handler.py	2006-09-12 08:05:24 UTC (rev 2466)
@@ -351,7 +351,7 @@
     s += "%s"
     repl_list += [ItemMetadata(self.inspector, self.ixi, editable=False)]
 
-    s += '<h3>Clips</h3>'
+    s += '<h3>Clips</h3>\n'
 
     try:
         start = int(self.form['start'].value)


-- 
conrad



More information about the cvs-annodex mailing list