[Zope3-checkins] CVS: Zope3/src/zope/app/browser/skins/rotterdam - content_links.css:1.1 all_links.css:1.1 configure.zcml:1.7 template.pt:1.9 xmltree.js:1.8 zope3.css:1.9

Godefroid Chapelle gotcha@swing.be
Thu, 9 Jan 2003 11:48:58 -0500


Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam
In directory cvs.zope.org:/tmp/cvs-serv9751

Modified Files:
	configure.zcml template.pt xmltree.js zope3.css 
Added Files:
	content_links.css all_links.css 
Log Message:
- simplify navigation tree management

- checkin additional css to support style survey



=== Added File Zope3/src/zope/app/browser/skins/rotterdam/content_links.css ===
#content .item a {
	text-decoration: underline;
}

/*
#content .item a {
	text-decoration: none;
}
*/



=== Added File Zope3/src/zope/app/browser/skins/rotterdam/all_links.css ===

a div, a, #navtreecontents title {
	text-decoration: underline;
}



=== Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml:1.6	Tue Dec 31 13:26:56 2002
+++ Zope3/src/zope/app/browser/skins/rotterdam/configure.zcml	Thu Jan  9 11:48:52 2003
@@ -10,6 +10,12 @@
     name="zope3.css" file="zope3.css" layer="rotterdam" />
 
 <browser:resource 
+    name="all_links.css" file="all_links.css" layer="rotterdam" />
+
+<browser:resource 
+    name="content_links.css" file="content_links.css" layer="rotterdam" />
+
+<browser:resource 
     name="xmltree.js" file="xmltree.js" layer="rotterdam" />
 
 <browser:resource


=== Zope3/src/zope/app/browser/skins/rotterdam/template.pt 1.8 => 1.9 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/template.pt:1.8	Tue Jan  7 07:27:45 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/template.pt	Thu Jan  9 11:48:52 2003
@@ -16,7 +16,11 @@
            "string: @import url(${context/++resource++zope3.css});"
            >
       @import url(zope3.css);
-    </style>
+  </style>
+
+  <link rel="alternate stylesheet" type="text/css" tal:attributes="href context/++resource++all_links.css" title="All links underlined" />
+
+  <link rel="alternate stylesheet" type="text/css" tal:attributes="href context/++resource++content_links.css" title="Content box links underlined" />
 
     <metal:block define-slot="headers" />
     <metal:block define-slot="style_slot" />
@@ -64,8 +68,6 @@
           id="navtreecontents" 
           class="body" 
           onclick="treeclicked(event);" 
-          onmouseover="mouseOverTree(event);"
-          onmouseout="mouseOutTree(event);"
           >
         </div>
 


=== Zope3/src/zope/app/browser/skins/rotterdam/xmltree.js 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/xmltree.js:1.7	Mon Dec 30 16:57:45 2002
+++ Zope3/src/zope/app/browser/skins/rotterdam/xmltree.js	Thu Jan  9 11:48:52 2003
@@ -2,7 +2,6 @@
 var ELEMENT_NODE = 1;
 var TEXT_NODE = 3;
 var COLLECTION = 'COLLECTION';
-var TITLE = 'TITLE';
 var ICON = 'ICON';
 var EXPAND = 'EXPAND';
 var XML_CHILDREN_VIEW = '@@children.xml';
@@ -167,9 +166,6 @@
 	return (checkTagName(elem, COLLECTION));
 	}
 
-function isTitle(elem) {
-	return (checkTagName(elem, TITLE));
-	}
 
 function isIcon(elem) {
 	return (checkTagName(elem, ICON));
@@ -206,35 +202,10 @@
         }
 
 //events
