[Zope3-checkins] CVS: ZopeProducts/RotterdamSprint - xmltree.js:1.8 zope3.css:1.13
Godefroid Chapelle
gotcha@swing.be
Tue, 10 Dec 2002 16:38:02 -0500
Update of /cvs-repository/ZopeProducts/RotterdamSprint
In directory cvs.zope.org:/tmp/cvs-serv18557
Modified Files:
xmltree.js zope3.css
Log Message:
added folders icon to tree
=== ZopeProducts/RotterdamSprint/xmltree.js 1.7 => 1.8 ===
--- ZopeProducts/RotterdamSprint/xmltree.js:1.7 Tue Dec 10 12:43:43 2002
+++ ZopeProducts/RotterdamSprint/xmltree.js Tue Dec 10 16:38:01 2002
@@ -2,6 +2,7 @@
var TEXT_NODE = 3;
var COLLECTION = 'COLLECTION';
var TITLE = 'TITLE';
+var ICON = 'ICON';
var EXPAND = 'EXPAND';
var XML_CHILDREN_VIEW = 'children.xml';
var SINGLE_BRANCH_TREE_VIEW = 'singleBranchTree.xml';
@@ -11,8 +12,8 @@
var LG_TRACE = 6;
+var LG_DEBUG = 5;
var LG_INFO = 3;
-var LG_DEBUG = 1;
var LG_NOLOG = 0;
var loglevel = LG_NOLOG;
@@ -77,6 +78,10 @@
return (checkTagName(elem, TITLE));
}
+function isIcon(elem) {
+ return (checkTagName(elem, ICON));
+ }
+
function isExpand(elem) {
return (checkTagName(elem, EXPAND));
}
@@ -119,7 +124,7 @@
prettydump(elem.tagName, LG_DEBUG);
if (elem.id == 'navtree') return;
if (isTitle(elem)) {
- location_href = baseurl + elem.parentNode.parentNode.getAttribute('name') + '/' + CONTENT_VIEW;
+ location_href = baseurl + elem.parentNode.parentNode.parentNode.getAttribute('name') + '/' + CONTENT_VIEW;
prettydump(location_href, LG_DEBUG);
location.href=location_href;
}
@@ -259,15 +264,20 @@
function createCollection(curritem, basename, deep) {
var currname = curritem.getAttribute('name');
+ var icon_url = curritem.getAttribute('icon_url');
var newelem = document.createElement(curritem.tagName);
- // add plus/minus icon
- var expandelem = document.createElement('expand');
- newelem.appendChild(expandelem);
- // add title
+ // create elem for plus/minus icon
+ var expandElem = document.createElement('expand');
+ newelem.appendChild(expandElem);
+ // create elem for item icon
+ var iconElem = document.createElement('icon');
+ expandElem.appendChild(iconElem);
+ iconElem.style.backgroundImage = 'url("' + baseurl + icon_url + '")';
+ // create title
var titleelem = document.createElement('title');
var newtextnode = document.createTextNode(currname);
titleelem.appendChild(newtextnode);
- expandelem.appendChild(titleelem);
+ iconElem.appendChild(titleelem);
newelem.setAttribute('name',basename + currname);
if (deep) {
=== ZopeProducts/RotterdamSprint/zope3.css 1.12 => 1.13 ===
--- ZopeProducts/RotterdamSprint/zope3.css:1.12 Tue Dec 10 12:43:43 2002
+++ ZopeProducts/RotterdamSprint/zope3.css Tue Dec 10 16:38:01 2002
@@ -11,7 +11,7 @@
/* Basic Elements */
body {
- font: 70% Verdana, Helvetica, Arial, sans-serif;
+ font: 75% Verdana, Helvetica, Arial, sans-serif;
background: White;
color: Black;
margin: 0;
@@ -228,6 +228,7 @@
title {
display: inline;
cursor: pointer;
+ height: 18px;
}
expand {
@@ -238,10 +239,18 @@
cursor: pointer;
}
+icon {
+ background-repeat: no-repeat;
+ padding-left: 18px;
+ display: inline;
+ cursor: auto;
+ }
+
collection {
display: block;
margin-left: 15px;
/* border: red solid 1pt; */
+ height: auto;
}