[Mpuls-commits] r2336 - in wasko/branches/2.0: . mpulsweb/lib mpulsweb/public/js mpulsweb/public/styles mpulsweb/templates mpulsweb/templates/auth mpulsweb/templates/casemanagement mpulsweb/templates/logbook

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Apr 14 12:23:24 CEST 2010


Author: roland
Date: 2010-04-14 12:23:22 +0200 (Wed, 14 Apr 2010)
New Revision: 2336

Added:
   wasko/branches/2.0/mpulsweb/public/js/ie6-png.js
   wasko/branches/2.0/mpulsweb/public/styles/ie7.css
Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/navigation.py
   wasko/branches/2.0/mpulsweb/lib/renderer.py
   wasko/branches/2.0/mpulsweb/public/styles/all.css
   wasko/branches/2.0/mpulsweb/public/styles/color3.css
   wasko/branches/2.0/mpulsweb/public/styles/ie6.css
   wasko/branches/2.0/mpulsweb/public/styles/screen.css
   wasko/branches/2.0/mpulsweb/templates/auth/login.mako
   wasko/branches/2.0/mpulsweb/templates/base.mako
   wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako
   wasko/branches/2.0/mpulsweb/templates/casemanagement/organisation.mako
   wasko/branches/2.0/mpulsweb/templates/logbook/overview.mako
Log:
fixes for the different versions of internet explorer

Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/ChangeLog	2010-04-14 10:23:22 UTC (rev 2336)
@@ -1,3 +1,22 @@
+2010-04-14  Roland Geider <roland.geider at intevation.de>
+	
+	* mpulsweb/lib/navigation.py:
+	* mpulsweb/lib/renderer.py:
+	* mpulsweb/public/styles/all.css:
+	* mpulsweb/public/styles/screen.css:
+	* mpulsweb/public/styles/color3.css:
+	* mpulsweb/public/styles/ie6.css:
+	* mpulsweb/public/styles/ie7.css:
+	* mpulsweb/public/js/ie6-png.js:
+	* mpulsweb/templates/logbook/overview.mako:
+	* mpulsweb/templates/base.mako:
+	* mpulsweb/templates/auth/login.mako:
+	* mpulsweb/templates/casemanagement/organisation.mako:
+	* mpulsweb/templates/casemanagement/caselist.mako:
+        fixes for the different versions of internet explorer, more pages
+        are HTML valid, slight design changes
+
+
 2010-04-14  Torsten Irländer <torsten.irlaender at intevation.de>
 
 	* mpulsweb/model/phase.py: Fixed checking neighborship of to

Modified: wasko/branches/2.0/mpulsweb/lib/navigation.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/navigation.py	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/lib/navigation.py	2010-04-14 10:23:22 UTC (rev 2336)
@@ -185,6 +185,8 @@
                                       u' border="0"'
                                       u' alt="%s"'
                                       u' title="%s"'
+                                      u' width="16"'
+                                      u' height="16"'
                                       % (_('entry'), _('Open page'))))
         icon.append('</a>')
         entry.append(u'<a href="%s" %s>%s</a>'
@@ -193,11 +195,11 @@
 
         selected = (str(self.key) == str(session.get('navigation.selectedpage'))
                     and "selected" or "")
-        out.append(u'<td class="%s">' % selected)
+        out.append(u'<td class="%s" width="29">' % selected)
         out.append('<span style="white-space:nowrap;">%s %s</span>'
                    % ("&nbsp;" * (self.get_depth() - 1), "".join(icon)))
         out.append(u'</td>')
-        out.append(u'<td class="%s">' % selected)
+        out.append(u'<td class="%s" width="90%%">' % selected)
         out.append('%s' % ("".join(entry)))
         out.append(u'</td>')
 

Modified: wasko/branches/2.0/mpulsweb/lib/renderer.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-04-14 10:23:22 UTC (rev 2336)
@@ -110,7 +110,7 @@
             name = name[:-1]
         if name in _booleans:
             if value:
-                out.append(" %s=\"%s\"" % (name, name))
+                out.append(' %s="%s"' % (name, name))
         else:
             if value is None:
                 value = ""
@@ -118,7 +118,8 @@
                 value = str(value)
             out.append(" %s=%s" % (name, quoteattr(value)))
     if _close:
-        out.append("/>")
+        out.append(">")
+        #out.append("/>")
     else:
         out.append(">")
     return "".join(out)
@@ -174,8 +175,10 @@
 class Item(Text):
 
     def render(self, target, width="100"):
-        width = width or "100"
-        return '<td width="%s">%s</td>\n' % ("%s%%" % width, self.txt)
+        if width:
+            return '<td width="%s">%s</td>\n' % ("%s%%" % width, self.txt)
+        else:
+            return '<td>%s</td>\n' % (self.txt)
 
 
 class Container:
@@ -233,13 +236,19 @@
                        ' accept-charset="UTF-8" method="POST">\n')
             # Add submitbutton at the top of the page too
             out.append('<div class="widget formbuttons">')
