[Yanel-commits] rev 22818 - in public/yanel/trunk/src/webapp: .
toolbar
michi at wyona.com
michi at wyona.com
Wed Feb 21 10:08:17 CET 2007
Author: michi
Date: 2007-02-21 10:08:15 +0100 (Wed, 21 Feb 2007)
New Revision: 22818
Added:
public/yanel/trunk/src/webapp/toolbar/
public/yanel/trunk/src/webapp/toolbar/csshover.htc
public/yanel/trunk/src/webapp/toolbar/ie6.css
public/yanel/trunk/src/webapp/toolbar/index.html
public/yanel/trunk/src/webapp/toolbar/toolbar.css
public/yanel/trunk/src/webapp/toolbar/yanel_toolbar_logo.png
Log:
toolbar added
Added: public/yanel/trunk/src/webapp/toolbar/csshover.htc
===================================================================
--- public/yanel/trunk/src/webapp/toolbar/csshover.htc 2007-02-21 08:41:38 UTC (rev 22817)
+++ public/yanel/trunk/src/webapp/toolbar/csshover.htc 2007-02-21 09:08:15 UTC (rev 22818)
@@ -0,0 +1,120 @@
+<attach event="ondocumentready" handler="parseStylesheets" />
+<script>
+/**
+ * Whatever:hover - V1.42.060206 - hover & active
+ * ------------------------------------------------------------
+ * (c) 2005 - Peter Nederlof
+ * Peterned - http://www.xs4all.nl/~peterned/
+ * License - http://creativecommons.org/licenses/LGPL/2.1/
+ *
+ * Whatever:hover is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Whatever:hover is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Credits and thanks to:
+ * Arnoud Berendsen, Martin Reurings, Robert Hanson
+ *
+ * howto: body { behavior:url("csshover.htc"); }
+ * ------------------------------------------------------------
+ */
+
+var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
+currentSheet, doc = window.document, hoverEvents = [], activators = {
+ onhover:{on:'onmouseover', off:'onmouseout'},
+ onactive:{on:'onmousedown', off:'onmouseup'}
+}
+
+function parseStylesheets() {
+ if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
+ window.attachEvent('onunload', unhookHoverEvents);
+ var sheets = doc.styleSheets, l = sheets.length;
+ for(var i=0; i<l; i++)
+ parseStylesheet(sheets[i]);
+}
+ function parseStylesheet(sheet) {
+ if(sheet.imports) {
+ try {
+ var imports = sheet.imports, l = imports.length;
+ for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
+ } catch(securityException){}
+ }
+
+ try {
+ var rules = (currentSheet = sheet).rules, l = rules.length;
+ for(var j=0; j<l; j++) parseCSSRule(rules[j]);
+ } catch(securityException){}
+ }
+
+ function parseCSSRule(rule) {
+ var select = rule.selectorText, style = rule.style.cssText;
+ if(!csshoverReg.test(select) || !style) return;
+
+ var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
+ var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
+ var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
+ var affected = select.replace(/:(hover|active).*$/, '');
+ var elements = getElementsBySelect(affected);
+ if(elements.length == 0) return;
+
+ currentSheet.addRule(newSelect, style);
+ for(var i=0; i<elements.length; i++)
+ new HoverElement(elements[i], className, activators[pseudo]);
+ }
+
+function HoverElement(node, className, events) {
+ if(!node.hovers) node.hovers = {};
+ if(node.hovers[className]) return;
+ node.hovers[className] = true;
+ hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
+ hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
+}
+ function hookHoverEvent(node, type, handler) {
+ node.attachEvent(type, handler);
+ hoverEvents[hoverEvents.length] = {
+ node:node, type:type, handler:handler
+ };
+ }
+
+ function unhookHoverEvents() {
+ for(var e,i=0; i<hoverEvents.length; i++) {
+ e = hoverEvents[i];
+ e.node.detachEvent(e.type, e.handler);
+ }
+ }
+
+function getElementsBySelect(rule) {
+ var parts, nodes = [doc];
+ parts = rule.split(' ');
+ for(var i=0; i<parts.length; i++) {
+ nodes = getSelectedNodes(parts[i], nodes);
+ } return nodes;
+}
+ function getSelectedNodes(select, elements) {
+ var result, node, nodes = [];
+ var identify = (/\#([a-z0-9_-]+)/i).exec(select);
+ if(identify) {
+ var element = doc.getElementById(identify[1]);
+ return element? [element]:nodes;
+ }
+
+ var classname = (/\.([a-z0-9_-]+)/i).exec(select);
+ var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
+ var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
+ for(var i=0; i<elements.length; i++) {
+ result = tagName? elements[i].all.tags(tagName):elements[i].all;
+ for(var j=0; j<result.length; j++) {
+ node = result[j];
+ if(classReg && !classReg.test(node.className)) continue;
+ nodes[nodes.length] = node;
+ }
+ }
+
+ return nodes;
+ }
+</script>
\ No newline at end of file
Property changes on: public/yanel/trunk/src/webapp/toolbar/csshover.htc
___________________________________________________________________
Name: svn:executable
+ *
Added: public/yanel/trunk/src/webapp/toolbar/ie6.css
===================================================================
--- public/yanel/trunk/src/webapp/toolbar/ie6.css 2007-02-21 08:41:38 UTC (rev 22817)
+++ public/yanel/trunk/src/webapp/toolbar/ie6.css 2007-02-21 09:08:15 UTC (rev 22818)
@@ -0,0 +1,7 @@
+html {
+ overflow:hidden;
+ }
+body {
+ height:100%;
+ overflow:auto;
+ }
Property changes on: public/yanel/trunk/src/webapp/toolbar/ie6.css
___________________________________________________________________
Name: svn:executable
+ *
Added: public/yanel/trunk/src/webapp/toolbar/index.html
===================================================================
--- public/yanel/trunk/src/webapp/toolbar/index.html 2007-02-21 08:41:38 UTC (rev 22817)
+++ public/yanel/trunk/src/webapp/toolbar/index.html 2007-02-21 09:08:15 UTC (rev 22818)
@@ -0,0 +1,104 @@
+<html lang="en">
+<head>
+
+
+
+<link type="text/css" href="toolbar.css" rel="stylesheet"/>
+<!--[if gte IE 6]>
+ <link rel="stylesheet" href="ie6.css" type="text/css">
+ <style type="text/css" media="screen">
+ #menu{float:none;} /* This is required for IE to avoid positioning bug when placing content first in source. */
+ /* IE Menu CSS */
+ /* csshover.htc file version: V1.21.041022 - Available for download from: http://www.xs4all.nl/~peterned/csshover.html */
+ body{behavior:url(csshover.htc);
+ font-size:100%; /* to enable text resizing in IE */
+ }
+ #menu ul li{float:left;width:100%;}
+ </style>
+<![endif]-->
+
+
+
+
+
+
+
+
+</head>
+<body>
+
+
+<!-- START TOOLBAR -->
+<div id="headerwrap">
+ <div id="menu">
+ <ul>
+ <li>
+ <h2>File</h2>
+ <ul>
+ <li><a href="">New</a>
+ <ul>
+ <li><a href="">HTML Page</a></li>
+ <li><a href="">Wiki Page</a></li>
+ <li><a href="">Calendar</a></li>
+ </ul>
+ </li>
+ <li>Logout</li>
+ </ul>
+ </li>
+ </ul>
+
+
+ <ul>
+ <li>
+ <h2>Edit</h2>
+ <ul>
+ <li><a href="" id="seotip" class="x">Open</a><ul>
+ <li><a href="">With WYSIWYG</a></li>
+ <li><a href="">With Form</a></li>
+ </ul>
+ </li>
+ <li>Revisions
+ <ul>
+ <li>53534
+ <ul>
+ <li>Show diff</li>
+ <li>Revert To</li>
+ </ul>
+ </li>
+ <li>75679
+ <ul>
+ <li>Show diff</li>
+ <li>Revert To</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+
+ <ul>
+ <li>
+ <h2>Help</h2>
+
+ <ul>
+ <li><a href="" id="tcss">About</a></li>
+ </ul>
+ </li>
+ </ul>
+</div>
+
+ <img src="yanel_toolbar_logo.png" id="toolbar_logo"/>
+
+</div>
+<!-- END TOOLBAR -->
+
+
+
+
+<div id="middlewrap">
+HELLO ACTUAL CONTENT ...
+</div>
+
+</body>
+</html>
Property changes on: public/yanel/trunk/src/webapp/toolbar/index.html
___________________________________________________________________
Name: svn:executable
+ *
Added: public/yanel/trunk/src/webapp/toolbar/toolbar.css
===================================================================
--- public/yanel/trunk/src/webapp/toolbar/toolbar.css 2007-02-21 08:41:38 UTC (rev 22817)
+++ public/yanel/trunk/src/webapp/toolbar/toolbar.css 2007-02-21 09:08:15 UTC (rev 22818)
@@ -0,0 +1,175 @@
+body,
+html{
+ margin:0;
+ padding:0;
+}
+body {
+ min-width:720px; /* Prevent content from becoming unreachable in Gecko */
+}
+/* position:absolute for all browsers - the whole page scrolls */
+div#headerwrap {
+ position:absolute;
+ width:100%;
+ top:0;
+ left:0;
+ height:24px;
+ margin:0 auto;
+border-right-width:20px;
+}
+/* position:fixed for modern browsers - header and footer do not scroll */
+body>div#headerwrap {
+ position:fixed;
+}
+
+/* set a left margin to compensate for IE/Win always making room for a scrollbar */
+div#middlewrap {
+/* set left margin and bottom padding for IE5/Win */
+ padding:20px 0 0 0;
+ margin-left:0;
+/* set left margin and bottom padding for others */
+
+ margin-left:16px;
+
+}
+/* set left margin for modern browsers */
+body>div#middlewrap {
+ margin-left:0;
+}
+
+
+
+/* Styling rules to make this demo page look nice. */
+
+div#headerwrap{
+ background:slategray;
+ color:#eee;
+ border-bottom:1px solid #444444;
+}
+/* toolbar style ends here */
+
+#toolbar_logo{
+ position: absolute;
+ right:15px;
+ float:right;
+ top:0px;
+}
+
+
+
+/* menu style starts here */
+#menu{
+width:100%;
+float:left;
+margin-top:4px;
+margin-left:4px;
+text-align:left;
+}
+
+#menu a, #menu h2{
+display:block;
+color:#000;
+white-space:nowrap;
+margin:0;
+padding:1px 0 1px 3px;
+}
+
+#menu a{
+background:#eee;
+text-decoration:none;
+}
+
+#menu a, #menu a:visited{
+color:#000;
+}
+
+#menu a:hover{
+color:#000;
+background:#ddd;
+}
+
+#menu a:active{
+color:#060;
+background:#ccc;
+}
+
+#menu ul{
+left:0px;
+list-style:none;
+margin:0;
+padding:0;
+float:left;
+width:9em;
+}
+
+#menu li{
+position:relative;
+margin:0;
+padding:0;
+}
+
+#menu ul ul{
+position:absolute;
+z-index:500;
+top:auto;
+display:none;
+}
+
+#menu ul ul ul{
+top:0;
+left:100%;
+}
+
+/* Begin non-anchor hover selectors */
+
+/* Enter the more specific element (div) selector
+on non-anchor hovers for IE5.x to comply with the
+older version of csshover.htc - V1.21.041022. It
+improves IE's performance speed to use the older
+file and this method */
+
+div#menu h2:hover,div#menu ul:hover{
+color:#000;
+background:#ddd;
+}
+
+div#menu li:hover{
+cursor:pointer;
+z-index:100;
+}
+
+div#menu li:hover ul ul,
+div#menu li li:hover ul ul,
+div#menu li li li:hover ul ul,
+div#menu li li li li:hover ul ul
+{display:none;}
+
+div#menu li:hover ul,
+div#menu li li:hover ul,
+div#menu li li li:hover ul,
+div#menu li li li li:hover ul
+{display:block;}
+
+/* End of non-anchor hover selectors */
+
+/* Styling for Expand */
+
+#menu a.x, #menu a.x:visited{
+font-weight:bold;
+color:#000;
+background:#eee;
+}
+
+#menu a.x:hover{
+color:#a00;
+background:#ddd;
+}
+
+#menu a.x:active{
+color:#060;
+background:#ccc;
+}
+
+#menu h2, #menu a{
+ height:1%;
+ font:normal 10px "lucida grande", tahoma, verdana, arial, sans-serif;
+}
\ No newline at end of file
Property changes on: public/yanel/trunk/src/webapp/toolbar/toolbar.css
___________________________________________________________________
Name: svn:executable
+ *
Added: public/yanel/trunk/src/webapp/toolbar/yanel_toolbar_logo.png
===================================================================
(Binary files differ)
Property changes on: public/yanel/trunk/src/webapp/toolbar/yanel_toolbar_logo.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
More information about the Yanel-commits
mailing list