[Mpuls-commits] r2603 - in wasko/branches/2.0: . mpulsweb/public/js mpulsweb/public/styles mpulsweb/templates mpulsweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue May 4 11:36:45 CEST 2010
Author: roland
Date: 2010-05-04 11:36:40 +0200 (Tue, 04 May 2010)
New Revision: 2603
Added:
wasko/branches/2.0/mpulsweb/public/js/ie6-menu.js
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/mpulsweb/public/styles/ie6.css
wasko/branches/2.0/mpulsweb/public/styles/ie7.css
wasko/branches/2.0/mpulsweb/public/styles/menu.css
wasko/branches/2.0/mpulsweb/templates/base.mako
wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako
Log:
make the CSS menu work with internet explorer
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-05-04 09:07:50 UTC (rev 2602)
+++ wasko/branches/2.0/ChangeLog 2010-05-04 09:36:40 UTC (rev 2603)
@@ -1,3 +1,16 @@
+2010-05-04 Roland Geider <roland.geider at intevation.de>
+
+ * mpulsweb/public/styles/menu.css:
+ * mpulsweb/public/styles/ie6.css:
+ * mpulsweb/public/styles/ie7.css:
+ * mpulsweb/public/styles/ie8.css:
+ * mpulsweb/public/js/ie6-menu.js:
+ * mpulsweb/public/images/svg/arrow_double_right.svg:
+ * mpulsweb/templates/base.mako:
+ * mpulsweb/templates/casemanagement/caselist.mako:
+ * mpulsweb/templates/casemanagement/main.mako: tweaks to make the
+ CSS menu work with internet explorer
+
2010-05-03 Bernhard Herzog <bh at intevation.de>
* mpulsweb/controllers/case_bundle.py
Added: wasko/branches/2.0/mpulsweb/public/js/ie6-menu.js
===================================================================
--- wasko/branches/2.0/mpulsweb/public/js/ie6-menu.js 2010-05-04 09:07:50 UTC (rev 2602)
+++ wasko/branches/2.0/mpulsweb/public/js/ie6-menu.js 2010-05-04 09:36:40 UTC (rev 2603)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Hack to make the CSS menu work since Internet Explorer 6 does
+ * only understand :hover on links
+ *
+ */
+
+
+function makeHover(menuObject)
+{
+ for (i=0; i < menuObject.childNodes.length; i++)
+ {
+ node = menuObject.childNodes[i];
+ if (node.nodeName == "LI")
+ {
+ node.onmouseover = function()
+ {
+ this.className += " menuHover";
+ }
+ node.onmouseout = function()
+ {
+ this.className=this.className.replace(" menuHover", "");
+ }
+ }
+ }
+}
+
+
+startList = function()
+{
+ if (document.all && document.getElementById)
+ {
+ makeHover(document.getElementById("mainMenuCase"))
+ makeHover(document.getElementById("mainMenuPrivacy"))
+ }
+}
+
+window.onload = startList;
\ No newline at end of file
Modified: wasko/branches/2.0/mpulsweb/public/styles/ie6.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/ie6.css 2010-05-04 09:07:50 UTC (rev 2602)
+++ wasko/branches/2.0/mpulsweb/public/styles/ie6.css 2010-05-04 09:36:40 UTC (rev 2603)
@@ -1,3 +1,9 @@
+/*
+ *
+ * Stylesheet for the Internet Explorer 6
+ *
+ */
+
table{
border-collapse: collapse;
}
@@ -135,3 +141,20 @@
margin-left:0.5%;
margin-right:0.5%;
}
+
+
+/*
+ * CSS menu
+ */
+ul.mainMenu li.menuHover ul{
+ /*background-color: red;*/
+ display: block;
+}
+
+ul.mainMenu li ul {
+/* top: -0.9em; */
+ }
+
+ul.mainMenu li.menuHover a:hover {
+ font-weight: bold;
+}
\ No newline at end of file
Modified: wasko/branches/2.0/mpulsweb/public/styles/ie7.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/ie7.css 2010-05-04 09:07:50 UTC (rev 2602)
+++ wasko/branches/2.0/mpulsweb/public/styles/ie7.css 2010-05-04 09:36:40 UTC (rev 2603)
@@ -1,3 +1,9 @@
+/*
+ *
+ * Stylesheet for the Internet Explorer 7
+ *
+ */
+
table{
border-collapse: collapse;
}
Modified: wasko/branches/2.0/mpulsweb/public/styles/menu.css
===================================================================
--- wasko/branches/2.0/mpulsweb/public/styles/menu.css 2010-05-04 09:07:50 UTC (rev 2602)
+++ wasko/branches/2.0/mpulsweb/public/styles/menu.css 2010-05-04 09:36:40 UTC (rev 2603)
@@ -1,5 +1,14 @@
+/*
+ * This stylesheet implements a basic CSS based dynamic (lateral) menu.
+ *
+ * References and info on how this works e.g. here:
+ * - http://meyerweb.com/eric/css/edge/menus/demo.html
+ * - http://www.alistapart.com/articles/horizdropdowns/
+ *
+ */
+
+
ul.mainMenu, ul.mainMenu ul {
- /*min-width: 230px;*/
width: 14.3em;
cursor: default;
@@ -11,57 +20,61 @@
background-image: url("../images/icons/arrow_double_left.png");
background-position: 12px 4px !important;
background-repeat: no-repeat;
+
+ /*float: left;*/
+ /*clear:both;*/
}
ul.mainMenu li {
-height:20px;
+ height: 20px;
list-style-type: none;
- /*list-style-image: url("/images/icons/arrow_right_small.png");*/
- margin: 0px; /* Opera 7 puts large spacings between li elements */
- position: relative; /* makes the menu blocks be positioned relative to their parent menu item
+ margin: 0px; /* Opera 7 puts large spacings between li elements */
+ position: relative; /* makes the menu blocks be positioned relative to their parent menu item
the lack of offset makes these appear normal, but it will make a difference
to the absolutely positioned child blocks */
- color: black; /* sets the default font colour to white */
+}
+
+/*ul.mainMenu li > ul*/ /* Note: use the the > selector to make lesser browsers (and IE - see below) hiding child ULs */
+ul.mainMenu li ul {
+ display: none; /* hides child menu blocks - one of the most important declarations */
+ position: absolute; /* make child blocks hover without leaving space for them */
+ top: -0.5em; /* position slightly lower than the parent menu item */
+ left: 14.3em; /* this must not be more than the width of the parent block, or the mouse will
+ have to move off the element to move between blocks, and the menu will close */
+ padding-left: 1em;
-
-}
-ul.mainMenu li > ul { /* using the > selector prevents many lesser browsers (and IE - see below) hiding child ULs */
- display: none; /* hides child menu blocks - one of the most important declarations */
- position: absolute; /* make child blocks hover without leaving space for them */
- top: -6px; /* position slightly lower than the parent menu item */
- left: 14.3em; /* this must not be more than the width of the parent block, or the mouse will
- have to move off the element to move between blocks, and the menu will close */
border-top: 1px solid #888a85;
border-bottom: 1px solid #888a85;
border-right: 1px solid #888a85;
background-color: #BABDB6;
- background-image: url("");
- padding-left: 1em;
+ background-image: url(""); /* Reset background image */
}
ul.mainMenu li:hover, ul.mainMenu h1:hover, ul.mainMenu li.CSStoHighlight {
background-color: #BABDB6;
color: #000;
}
+
+ul.mainMenu:hover{
+ background-color: #BABDB6;
+}
ul.mainMenu ul.CSStoShow { /* must not be combined with the next rule or IE gets confused */
- display: block; /* specially to go with the className changes in the behaviour file */
+ display: block; /* specially to go with the className changes in the behaviour file */
}
-ul.mainMenu li:hover > ul { /* one of the most important declarations - the browser must detect hovering over arbitrary elements
+ul.mainMenu li:hover > ul{ /* one of the most important declarations - the browser must detect hovering over arbitrary elements
the > targets only the child ul, not any child uls of that child ul */
- display: block; /* makes the child block visible - one of the most important declarations */
+ display: block; /* makes the child block visible - one of the most important declarations */
}
/* and some link styles */
ul.mainMenu li a{
- color: black;
display: block;
width: 100%;
text-decoration: none;
}
ul.mainMenu li a:hover, ul.mainMenu li a.CSStoHighLink{
- color: #000;
+ /*color: #000;*/
}
ul.mainMenu li:hover > a {
- color: #000;
font-weight: bold;
} /* supports links in branch headings - should not be display: block; */
Modified: wasko/branches/2.0/mpulsweb/templates/base.mako
===================================================================
--- wasko/branches/2.0/mpulsweb/templates/base.mako 2010-05-04 09:07:50 UTC (rev 2602)
+++ wasko/branches/2.0/mpulsweb/templates/base.mako 2010-05-04 09:36:40 UTC (rev 2603)
@@ -48,13 +48,21 @@
rel="stylesheet" type="text/css">
<!--[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">
+ <script defer type="text/javascript" src="/js/ie6-menu.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">
+ <link href = "${h.url_for('/styles/ie7.css')}"
+ media = "screen"
+ rel = "stylesheet" type="text/css">
<![endif]-->
+ <!--[if IE 8]>
+ <link href = "${h.url_for('/styles/ie8.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-05-04 09:07:50 UTC (rev 2602)
+++ wasko/branches/2.0/mpulsweb/templates/casemanagement/caselist.mako 2010-05-04 09:36:40 UTC (rev 2603)
@@ -150,69 +150,93 @@
<%def name="get_state_icon(case)">
% if h.hasRole(['cm_ka']):
% if str(case.getEditor().id) == str(session.get('USER_AUTHORIZED').id):
- <img src="/images/icons/edit_editor.png" border="0"
- alt="${_('cm_overview_img_editor')}"
- title="${_('cm_overview_img_editor')}">
+ <img src = "/images/icons/edit_editor.png" border="0"
+ alt = "${_('cm_overview_img_editor')}"
+ title = "${_('cm_overview_img_editor')}"
+ width = "22"
+ height = "22">
% else:
- <img src="/images/icons/edit_editors_22.png" border="0"
- alt="${_('cm_overview_img_standin')}"
- title="${_('cm_overview_img_standin')}">
+ <img src = "/images/icons/edit_editors_22.png" border="0"
+ alt = "${_('cm_overview_img_standin')}"
+ title = "${_('cm_overview_img_standin')}"
+ width = "22"
+ height = "22">
% endif
% endif
% if case.getState().getState() in (1,2):
- <img src="/images/icons/edit_22.png" border="0"
- alt="${_('case_state_label_open')}"
- title="${_('case_state_label_open')}">
+ <img src = "/images/icons/edit_22.png" border="0"
+ alt = "${_('case_state_label_open')}"
+ title = "${_('case_state_label_open')}"
+ width = "22"
+ height = "22">
% elif case.getState().getState() == 3:
- <img src="/images/icons/delete_inactive_22.png" border="0"
- alt="${_('case_state_label_markdelete')}"
- title="${_('case_state_label_markdelete')}">
+ <img src = "/images/icons/delete_inactive_22.png" border="0"
+ alt = "${_('case_state_label_markdelete')}"
+ title = "${_('case_state_label_markdelete')}"
+ width = "22"
+ height = "22">
% elif case.getState().getState() == 4:
- <img src="/images/icons/anonymise_inactive_22.png" border="0"
- alt="${_('case_state_label_markanonym')}"
- title="${_('case_state_label_markanonym')}">
+ <img src = "/images/icons/anonymise_inactive_22.png" border="0"
+ alt = "${_('case_state_label_markanonym')}"
+ title = "${_('case_state_label_markanonym')}"
+ width = "22"
+ height = "22">
% elif case.getState().getState() == 5:
- <img src="/images/icons/anonymise_inactive_22.png" border="0"
- alt="${_('case_state_label_anonym')}"
- title="${_('case_state_label_anonym')}">
+ <img src = "/images/icons/anonymise_inactive_22.png" border="0"
+ alt = "${_('case_state_label_anonym')}"
+ title = "${_('case_state_label_anonym')}"
+ width = "22"
+ height = "22">
% endif
</%def>
<%def name="get_actions(case)">
% if case.getState().getState() != 5:
<a href="/case/select/${case.id}/0/">
- <img src="/images/icons/open_active_22.png" border="0"
- alt="${_('cm_overview_a_show')}"
- title="${_('cm_overview_a_show')}"></a>
+ <img src = "/images/icons/open_active_22.png" border="0"
+ alt = "${_('cm_overview_a_show')}"
+ title = "${_('cm_overview_a_show')}"
+ width = "22"
+ height = "22"></a>
% endif
% if h.hasRole(['admin_ka']):
% if case.getState().getState() in (3, 5):
<a href="/case/delete/${case.id}/0/">
- <img src="/images/icons/delete_active_22.png" border="0"
- alt="${_('Delete case')}"
- title="${_('Delete case')}"></a>
+ <img src = "/images/icons/delete_active_22.png" border="0"
+ alt = "${_('Delete case')}"
+ title = "${_('Delete case')}"
+ width = "22"
+ height = "22"></a>
% endif
% if case.getState().getState() == 4:
<a href="/case/anonymize/${case.id}/0/">
- <img src="/images/icons/anonymise_active_22.png" border="0"
- alt="${_('cm_overview_a_anonymize')}"
- title="${_('cm_overview_a_anonymize')}"></a>
+ <img src = "/images/icons/anonymise_active_22.png" border="0"
+ alt = "${_('cm_overview_a_anonymize')}"
+ title = "${_('cm_overview_a_anonymize')}"
+ width = "22"
+ height = "22"></a>
% endif
% if case.getState().getState() in (3, 4):
<a href="/case/restore/${case.id}/0/">
- <img src="/images/icons/refresh_active_22.png" border="0"
- alt="${_('cm_overview_a_restore')}"
- title="${_('cm_overview_a_restore')}"></a>
+ <img src = "/images/icons/refresh_active_22.png" border="0"
+ alt = "${_('cm_overview_a_restore')}"
+ title = "${_('cm_overview_a_restore')}"
+ width = "22"
+ height = "22"></a>
% endif
% elif h.hasRole(['cm_ka']) and case.getState().getState() in (1, 2):
<a href="/case/markForAnonymizeFromOverview/${case.id}/0/">
- <img src="/images/icons/anonymise_active_22.png" border="0"
- alt="${_('cm_overview_a_anonymize')}"
- title="${_('cm_overview_a_anonymize')}"></a>
+ <img src = "/images/icons/anonymise_active_22.png" border="0"
+ alt = "${_('cm_overview_a_anonymize')}"
+ title = "${_('cm_overview_a_anonymize')}"
+ width = "22"
+ height = "22"></a>
<a href="/case/markForDelete/${case.id}/0/">
- <img src="/images/icons/delete_active_22.png" border="0"
- alt="${_('cm_overview_a_delete')}"
- title="${_('cm_overview_a_delete')}"></a>
+ <img src = "/images/icons/delete_active_22.png" border="0"
+ alt = "${_('cm_overview_a_delete')}"
+ title = "${_('cm_overview_a_delete')}"
+ width = "22"
+ height = "22"></a>
% endif
</%def>
More information about the Mpuls-commits
mailing list