[Mpuls-commits] r4220 - in base/trunk: . mpulsweb/lib mpulsweb/templates/administration mpulsweb/templates/dialogs

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 17 16:43:05 CET 2010


Author: roland
Date: 2010-11-17 16:43:02 +0100 (Wed, 17 Nov 2010)
New Revision: 4220

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/renderer.py
   base/trunk/mpulsweb/templates/administration/reset_password.mako
   base/trunk/mpulsweb/templates/dialogs/success.mako
Log:
add sizes to more PNG graphics (fixes IE6 problems)

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-11-17 15:41:30 UTC (rev 4219)
+++ base/trunk/ChangeLog	2010-11-17 15:43:02 UTC (rev 4220)
@@ -15,6 +15,8 @@
 	  mpulsweb/templates/casemanagement/caselist.mako,
 	  mpulsweb/templates/tags/tags.mako,
 	  mpulsweb/templates/phase/phase.mako,
+	  mpulsweb/templates/dialogs/success.mako,
+	  mpulsweb/templates/administration/reset_password.mako
 	  mpulsweb/templates/casemanagement/digest.mako: issue1390: fixed
 	  issues with Internet Explorer when PNG images don't have an explicit
 	  "width" and "height" attribute

Modified: base/trunk/mpulsweb/lib/renderer.py
===================================================================
--- base/trunk/mpulsweb/lib/renderer.py	2010-11-17 15:41:30 UTC (rev 4219)
+++ base/trunk/mpulsweb/lib/renderer.py	2010-11-17 15:43:02 UTC (rev 4220)
@@ -286,7 +286,9 @@
             out.append(tag("a", target="_blank",
                            href=url_for(controller="/annotations",
                                         action="help", id=meta.getName())))
-            out.append(tag("img", src=icon("formular/help.png"), alt="help"))
+            out.append(tag("img", src=icon("formular/help.png"), alt="help",
+                        width=12,
+                        height=12))
             out.append('</a>')
         if is_required(meta.getFlags()):
             out.append(tag("a", target="_blank",
@@ -301,7 +303,9 @@
                                         action="evaluation",
                                         id=meta.getName())))
             out.append(tag("img", src=icon("formular/evaluation.png"),
-                           alt="evaluation"))
+                           alt="evaluation",
+                           width=12,
+                           height=12))
             out.append('</a>')
         return "".join(out)
 
@@ -1050,14 +1054,18 @@
                                         action="select_branch",
                                    id=sd.rg.getChildren()[0].getIdentifier())))
             out.append(tag("img", src=icon("open_active_22.png"),
-                           border="0", alt=_('view'), title=_('view')))
+                           border="0", alt=_('view'), title=_('view'),
+                           height="22",
+                           width="22"))
             out.append("</a>")
             if not self.ro_mode:
                 out.append(tag("a", href=url_for(controller="/repeatgroup",
                                                  action="delete",
                                                  id=sd.rg.getIdentifier())))
                 out.append(tag("img", src=icon("delete_active_22.png"),
-                               border="0", alt=_('delete'), title=_('delete')))
+                               border="0", alt=_('delete'), title=_('delete'),
+                               height="22",
+                               width="22"))
                 out.append("</a>")
             out.append('</td>')
             out.append('</tr>')
@@ -1074,7 +1082,9 @@
 
             out.append(tag("img", src=icon("new_22.png"),
                            border="0", alt=_('Add new RG'),
-                           title=_('Add new RG')))
+                           title=_('Add new RG'),
+                           height="22",
+                           width="22"))
             out.append("</a>")
         out.append('</td>')
         out.append('</tr>')
@@ -1133,7 +1143,7 @@
         return "".join(out)
 
     def render_items(self, items, title, title_icon, tree, css_class="",
-                     show_undo=True):
+                     show_undo=True, img_width=48, img_height=48):
         if not items:
             return ""
 
@@ -1141,9 +1151,7 @@
         out.append(tag("div", class_=("widget dialog %s" % css_class)))
         out.append('<h1>')
         
-        # Note: The icons' sizes are set to 48x48 here. Expand function if more
-        # flexibility is needed
-        out.append(tag("img", src=title_icon, alt='', width='48', height='48'))
+        out.append(tag("img", src=title_icon, alt='', width=img_width, height=img_height))
         out.append(escape(title))
         out.append('</h1>')
         out.append('<ol>')

Modified: base/trunk/mpulsweb/templates/administration/reset_password.mako
===================================================================
--- base/trunk/mpulsweb/templates/administration/reset_password.mako	2010-11-17 15:41:30 UTC (rev 4219)
+++ base/trunk/mpulsweb/templates/administration/reset_password.mako	2010-11-17 15:43:02 UTC (rev 4220)
@@ -9,7 +9,10 @@
 	<li><a href="#">${_('adm_np_resetpassword')}</a></li>
 </%def>
 <div class="dialog">
-<h1><img src="${h.url_for('/images/icons/info/confirmation.png')}" alt="Bestäntigung"</> ${_('adm_header_resetpassword')}</h1>
+<h1><img src="${h.url_for('/images/icons/info/confirmation.png')}"
+    alt="Bestäntigung"
+    width="48"
+    height="48"> ${_('adm_header_resetpassword')}</h1>
 <p>${_('adm_con_rp_the_password')} <strong>${c.uo.first_name| F.NA} ${c.uo.last_name| F.NA}</strong> ${_('adm_con_rp_has_been_changed')}<br>
 ${_('adm_con_rp_new_pw')} <strong>${h.literal(c.new_password)}</strong></p>
 <a class="button" href="${h.url_for(controller='/administration', action='overviewUser')}">${_('adm_con_rp_to_useroverview')}</a>

Modified: base/trunk/mpulsweb/templates/dialogs/success.mako
===================================================================
--- base/trunk/mpulsweb/templates/dialogs/success.mako	2010-11-17 15:41:30 UTC (rev 4219)
+++ base/trunk/mpulsweb/templates/dialogs/success.mako	2010-11-17 15:43:02 UTC (rev 4220)
@@ -1,7 +1,9 @@
 ## -*- coding: utf-8 -*-
 <%!  import mpulsweb.lib.helper.filters as F %>
-<div class="dialog" />
-<h1><img src="${h.url_for('/images/icons/info/confirmation.png')}" alt="Erledigt"/>${c.dialog_title or c.success_for | F.NA}</h1>
+<div class="dialog">
+<h1><img src="${h.url_for('/images/icons/info/confirmation.png')}" alt="Erledigt"
+    width="48"
+    height="48">${c.dialog_title or c.success_for | F.NA}</h1>
 <p>${c.dialog_text or c.success_text | F.NA}</p>
 <a class="button" href="${c.url_ok}">${_('dialog_header_confirm_option_ok')}</a>
 </div>



More information about the Mpuls-commits mailing list