[Mpuls-commits] r1760 - in wasko/branches/2.0: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 24 18:53:53 CET 2010


Author: bh
Date: 2010-02-24 18:53:47 +0100 (Wed, 24 Feb 2010)
New Revision: 1760

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py (ErrorRenderer.render): Remove
commented outcode


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-02-24 15:43:46 UTC (rev 1759)
+++ wasko/branches/2.0/ChangeLog	2010-02-24 17:53:47 UTC (rev 1760)
@@ -1,5 +1,10 @@
 2010-02-24  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/renderer.py (ErrorRenderer.render): Remove
+	commented outcode
+
+2010-02-24  Bernhard Herzog  <bh at intevation.de>
+
 	* jmdweb/controllers/case_overview.py
 	(CaseOverviewController._buildCaseList): scape case fields
 	properly for HTML.  Port of corresponding change in waskaweb

Modified: wasko/branches/2.0/mpulsweb/lib/renderer.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-02-24 15:43:46 UTC (rev 1759)
+++ wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-02-24 17:53:47 UTC (rev 1760)
@@ -977,106 +977,7 @@
 
             out.append('</ol>')
             out.append('</div>')
-
-        #if self.warnings:
-        #    # hash by warning message
-        #    warns = {}
-        #    warnings_list = self.warnings.items()
-        #    #warnings_list.sort(lambda a, b: cmp(order[a[0]], order[b[0]]))
-
-        #    for k, v in warnings_list:
-        #        msg = u", ".join(v[1])
-        #        items = warns.setdefault(msg, [])
-        #        items.append((k, v[0].getDescription()))
-
-        #        out.append('<div class="widget dialog">')
-        #        out.append('<h1><img src="/images/icons/info.png">%s</h1>' % _('Formular warnings'))
-        #        out.append('<ol>')
-
-        #    counter = (len(self.warnings) > 5) and 1 or None
-
-        #    for k, v in warns.iteritems():
-        #        out.append(u'<li>')
-        #        links = []
-        #        if counter:
-        #            for item in v:
-        #                links.append(u'<a href="#f_%s" title=%s>%d</a>' % (
-        #                    item[0], quoteattr(item[1]), counter))
-        #                counter += 1
-        #        else:
-        #            for item in v:
-        #                links.append(u'<a href="#f_%s">%s</a>' % item)
-
-        #        out.append(u"%s: %s</li>" % (k, u", ".join(links)))
-
-        #    out.append(u'</ul></div>')
         return "".join(out)
 
-# class ErrorRenderer(object):
-#
-#     def __init__(self, error_items, warnings):
-#         self.error_items = error_items
-#         self.warnings    = warnings
-#
-#     def render(self, page):
-#         meta = self._getMeta(page)
-#         page_name = meta.getName()
-#
-#         #errors_list = [kv for kv in self.error_items.iteritems() if kv[1].page == page_name]
-#         errors_list = [kv for kv in self.error_items.iteritems()]
-#         #order = dict([(w.getName(), idx) for idx, w in enumerate(page.allWidgets())])
-#
-#         out = []
-#
-#         if errors_list:
-#             out.append('<div class="widget dialog">')
-#             out.append('<h1><img src="/images/icons/alert.png">%s</h1>' % _('Formular errors'))
-#             out.append('<ol>')
-#
-#             #errors_list.sort(lambda a, b: cmp(order[a[0]], order[b[0]]))
-#
-#             for k, v in errors_list:
-#                 out.append(u'<li><a href="/formularpage/undo/%s">' % k)
-#                 out.append(u'<img src="/images/icons/formular/undo.png" border="0" alt="undo" title="%s"' % _('Restore last valid value'))
-#                 out.append(
-#                     u'</a>'
-#                     u'<a class="error" href="#f_%s">%s: %s</a></li>'% (k, v.name, u", ".join(v.messages)))
-#
-#             out.append('</ol>')
-#             out.append('</div>')
-#
-#         if self.warnings:
-#             # hash by warning message
-#             warns = {}
-#             warnings_list = self.warnings.items()
-#             #warnings_list.sort(lambda a, b: cmp(order[a[0]], order[b[0]]))
-#
-#             for k, v in warnings_list:
-#                 msg = u", ".join(v[1])
-#                 items = warns.setdefault(msg, [])
-#                 items.append((k, v[0].getDescription()))
-#
-#                 out.append('<div class="widget dialog">')
-#                 out.append('<h1><img src="/images/icons/info.png">%s</h1>' % _('Formular warnings'))
-#                 out.append('<ol>')
-#
-#             counter = (len(self.warnings) > 5) and 1 or None
-#
-#             for k, v in warns.iteritems():
-#                 out.append(u'<li>')
-#                 links = []
-#                 if counter:
-#                     for item in v:
-#                         links.append(u'<a href="#f_%s" title=%s>%d</a>' % (
-#                             item[0], quoteattr(item[1]), counter))
-#                         counter += 1
-#                 else:
-#                     for item in v:
-#                         links.append(u'<a href="#f_%s">%s</a>' % item)
-#
-#                 out.append(u"%s: %s</li>" % (k, u", ".join(links)))
-#
-#             out.append(u'</ul></div>')
-#         return u"".join(out)
 
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8:



More information about the Mpuls-commits mailing list