-            out.append(tag("input", type="submit", name="save",
-                           value=_('Save'), tabindex=self.next_tabindex()))
+            out.append(tag("input",type="submit",
+                        name="save",
+                        class_="submit_button",
+                        value=_('Save'),
+                        tabindex=self.next_tabindex()))
             if showNext:
                 out.append("&nbsp;")
-                out.append(tag("input", type="submit", name="savenext",
-                               value=_('Save and proceed'),
-                               tabindex=self.next_tabindex()))
+                out.append(tag("input",
+                            type="submit",
+                            name="savenext",
+                            class_="submit_button",
+                            value=_('Save and proceed'),
+                            tabindex=self.next_tabindex()))
             out.append('</div>')
         out.append('<div>')
         #out.append('<div class="widget formfields">')
@@ -255,13 +264,20 @@
         out.append('</div>')
         if not self.ro_mode:
             out.append('<div class="widget formbuttons">')
-            out.append(tag("input", type="submit", name="save", value=_('Save'),
+            out.append(tag("input",
+                        type="submit",
+                        class_="submit_button",
+                        name="save",
+                        value=_('Save'),
                            tabindex=self.next_tabindex()))
             if showNext:
                 out.append("&nbsp;")
-                out.append(tag("input", type="submit", name="savenext",
-                               value=_('Save and proceed'),
-                               tabindex=self.next_tabindex()))
+                out.append(tag("input",
+                            type="submit",
+                            name="savenext",
+                            class_="submit_button",
+                            value=_('Save and proceed'),
+                            tabindex=self.next_tabindex()))
             out.append('</div>')
             out.append('</form>\n')
 
@@ -319,6 +335,8 @@
                            href="/annotations/required/%s" % meta.getName(),
                            target="_blank"))
             out.append('<img src="/images/icons/formular/required.png"'
+                        ' width="12"'
+                        ' height="12"'
                        ' alt="required">')
             out.append('</a>')
         if is_evaluation_relevant(meta.getFlags()):
@@ -610,10 +628,10 @@
         self.toTarget(Item("".join(out)), meta.getTarget())
 
     def _renderPlainBool(self, node):
-        meta = self._getMeta(node)
-        id = node.getIdentifier()
+        meta   = self._getMeta(node)
+        id     = node.getIdentifier()
         mvalue = meta.getValue()
-        value = node.getValue()
+        value  = node.getValue()
         #checked = self.stateStack[-1] == value and "checked" or ""
         #print "mvalue: %s value: %s" % (mvalue, value)
         out = []
@@ -674,6 +692,9 @@
         except:
             toSelect = None
         selected = toSelect == (value or value==0) and "selected" or ""
+        
+        if selected:
+            selected = selected + '="' + selected + '"'
 
         if (value or value==0):
             value = 'value="%s"' % escape(value, True)
@@ -1001,7 +1022,7 @@
         out = []
         out.append('<div class="widget dialog">')
         out.append('<h1>')
-        out.append(tag("img", src=icon))
+        out.append(tag("img", src=icon, alt=''))
         out.append(escape(title))
         out.append('</h1>')
         out.append('<ol>')

Added: wasko/branches/2.0/mpulsweb/public/js/ie6-png.js
===================================================================
--- wasko/branches/2.0/mpulsweb/public/js/ie6-png.js	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/public/js/ie6-png.js	2010-04-14 10:23:22 UTC (rev 2336)
@@ -0,0 +1,34 @@
+/*
+ 
+Correctly handle PNG transparency in Win IE 5.5 & 6.
+http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.
+
+*/
+
+var arVersion = navigator.appVersion.split("MSIE")
+var version = parseFloat(arVersion[1])
+
+if ((version >= 5.5) && (document.body.filters)) 
+{
+   for(var i=0; i<document.images.length; i++)
+   {
+      var img = document.images[i]
+      var imgName = img.src.toUpperCase()
+      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
+      {
+         var imgID = (img.id) ? "id='" + img.id + "' " : ""
+         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
+         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
+         var imgStyle = "display:inline-block;" + img.style.cssText 
+         if (img.align == "left") imgStyle = "float:left;" + imgStyle
+         if (img.align == "right") imgStyle = "float:right;" + imgStyle
+         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
+         var strNewHTML = "<span " + imgID + imgClass + imgTitle
+         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
+         img.outerHTML = strNewHTML
+         i = i-1
+      }
+   }
+}

