[zopeorg-checkins] CVS: Products/ZopeOrg-NV/skins/nzo - css_default.css.dtml:1.1 folder_actions.js.dtml:1.1 ieemu.js.py:1.1 plone_javascripts.js.pt:1.1 styley.js.dtml:1.1 table_sort.js.dtml:1.1 main_template.html:1.10 nzoBasic.css.dtml:1.2 stylesheet_properties.props:1.2 css_default.css:NONE
Sidnei da Silva
sidnei at x3ng.com.br
Tue Jun 11 16:39:15 EDT 2002
Update of /cvs-zopeorg/Products/ZopeOrg-NV/skins/nzo
In directory cvs.zope.org:/tmp/cvs-serv2957/skins/nzo
Modified Files:
main_template.html nzoBasic.css.dtml
stylesheet_properties.props
Added Files:
css_default.css.dtml folder_actions.js.dtml ieemu.js.py
plone_javascripts.js.pt styley.js.dtml table_sort.js.dtml
Removed Files:
css_default.css
Log Message:
CSS Cleanup. Ported folder_contents and CSS from Plone.
=== Added File Products/ZopeOrg-NV/skins/nzo/css_default.css.dtml ===
/* ----------------------------------------- */
/* Body CSS */
/* ----------------------------------------- */
BODY {
scrollbar-face-color: #E2E2E2;
scrollbar-shadow-color: #FFFFFF;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #727bb2;
scrollbar-darkshadow-color: #727bb2;
scrollbar-track-color: #FFFFFF;
scrollbar-arrow-color: #727bb2;
}
H1 {
font-weight : bold;
margin-bottom: 1px;
border-bottom: solid 0.05em #cccccc;
}
H2 {
font-weight : bold;
}
/* ----------------------------------------- */
/* Top Navigation Bar */
/* ----------------------------------------- */
#TOP_NAVIG INPUT {
height: 18px;
}
#TOP_NAVIG A {
text-decoration : none;
color : white;
}
#TOP_NAVIG A:ACTIVE {
text-decoration : underline;
}
#TOP_NAVIG TD {
text-align : right;
}
/* ----------------------------------------- */
/* Byline */
/* ----------------------------------------- */
#BYLINE_TITLE {
font-weight : bold;
margin-top : 0.5em;
margin-bottom : 0.5em;
}
/* ----------------------------------------- */
/* User Bar */
/* ----------------------------------------- */
#USER_BAR {
text-align : right;
margin-bottom : 3pt;
}
#USER_BAR A {
text-decoration : none;
}
#USER_BAR A:ACTIVE {
text-decoration : none;
}
/* ----------------------------------------- */
/* Info for */
/* ----------------------------------------- */
#INFO_FOR TD A{
text-decoration : none;
}
.subitems {
margin: 0.4em;
}
/* ----------------------------------------- */
/* Breadcrumbs */
/* ----------------------------------------- */
#Breadcrumbs {
}
/* ----------------------------------------- */
/* Actions Bar */
/* ----------------------------------------- */
#ACTIONS_BAR {
text-align : right;
margin-bottom : 3pt;
}
#ACTIONS_BAR A {
text-decoration : none;
}
#ACTIONS_BAR A:ACTIVE {
text-decoration : underline;
}
/* ----------------------------------------- */
/* Sidemenu and news area */
/* ----------------------------------------- */
#NEWS {
padding-left: 3px;
padding-right: 3px;
}
#NEWS A {
text-decoration : none;
}
#newsarea H1 {
text-align : left;
margin-bottom: 1px;
border-bottom: solid 0.05em #cccccc;
}
#newsarea H1 A {
color : #336699;
text-align : right;
margin-bottom: 1px;
text-decoration : none;
}
#newsarea H1 A:HOVER {
text-align : right;
margin-bottom: 1px;
text-decoration : none;
font-weight : bold;
}
.newsheadline, .newsdate {
}
/* ----------------------------------------- */
/* Side Menu */
/* ----------------------------------------- */
#SIDE_MENU{
text-align : left;
}
#SIDE_MENU A{
text-decoration : none;
}
#SIDE_MENU DIV{
margin-top: 0.1em;
margin-bottom: 0.2em;
}
#SIDE_MENU H1{
text-align : left;
border-bottom: solid 0.05em #336699;
margin-bottom: 0.8em;
}
/* ----------------------------------------- */
/* News Menu */
/* ----------------------------------------- */
#NEWS_MENU{
text-align : left;
}
#NEWS_MENU A{
text-decoration : none;
}
#NEWS_MENU H1{
text-align : left;
border-bottom: solid 0.05em #336699;
}
/* ----------------------------------------- */
/* Footer Menu Bar */
/* ----------------------------------------- */
#FOOTER_MENU {
text-align : center;
padding: 0.4em;
}
/* ----------------------------------------- */
/* Footer */
/* ----------------------------------------- */
#FOOTER {
text-align : center;
}
/* ----------------------------------------- */
/* Top Slogan CSS */
/* ----------------------------------------- */
.SLOGAN {
color: #336699;
text-align: left;
font-weight: bold;
}
/* ----------------------------------------- */
/* News Box CSS */
/* ----------------------------------------- */
#NEWS_BOX {
text-align: left;
}
#contentarea h1 {
text-align : left;
margin-bottom: 1px;
border-bottom: solid 0.05em #cccccc;
}
.morelink {
text-decoration: underline;
vertical-align: text-top;
}
.newsheadline {
font-weight: bold;
margin-top: 0px;
margin-bottom: 0px
}
/* ----------------------------------------- */
/* added from sitemap.html */
/* ----------------------------------------- */
.sectiongroup {
margin-top: 2em;
margin-bottom: 2em;
}
.sectiontitle {
width: 100%;
font-size: 1.2em;
background-color: #cccccc;
}
.sectionitems li {
list-style-type: none;
}
=== Added File Products/ZopeOrg-NV/skins/nzo/folder_actions.js.dtml ===
// Actions used in the folder_contents view
function submitFolderAction(folderAction) {
document.folderContentsForm.action = document.folderContentsForm.action+'/'+folderAction;
document.folderContentsForm.submit();
}
function submitFilterAction() {
document.folderContentsForm.action = document.folderContentsForm.action+'/folder_contents';
filter_selection=document.getElementById('filter_selection');
for (var i =0; i < filter_selection.length; i++){
if (filter_selection.options[i].selected) {
if (filter_selection.options[i].value=='#') {
document.folderContentsForm.filter_state.value='clear_view_filter';
}
else {
document.folderContentsForm.filter_state.value='set_view_filter'
}
}
}
document.folderContentsForm.submit();
}
=== Added File Products/ZopeOrg-NV/skins/nzo/ieemu.js.py ===
from DateTime import DateTime
REQUEST=context.REQUEST
expires=DateTime()+7
last_modified=DateTime()-14
date_format = '%a, %d %b %Y %H:%M:%S'
REQUEST.RESPONSE.setHeader( 'content/type', 'text/css' )
REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )
REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.strftime(date_format) )
REQUEST.RESPONSE.setHeader( 'Expires', expires.strftime(date_format) )
return r"""var ie = document.all != null;
var moz = !ie && document.getElementById != null && document.layers == null;
/*
if (moz) { // set up ie environment for Moz
extendEventObject();
//emulateAttachEvent();
//emulateFromToElement();
emulateEventHandlers(["click", "dblclick", "mouseover", "mouseout",
"mousedown", "mouseup", "mousemove",
"keydown", "keypress", "keyup"]);
emulateDocumentAll();
emulateElement()
emulateCurrentStyle(["left", "right", "top", "bottom", "width", "height"]);
// Mozilla returns the wrong button number
Event.LEFT = 1;
Event.MIDDLE = 2;
Event.RIGHT = 3;
}
else {
Event = {};
// IE is returning wrong button number as well :-)
Event.LEFT = 1;
Event.MIDDLE = 4;
Event.RIGHT = 2;
}
*/
/*
* Extends the event object with srcElement, cancelBubble, returnValue,
* fromElement and toElement
*/
function extendEventObject() {
Event.prototype.__defineSetter__("returnValue", function (b) {
if (!b) this.preventDefault();
});
Event.prototype.__defineSetter__("cancelBubble", function (b) {
if (b) this.stopPropagation();
});
Event.prototype.__defineGetter__("srcElement", function () {
var node = this.target;
while (node.nodeType != 1) node = node.parentNode;
return node;
});
Event.prototype.__defineGetter__("fromElement", function () {
var node;
if (this.type == "mouseover")
node = this.relatedTarget;
else if (this.type == "mouseout")
node = this.target;
if (!node) return;
while (node.nodeType != 1) node = node.parentNode;
return node;
});
Event.prototype.__defineGetter__("toElement", function () {
var node;
if (this.type == "mouseout")
node = this.relatedTarget;
else if (this.type == "mouseover")
node = this.target;
if (!node) return;
while (node.nodeType != 1) node = node.parentNode;
return node;
});
Event.prototype.__defineGetter__("offsetX", function () {
return this.layerX;
});
Event.prototype.__defineGetter__("offsetY", function () {
return this.layerY;
});
}
/*
* Emulates element.attachEvent as well as detachEvent
*/
function emulateAttachEvent() {
HTMLDocument.prototype.attachEvent =
HTMLElement.prototype.attachEvent = function (sType, fHandler) {
var shortTypeName = sType.replace(/on/, "");
fHandler._ieEmuEventHandler = function (e) {
window.event = e;
return fHandler();
};
this.addEventListener(shortTypeName, fHandler._ieEmuEventHandler, false);
};
HTMLDocument.prototype.detachEvent =
HTMLElement.prototype.detachEvent = function (sType, fHandler) {
var shortTypeName = sType.replace(/on/, "");
if (typeof fHandler._ieEmuEventHandler == "function")
this.removeEventListener(shortTypeName, fHandler._ieEmuEventHandler, false);
else
this.removeEventListener(shortTypeName, fHandler, true);
};
}
/*
* This function binds the event object passed along in an
* event to window.event
*/
function emulateEventHandlers(eventNames) {
for (var i = 0; i < eventNames.length; i++) {
document.addEventListener(eventNames[i], function (e) {
window.event = e;
}, true); // using capture
}
}
/*
* Simple emulation of document.all
* this one is far from complete. Be cautious
*/
function emulateAllModel() {
var allGetter = function () {
var a = this.getElementsByTagName("*");
var node = this;
a.tags = function (sTagName) {
return node.getElementsByTagName(sTagName);
};
return a;
};
HTMLDocument.prototype.__defineGetter__("all", allGetter);
HTMLElement.prototype.__defineGetter__("all", allGetter);
}
function extendElementModel() {
HTMLElement.prototype.__defineGetter__("parentElement", function () {
if (this.parentNode == this.ownerDocument) return null;
return this.parentNode;
});
HTMLElement.prototype.__defineGetter__("children", function () {
var tmp = [];
var j = 0;
var n;
for (var i = 0; i < this.childNodes.length; i++) {
n = this.childNodes[i];
if (n.nodeType == 1) {
tmp[j++] = n;
if (n.name) { // named children
if (!tmp[n.name])
tmp[n.name] = [];
tmp[n.name][tmp[n.name].length] = n;
}
if (n.id) // child with id
tmp[n.id] = n
}
}
return tmp;
});
HTMLElement.prototype.contains = function (oEl) {
if (oEl == this) return true;
if (oEl == null) return false;
return this.contains(oEl.parentNode);
};
}
/*
document.defaultView.getComputedStyle(el1,<BR>null).getPropertyValue('top');
*/
function emulateCurrentStyle(properties) {
HTMLElement.prototype.__defineGetter__("currentStyle", function () {
var cs = {};
var el = this;
for (var i = 0; i < properties.length; i++) {
//cs.__defineGetter__(properties[i], function () {
// window.status = "i: " + i ;
// return document.defaultView.getComputedStyle(el, null).getPropertyValue(properties[i]);
//});
cs.__defineGetter__(properties[i], encapsulateObjects(el, properties[i]));
}
return cs;
});
}
// used internally for emualteCurrentStyle
function encapsulateObjects(el, sProperty) {
return function () {
return document.defaultView.getComputedStyle(el, null).getPropertyValue(sProperty);
};
}
function emulateHTMLModel() {
// This function is used to generate a html string for the text properties/methods
// It replaces '\n' with "<BR"> as well as fixes consecutive white spaces
// It also repalaces some special characters
function convertTextToHTML(s) {
s = s.replace(/\&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<BR>");
while (/\s\s/.test(s))
s = s.replace(/\s\s/, " ");
return s.replace(/\s/g, " ");
}
HTMLElement.prototype.insertAdjacentHTML = function (sWhere, sHTML) {
var df; // : DocumentFragment
var r = this.ownerDocument.createRange();
switch (String(sWhere).toLowerCase()) {
case "beforebegin":
r.setStartBefore(this);
df = r.createContextualFragment(sHTML);
this.parentNode.insertBefore(df, this);
break;
case "afterbegin":
r.selectNodeContents(this);
r.collapse(true);
df = r.createContextualFragment(sHTML);
this.insertBefore(df, this.firstChild);
break;
case "beforeend":
r.selectNodeContents(this);
r.collapse(false);
df = r.createContextualFragment(sHTML);
this.appendChild(df);
break;
case "afterend":
r.setStartAfter(this);
df = r.createContextualFragment(sHTML);
this.parentNode.insertBefore(df, this.nextSibling);
break;
}
};
HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) {
var r = this.ownerDocument.createRange();
r.setStartBefore(this);
var df = r.createContextualFragment(sHTML);
this.parentNode.replaceChild(df, this);
return sHTML;
});
HTMLElement.prototype.__defineGetter__("canHaveChildren", function () {
switch (this.tagName) {
case "AREA":
case "BASE":
case "BASEFONT":
case "COL":
case "FRAME":
case "HR":
case "IMG":
case "BR":
case "INPUT":
case "ISINDEX":
case "LINK":
case "META":
case "PARAM":
return false;
}
return true;
});
HTMLElement.prototype.__defineGetter__("outerHTML", function () {
var attr, attrs = this.attributes;
var str = "<" + this.tagName;
for (var i = 0; i < attrs.length; i++) {
attr = attrs[i];
if (attr.specified)
str += " " + attr.name + '="' + attr.value + '"';
}
if (!this.canHaveChildren)
return str + ">";
return str + ">" + this.innerHTML + "</" + this.tagName + ">";
});
HTMLElement.prototype.__defineSetter__("innerText", function (sText) {
this.innerHTML = convertTextToHTML(sText);
return sText;
});
var tmpGet;
HTMLElement.prototype.__defineGetter__("innerText", tmpGet = function () {
var r = this.ownerDocument.createRange();
r.selectNodeContents(this);
return r.toString();
});
HTMLElement.prototype.__defineSetter__("outerText", function (sText) {
this.outerHTML = convertTextToHTML(sText);
return sText;
});
HTMLElement.prototype.__defineGetter__("outerText", tmpGet);
HTMLElement.prototype.insertAdjacentText = function (sWhere, sText) {
this.insertAdjacentHTML(sWhere, convertTextToHTML(sText));
};
}"""
=== Added File Products/ZopeOrg-NV/skins/nzo/plone_javascripts.js.pt ===
<metal:block tal:replace="structure here/ieemu.js" />
if (moz) {
extendElementModel();
extendEventObject();
emulateEventHandlers(["mouseover", "mouseout"]);
}
<metal:block tal:replace="structure here/styley.js" />
function showDay(date) {
tempX = document.body.offsetWidth - event.x;
tempY = event.clientY + document.body.scrollTop;
document.getElementById('day' + date).style.pixelTop = tempY - 20;
document.getElementById('day' + date).style.pixelRight = tempX + 12;
document.getElementById('day' + date).style.visibility = 'visible';
return true;
}
function hideDay(date) {
document.getElementById('day' + date).style.visibility = 'hidden';
return true;
}
function formtooltip(el,flag){
elem = document.getElementById(el);
if (flag) {
elem.parentNode.parentNode.style.zIndex=1000;
elem.parentNode.parentNode.style.borderRight='0px solid #000';
// ugly , yes .. but neccesary to avoid a small but very annoying bug in IE6
elem.style.visibility='visible';
}
else {
elem.parentNode.parentNode.style.zIndex=1;
elem.parentNode.parentNode.style.border='none';
elem.style.visibility='hidden' };
}
<metal:block tal:replace="structure here/table_sort.js" />
<metal:block tal:replace="structure here/folder_actions.js" />
=== Added File Products/ZopeOrg-NV/skins/nzo/styley.js.dtml ===
// Copyright © 2001 by Apple Computer, Inc., All Rights Reserved.
//
// You may incorporate this Apple sample code into your own code
// without restriction. This Apple sample code has been provided "AS IS"
// and the responsibility for its operation is yours. You may redistribute
// this code, but you are not permitted to redistribute it as
// "Apple sample code" after having made changes.
// ugly workaround for missing support for selectorText in Netscape6/Mozilla
// call onLoad() or before you need to do anything you would have otherwise used
// selectorText for.
var ugly_selectorText_workaround_flag = false;
var allStyleRules;
// code developed using the following workaround (CVS v1.15) as an example.
// http://lxr.mozilla.org/seamonkey/source/extensions/xmlterm/ui/content/XMLTermCommands.js
function ugly_selectorText_workaround() {
if((navigator.userAgent.indexOf("Gecko") == -1) ||
(ugly_selectorText_workaround_flag)) {
return; // we've already been here or shouldn't be here
}
var styleElements = document.getElementsByTagName("style");
for(var i = 0; i < styleElements.length; i++) {
var styleText = styleElements[i].firstChild.data;
// this should be using match(/\b[\w-.]+(?=\s*\{)/g but ?= causes an
// error in IE5, so we include the open brace and then strip it
allStyleRules = styleText.match(/\b[\w-.]+(\s*\{)/g);
}
for(var i = 0; i < allStyleRules.length; i++) {
// probably insufficient for people who like random gobs of
// whitespace in their styles
allStyleRules[i] = allStyleRules[i].substr(0, (allStyleRules[i].length - 2));
}
ugly_selectorText_workaround_flag = true;
}
// setStyleById: given an element id, style property and
// value, apply the style.
// args:
// i - element id
// p - property
// v - value
//
function setStyleById(i, p, v) {
var n = document.getElementById(i);
n.style[p] = v;
}
// getStyleById: given an element ID and style property
// return the current setting for that property, or null.
// args:
// i - element id
// p - property
function getStyleById(i, p) {
var n = document.getElementById(i);
var s = eval("n.style." + p);
// try inline
if((s != "") && (s != null)) {
return s;
}
// try currentStyle
if(n.currentStyle) {
var s = eval("n.currentStyle." + p);
if((s != "") && (s != null)) {
return s;
}
}
// try styleSheets
var sheets = document.styleSheets;
if(sheets.length > 0) {
// loop over each sheet
for(var x = 0; x < sheets.length; x++) {
// grab stylesheet rules
var rules = sheets[x].cssRules;
if(rules.length > 0) {
// check each rule
for(var y = 0; y < rules.length; y++) {
var z = rules[y].style;
// selectorText broken in NS 6/Mozilla: see
// http://bugzilla.mozilla.org/show_bug.cgi?id=51944
ugly_selectorText_workaround();
if(allStyleRules) {
if(allStyleRules[y] == i) {
return z[p];
}
} else {
// use the native selectorText and style stuff
if(((z[p] != "") && (z[p] != null)) ||
(rules[y].selectorText == i)) {
return z[p];
}
}
}
}
}
}
return null;
}
// setStyleByClass: given an element type and a class selector,
// style property and value, apply the style.
// args:
// t - type of tag to check for (e.g., SPAN)
// c - class name
// p - CSS property
// v - value
var ie = (document.all) ? true : false;
function setStyleByClass(t,c,p,v){
var elements;
if(t == '*') {
// '*' not supported by IE/Win 5.5 and below
elements = (ie) ? document.all : document.getElementsByTagName('*');
} else {
elements = document.getElementsByTagName(t);
}
for(var i = 0; i < elements.length; i++){
var node = elements.item(i);
for(var j = 0; j < node.attributes.length; j++) {
if(node.attributes.item(j).nodeName == 'class') {
if(node.attributes.item(j).nodeValue == c) {
eval('node.style.' + p + " = '" +v + "'");
}
}
}
}
}
// getStyleByClass: given an element type, a class selector and a property,
// return the value of the property for that element type.
// args:
// t - element type
// c - class identifier
// p - CSS property
function getStyleByClass(t, c, p) {
// first loop over elements, because if they've been modified they
// will contain style data more recent than that in the stylesheet
var elements;
if(t == '*') {
// '*' not supported by IE/Win 5.5 and below
elements = (ie) ? document.all : document.getElementsByTagName('*');
} else {
elements = document.getElementsByTagName(t);
}
for(var i = 0; i < elements.length; i++){
var node = elements.item(i);
for(var j = 0; j < node.attributes.length; j++) {
if(node.attributes.item(j).nodeName == 'class') {
if(node.attributes.item(j).nodeValue == c) {
var theStyle = eval('node.style.' + p);
if((theStyle != "") && (theStyle != null)) {
return theStyle;
}
}
}
}
}
// if we got here it's because we didn't find anything
// try styleSheets
var sheets = document.styleSheets;
if(sheets.length > 0) {
// loop over each sheet
for(var x = 0; x < sheets.length; x++) {
// grab stylesheet rules
var rules = sheets[x].cssRules;
if(rules.length > 0) {
// check each rule
for(var y = 0; y < rules.length; y++) {
var z = rules[y].style;
// selectorText broken in NS 6/Mozilla: see
// http://bugzilla.mozilla.org/show_bug.cgi?id=51944
ugly_selectorText_workaround();
if(allStyleRules) {
if((allStyleRules[y] == c) ||
(allStyleRules[y] == (t + "." + c))) {
return z[p];
}
} else {
// use the native selectorText and style stuff
if(((z[p] != "") && (z[p] != null)) &&
((rules[y].selectorText == c) ||
(rules[y].selectorText == (t + "." + c)))) {
return z[p];
}
}
}
}
}
}
return null;
}
// setStyleByTag: given an element type, style property and
// value, and whether the property should override inline styles or
// just global stylesheet preferences, apply the style.
// args:
// e - element type or id
// p - property
// v - value
// g - boolean 0: modify global only; 1: modify all elements in document
function setStyleByTag(e, p, v, g) {
if(g) {
var elements = document.getElementsByTagName(e);
for(var i = 0; i < elements.length; i++) {
elements.item(i).style[p] = v;
}
} else {
var sheets = document.styleSheets;
if(sheets.length > 0) {
for(var i = 0; i < sheets.length; i++) {
var rules = sheets[i].cssRules;
if(rules.length > 0) {
for(var j = 0; j < rules.length; j++) {
var s = rules[j].style;
// selectorText broken in NS 6/Mozilla: see
// http://bugzilla.mozilla.org/show_bug.cgi?id=51944
ugly_selectorText_workaround();
if(allStyleRules) {
if(allStyleRules[j] == e) {
s[p] = v;
}
} else {
// use the native selectorText and style stuff
if(((s[p] != "") && (s[p] != null)) &&
(rules[j].selectorText == e)) {
s[p] = v;
}
}
}
}
}
}
}
}
// getStyleByTag: given an element type and style property, return
// the property's value
// args:
// e - element type
// p - property
function getStyleByTag(e, p) {
var sheets = document.styleSheets;
if(sheets.length > 0) {
for(var i = 0; i < sheets.length; i++) {
var rules = sheets[i].cssRules;
if(rules.length > 0) {
for(var j = 0; j < rules.length; j++) {
var s = rules[j].style;
// selectorText broken in NS 6/Mozilla: see
// http://bugzilla.mozilla.org/show_bug.cgi?id=51944
ugly_selectorText_workaround();
if(allStyleRules) {
if(allStyleRules[j] == e) {
return s[p];
}
} else {
// use the native selectorText and style stuff
if(((s[p] != "") && (s[p] != null)) &&
(rules[j].selectorText == e)) {
return s[p];
}
}
}
}
}
}
// if we don't find any style sheets, return the value for the first
// element of this type we encounter without a CLASS or STYLE attribute
var elements = document.getElementsByTagName(e);
var sawClassOrStyleAttribute = false;
for(var i = 0; i < elements.length; i++) {
var node = elements.item(i);
for(var j = 0; j < node.attributes.length; j++) {
if((node.attributes.item(j).nodeName == 'class') ||
(node.attributes.item(j).nodeName == 'style')){
sawClassOrStyleAttribute = true;
}
}
if(! sawClassOrStyleAttribute) {
return elements.item(i).style[p];
}
}
}
=== Added File Products/ZopeOrg-NV/skins/nzo/table_sort.js.dtml ===
// Table sorter script, thanks to Geir Bækholt for this.
// DOM table sorter originally made by Paul Sowden
var tablename = 'sortable'
function compare(a,b)
{
au = new String(a);
bu = new String(b);
if (au.charAt(4) != '-' && au.charAt(7) != '-')
{
var an = parseFloat(au)
var bn = parseFloat(bu)
}
if (isNaN(an) || isNaN(bn))
{as = au.toLowerCase()
bs = bu.toLowerCase()
if (as > bs)
{return 1;}
else
{return -1;}
}
else {
return an - bn;
}
}
function getConcatenedTextContent(node) {
var _result = "";
if (node == null) {
return _result;
}
var childrens = node.childNodes;
var i = 0;
while (i < childrens.length) {
var child = childrens.item(i);
switch (child.nodeType) {
case 1: // ELEMENT_NODE
case 5: // ENTITY_REFERENCE_NODE
_result += getConcatenedTextContent(child);
break;
case 3: // TEXT_NODE
case 2: // ATTRIBUTE_NODE
case 4: // CDATA_SECTION_NODE
_result += child.nodeValue;
break;
case 6: // ENTITY_NODE
case 7: // PROCESSING_INSTRUCTION_NODE
case 8: // COMMENT_NODE
case 9: // DOCUMENT_NODE
case 10: // DOCUMENT_TYPE_NODE
case 11: // DOCUMENT_FRAGMENT_NODE
case 12: // NOTATION_NODE
// skip
break;
}
i ++;
}
return _result;
}
function sort(e) {
var el = window.event ? window.event.srcElement : e.currentTarget;
// a pretty ugly sort function, but it works nonetheless
var a = new Array();
//var name = el.firstChild.nodeValue || el.parentNode.firstChild.nodeValue;
// check if the image or the th is clicked. Proceed to parent id it is the image
if (el.nodeName == 'IMG') el = el.parentNode;
var name = el.firstChild.nodeValue;
var dad = el.parentNode;
var node;
// kill all arrows
for (var im = 0; (node = dad.getElementsByTagName("th").item(im)); im++) {
if (node.lastChild.nodeName == 'IMG')
{
var arrow = node.lastChild
node.removeChild(arrow)
}
}
for (var i = 0; (node = dad.getElementsByTagName("th").item(i)); i++) {
if (node.firstChild.nodeValue == name){
newarrow = document.createElement('IMG');
newarrow.setAttribute('src','arrowUp.gif');
node.appendChild(newarrow);
break}
}
var tbody = dad.parentNode.parentNode.getElementsByTagName("tbody").item(0);
for (var j = 0; (node = tbody.getElementsByTagName("tr").item(j)); j++) {
// crude way to sort by surname and name after first choice
a[j] = new Array();
a[j][0] = getConcatenedTextContent(node.getElementsByTagName("td").item(i));
a[j][1] = getConcatenedTextContent(node.getElementsByTagName("td").item(1));
a[j][2] = getConcatenedTextContent(node.getElementsByTagName("td").item(0));
a[j][3] = node;
}
if (a.length > 1) {
a.sort(compare);
// not a perfect way to check, but hell, it suits me fine
if (a[0][0] == getConcatenedTextContent(tbody.getElementsByTagName("tr").item(0).getElementsByTagName("td").item(i))
&& a[1][0] == getConcatenedTextContent(tbody.getElementsByTagName("tr").item(1).getElementsByTagName("td").item(i)))
{a.reverse();
el.getElementsByTagName('img').item(0).setAttribute('src','arrowDown.gif');
}
}
for (var j = 0; j < a.length; j++) {
tbody.appendChild(a[j][3]);
}
}
function init(e) {
if (document.getElementById(tablename))
{
var thead = document.getElementById(tablename).getElementsByTagName("thead").item(0);
var node;
for (var i = 0; (node = thead.getElementsByTagName("th").item(i)); i++) {
if (node.addEventListener) node.addEventListener("click",sort,false);
else if (node.attachEvent) node.attachEvent("onclick",sort);
}
}
}
// initialize the sorter functions
// add stuff to secure it from broken DOM-implanetations or missing objects.
// p.appendChild(document.createTextNode("Change sorting by clicking on each individual heading."));
// document.getElementById(tablename).parentNode.insertBefore(p,document.getElementById(tablename));
if (window.addEventListener) window.addEventListener("load",init,false);
else if (window.attachEvent) window.attachEvent("onload",init);
=== Products/ZopeOrg-NV/skins/nzo/main_template.html 1.9 => 1.10 ===
workflow_actions actions/workflow;
">
+
<head>
<title tal:define="ob_title here/Title; portal_title container/title"
@@ -39,6 +40,11 @@
@import "nzoStructure.css";
@import "css_default.css";
</style>
+
+ <script language="javascript"
+ type="text/javascript"
+ tal:content="structure here/plone_javascripts.js">
+ </script>
</head>
=== Products/ZopeOrg-NV/skins/nzo/nzoBasic.css.dtml 1.1 => 1.2 ===
table {
- font: &dtml-mainFont;;
+ font: &dtml-contentFont;;
}
=== Products/ZopeOrg-NV/skins/nzo/stylesheet_properties.props 1.1 => 1.2 ===
-mainFont:string=1em Tahoma, Helvetica, Arial, sans-serif
+mainFont:string=0.8em Tahoma, Helvetica, Arial, sans-serif
mainBackground:string=White
mainFontColor:string=Black
-mainLinkColor:string=#436976
+mainLinkColor:string=#336699
mainTabBorderColor:string=#8CACBB
mainTabBorderColorSelected:string=#8CACBB
mainTabBackground:string=#DEE7EC
@@ -43,7 +43,7 @@
oddRowBackground:string=transparent
groupBorder:string=1px solid #8cacbb
requiredField:string=url(required.gif) 2em no-repeat
-inputFont:string=bold 0.8em Tahoma, Helvetica, Arial, sans-serif
+inputFont:string=bold 1em Tahoma, Helvetica, Arial, sans-serif
inputBorder:string=1px solid #8cacbb
contextButtonBackground:string=White url(linkTransparent.gif) left no-repeat
contextButtonPadding:string=1px 1px 1px 15px
@@ -57,14 +57,14 @@
boxHeaderFontColor:string=Black
boxLinkBackground:string=url(linkTransparent.gif) -0.5em 0px no-repeat
boxLinkColor:string=#436976
-boxEvenBackground:string=#F7F9FA
+boxEvenBackground:string=#99CCFF
boxOddBackground:string=transparent
boxHighlight:string=2px solid #FFA500
-listingBorder:string=1px solid #8CACBB
-listingHeaderBackground:string=#DEE7EC
+listingBorder:string=1px solid #336699
+listingHeaderBackground:string=#CCCCCC
listingHeaderFontColor:string=Black
listingLinkHover:string=underline
-listingEvenBackground:string=#F7F9FA
+listingEvenBackground:string=#DDDDFF
listingOddBackground:string=transparent
topBackground:string=transparent
topMargin:string=0
=== Removed File Products/ZopeOrg-NV/skins/nzo/css_default.css ===
More information about the zopeorg-checkins
mailing list