-function mouseOverTree (e) {
-        prettydump('mouseOverTree', LG_TRACE_EVENTS);
-        var elem = getTreeEventTarget(e);
-        if (elem.id == 'navtree') return;
-        if (isTitle(elem)) {
-	        elem.style.textDecoration = 'underline';
-                var collectionElem = elem.parentNode.parentNode.parentNode;
-                window.status = getTargetURL(collectionElem);
-	        }
-        }
-
-function mouseOutTree (e) {
-        prettydump('mouseOutTree', LG_TRACE_EVENTS);
-        var elem = getTreeEventTarget(e);
-        if (elem.id == 'navtree') return;
-        if (isTitle(elem)) {
-	        elem.style.textDecoration = 'none';
-                window.status = '';
-	        }
-        }
-
 function treeclicked (e) {
         prettydump('treeclicked', LG_TRACE_EVENTS);
         var elem = getTreeEventTarget(e);
         if (elem.id == 'navtree') return;
-        // if node clicked is title elem, change page
-        if (isTitle(elem)) {
-	        location.href = getTargetURL(elem.parentNode.parentNode.parentNode);
-	        }
 
         // if node clicked is expand elem, toggle expansion
         if (isExpand(elem)) {
@@ -246,15 +217,6 @@
         }
 
 // helpers
-
-function getTargetURL(elem) {
-        var location_href = baseurl;
-	location_href = location_href + elem.getAttribute('path');
-	location_href = location_href + CONTENT_VIEW;
-        return location_href;
-        }
-
-
 function getControlPrefix() {
         if (getControlPrefix.prefix)
                 return getControlPrefix.prefix;
@@ -352,7 +314,7 @@
                 }
         }       
 
-function createPresentationNodes(title, icon_url, length) {
+function createPresentationNodes(title, targetUrl, icon_url, length) {
         // create nodes hierarchy for one collection (without children)
         
         // create elem for plus/minus icon
@@ -362,13 +324,14 @@
         expandElem.appendChild(iconElem);
         iconElem.style.backgroundImage = 'url("' + icon_url + '")';
         // create title
-        var titleElem = document.createElement('title');
-        var newtextnode = document.createTextNode(title);
+        var linkElem = document.createElement('a');
+        var titleTextNode = document.createTextNode(title);
         
-        titleElem.appendChild(newtextnode);
-        titleElem.setAttribute('title', 'Contains ' + length + ' item(s)');
+        linkElem.appendChild(titleTextNode);
+        linkElem.setAttribute('title', 'Contains ' + length + ' item(s)');
+        linkElem.setAttribute('href', targetUrl);
         
-        iconElem.appendChild(titleElem);
+        iconElem.appendChild(linkElem);
 
         return expandElem;
         }
@@ -394,12 +357,14 @@
         
         //could show number of child items
         var length = source.getAttribute('length');
-        //elemTitle = elemTitle + '(' + length + ')';
         
         var icon_url = source.getAttribute('icon_url');  
 
-        
-        var expandElem = createPresentationNodes(elemTitle, icon_url, length);
+        var targetUrl = baseurl;
+	targetUrl = targetUrl + elemPath;
+	targetUrl = targetUrl + CONTENT_VIEW;        
+
+        var expandElem = createPresentationNodes(elemTitle, targetUrl, icon_url, length);
         newelem.appendChild(expandElem);
 
 


=== Zope3/src/zope/app/browser/skins/rotterdam/zope3.css 1.8 => 1.9 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/zope3.css:1.8	Tue Jan  7 07:27:45 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/zope3.css	Thu Jan  9 11:48:52 2003
@@ -30,12 +30,16 @@
     font-size: 100%;
 }
 
-a, #navtreecontents title {
+a {
 	text-decoration: none;
     color: #436976;
     background-color: transparent;
 }
 
+a:hover, div.box div.body a:hover div  {
+    text-decoration: underline;
+}
+
 table {
 
 }
@@ -225,11 +229,10 @@
 /*  Styles for xmltree
 */
 
-#navtreecontents title {
-	   display: inline;
+#navtreecontents a {
 	   cursor: pointer;
 	   height: 18px;
-		 }
+}
 
 #navtreecontents expand {
   	   background-repeat: no-repeat;
@@ -349,11 +352,12 @@
 
 div.box div.body a div.even {
     padding: 0.2em 0;
-    background: #F7F9FA;
-    border-bottom: 1px groove #8CACBB;    
-    border-top: 1px groove #8CACBB;    
+/*    background: #F7F9FA; */
+    border-bottom: 1px dotted #8CACBB;    
+    border-top: 1px dotted #8CACBB;    
 }
 
+
 #metadata .label {
     font-size: 80%;
 }
@@ -463,10 +467,6 @@
     text-align: left;
 }
 
-/*table.listing a:hover { */
-a:hover {
-    text-decoration: underline;
-}
 
 table.listing img {
 	vertical-align: middle;