Modified: wasko/branches/2.0/mpulsweb/public/styles/all.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/all.css	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/public/styles/all.css	2010-04-14 10:23:22 UTC (rev 2336)
@@ -210,7 +210,7 @@
 
 .formularpage .radiomatrix{
 	table-layout: auto;
-        border: 1px solid black;
+        /*border: 1px solid black;*/
 }
 
 .formularpage .widget {
@@ -218,11 +218,11 @@
 }
 
 .formularpage .error-message {
-	font-size: 0.7em;
+    color: #A40000;
 }
 
 .formularpage input, select, textarea, p {
-	width: 100%;
+	width: 99%;
 }
 
 .formularpage input[type="submit"] {
@@ -247,7 +247,6 @@
 }
 
 .formularpage span.error {
-	font-weight: bold;
 	font-size: 0.7em;
 	margin: 0;
 	color: #000;
@@ -260,10 +259,11 @@
 	border-style: groove none none groove;
 }
 
-
-.formularpage .radiomatrix {
+.formularpage .radiomatrix, .formularpage table {
+    width: 99%;
 }
 
+
 .formularpage .radiomatrix thead .label{
     text-align: center;
     border-bottom: 0px;

Modified: wasko/branches/2.0/mpulsweb/public/styles/color3.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/color3.css	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/public/styles/color3.css	2010-04-14 10:23:22 UTC (rev 2336)
@@ -24,8 +24,8 @@
 }
 
 a.button {
-	border-color: #000000;
-	background-color: #cccccc;
+	border-color: #555753;
+	background-color: #BABDB6;
 }
 
 a.export, a.export1 {

Modified: wasko/branches/2.0/mpulsweb/public/styles/ie6.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/ie6.css	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/public/styles/ie6.css	2010-04-14 10:23:22 UTC (rev 2336)
@@ -1,3 +1,7 @@
+table{
+    border-collapse: collapse;
+}
+
 p { padding-left:0.1em; }
 
 legend {
@@ -5,12 +9,12 @@
 	margin-left:-7px
 }
 
-.waska_form legend {
-	margin-left:-7px; /* the legend tag has a standard padding-left of 7px */
+div#content {
+	width: 52em;
 }
 
-div#content {
-	width: 53.5em;
+input.submit_button{
+        width: auto;
 }
 
 div#statusbar {
@@ -29,9 +33,11 @@
 
 div.right { margin-left:16em; }
 
-div#footer { width:69.6em; }
 
 
+.waska_form legend {
+	margin-left:-7px; /* the legend tag has a standard padding-left of 7px */
+}
 
 /*----------*/
 /* left menu*/

Added: wasko/branches/2.0/mpulsweb/public/styles/ie7.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/ie7.css	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/public/styles/ie7.css	2010-04-14 10:23:22 UTC (rev 2336)
@@ -0,0 +1,16 @@
+table{
+    border-collapse: collapse;
+}
+
+.formularpage select, .formularpage input{
+    height: 1.5em;
+    width: 99%
+}
+
+/*.radiomatrix, .formularpage table {
+    width: 99%;
+}*/
+
+.vcontrol{
+    padding-right: 3px;
+}

Modified: wasko/branches/2.0/mpulsweb/public/styles/screen.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/screen.css	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/public/styles/screen.css	2010-04-14 10:23:22 UTC (rev 2336)
@@ -84,11 +84,11 @@
 }
 
 a.button {
-	border: 1px;
+	border:       1px solid #555753;
 	margin-right: 1em;
-	border-style: solid ;
-	padding: 0 2em;
-	text-decoration:none;
+	padding:      0 1em;
+	text-decoration:    none;
+        -moz-border-radius: 3px;
 }
 
 a img{
@@ -499,7 +499,6 @@
 label, select, input[type="checkbox"], input[type="radio"], 
 input[type="button"], input[type="submit"], input[type="file"] {
 	cursor:   pointer;
-	cursor:   hand;
 	overflow: visible;
 }
 

Modified: wasko/branches/2.0/mpulsweb/templates/auth/login.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/auth/login.mako	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/templates/auth/login.mako	2010-04-14 10:23:22 UTC (rev 2336)
@@ -21,17 +21,17 @@
   <form name="login" action="${h.url_for(controller='/auth', action='loginAction')}" 
   accept-charset="UTF-8" method="POST">
     <div class="label">
-      <label for="login">${_('login_label_identifier')}</label>
+      <label for="username">${_('login_label_identifier')}</label>
     </div>
     <div class="input">
-       <input type="text" size="20" name="username" maxlength="64">
+       <input id="username" type="text" size="20" name="username" maxlength="64">
     </div>
     <div class="clearer"></div>
     <div class="label">
-      <label for="pass">${_('login_label_pw')}</label>
+      <label for="password">${_('login_label_pw')}</label>
     </div>
     <div class="input">
-      <input type="password" size="20" name="password">
+      <input type="password" size="20" id="password" name="password">
     </div>
     <div class="clearer"></div>
     <p id="login_btn">

Modified: wasko/branches/2.0/mpulsweb/templates/base.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/base.mako	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/templates/base.mako	2010-04-14 10:23:22 UTC (rev 2336)
@@ -13,7 +13,7 @@
   % endif
 </%def>
 
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
 <html>
   <head>
     <title>TEST: ${h.get_app_title()}</title>
@@ -46,10 +46,15 @@
             rel="stylesheet" type="text/css">
       <link href="${h.url_for('/styles/menu.css')}" media="screen" 
             rel="stylesheet" type="text/css">
-      <!--[if gt IE 5]>
+      <!--[if IE 6]>
+        <script defer type="text/javascript" src="/js/ie6-png.js"></script>
         <link href="${h.url_for('/styles/ie6.css')}" media="screen" 
               rel="stylesheet" type="text/css">
       <![endif]-->
+      <!--[if IE 7]>
+        <link href="${h.url_for('/styles/ie7.css')}" media="screen" 
+              rel="stylesheet" type="text/css">
+      <![endif]-->
     % endif
     <script src="/js/check.js" type="text/javascript"></script>
   </head>

Modified: wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako	2010-04-14 10:23:22 UTC (rev 2336)
@@ -55,10 +55,10 @@
   % for title, urlpart, style, roles, get_value in fields:
     % if h.hasRole(roles):
       <th class="${style} table_header_h">${title}
-        <a href="/case_overview/overview?sort_field=${urlpart}&sort_order=asc">
-          <img class="sorticon" src="/images/icons/sort_asc.png"></a>
-        <a href="/case_overview/overview?sort_field=${urlpart}&sort_order=desc">
-          <img class="sorticon" src="/images/icons/sort_desc.png"></a>
+        <a href="/case_overview/overview?sort_field=${urlpart}&amp;sort_order=asc">
+          <img class="sorticon" src="/images/icons/sort_asc.png" alt=""></a>
+        <a href="/case_overview/overview?sort_field=${urlpart}&amp;sort_order=desc">
+          <img class="sorticon" src="/images/icons/sort_desc.png" alt=""></a>
       </th>
     % endif
   % endfor

Modified: wasko/branches/2.0/mpulsweb/templates/casemanagement/organisation.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/casemanagement/organisation.mako	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/templates/casemanagement/organisation.mako	2010-04-14 10:23:22 UTC (rev 2336)
@@ -94,4 +94,3 @@
   % endfor
 </table>
 % endif
-</div>

Modified: wasko/branches/2.0/mpulsweb/templates/logbook/overview.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/logbook/overview.mako	2010-04-14 08:37:50 UTC (rev 2335)
+++ wasko/branches/2.0/mpulsweb/templates/logbook/overview.mako	2010-04-14 10:23:22 UTC (rev 2336)
@@ -25,20 +25,20 @@
 <table class="appointment">
   <tr>
     <th class="date table_header_h">Datum
-      <a href="/logbook/index/${session.get('case').id}?sort_field=datum&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-      <a href="/logbook/index/${session.get('case').id}?sort_field=datum&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=datum&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png" alt=""></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=datum&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png" alt=""></a> 
     </th>
     <th class="title table_header_h">Bearbeiter
-      <a href="/logbook/index/${session.get('case').id}?sort_field=nachname&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-      <a href="/logbook/index/${session.get('case').id}?sort_field=nachname&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=nachname&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png" alt=""></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=nachname&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png" alt=""></a> 
     </th>
     <th class="title table_header_h">Art
-      <a href="/logbook/index/${session.get('case').id}?sort_field=art&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-      <a href="/logbook/index/${session.get('case').id}?sort_field=art&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=art&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png" alt=""></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=art&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png" alt=""></a> 
     </th>
     <th class="title table_header_h">Dauer (min)
-      <a href="/logbook/index/${session.get('case').id}?sort_field=dauer&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png"></a> 
-      <a href="/logbook/index/${session.get('case').id}?sort_field=dauer&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png"></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=dauer&sort_order=asc"><img class="sorticon" src="/images/icons/sort_asc.png" alt=""></a> 
+      <a href="/logbook/index/${session.get('case').id}?sort_field=dauer&sort_order=desc"><img class="sorticon" src="/images/icons/sort_desc.png" alt=""></a> 
     </th>
     <th class="action table_header_h">${_('app_overview_tbl_header_actions')}</th>
   </tr>



More information about the Mpuls-commits mailing list