[Picfinity-commit] SF.net SVN: picfinity: [5] .themes/ajax
Status: Beta
Brought to you by:
espadav8
From: <esp...@us...> - 2007-07-18 12:31:13
|
Revision: 5 http://picfinity.svn.sourceforge.net/picfinity/?rev=5&view=rev Author: espadav8 Date: 2007-07-18 05:31:15 -0700 (Wed, 18 Jul 2007) Log Message: ----------- Add a folder icon to the breadcrumb trail Modified Paths: -------------- .themes/ajax/ajax.css .themes/ajax/ajax.js Modified: .themes/ajax/ajax.css =================================================================== --- .themes/ajax/ajax.css 2007-07-18 12:02:03 UTC (rev 4) +++ .themes/ajax/ajax.css 2007-07-18 12:31:15 UTC (rev 5) @@ -165,35 +165,16 @@ background: #ffd0d0; } -div.stack .folder span.name:hover -{ - color: #fff; -} - -#breadcrumbtrail ul li:hover, div.stack .folder:hover, .folder span.image:hover, -.thumbnail span.image:hover +.thumbnail span.image:hover, +#breadcrumbtrail ul li:hover { background: #606060; cursor: pointer; } - - - - - - - - - - - - - - /* --- breadcrumb --- */ #breadcrumbtrail @@ -218,19 +199,34 @@ #breadcrumbtrail ul li { - height: 14px; - padding: 3px 0 3px 10px; - width: 140px; + height: 18px; + padding: 3px 0 3px 5px; + width: 145px; } #breadcrumbtrail ul li ul { display: none; - margin: 2px 0 -1px -11px; + margin: 21px 0 -1px -6px; position: fixed; z-index: 10; } +#breadcrumbtrail ul li .name +{ + float: left; + border: none; + text-align: left; + padding: 3px 0 3px 5px; +} + +#breadcrumbtrail ul li .icon +{ + position: static; + float: left; + margin: -3px 0 0 0; +} + #breadcrumbtrail ul li ul li:hover { background: #303030; Modified: .themes/ajax/ajax.js =================================================================== --- .themes/ajax/ajax.js 2007-07-18 12:02:03 UTC (rev 4) +++ .themes/ajax/ajax.js 2007-07-18 12:31:15 UTC (rev 5) @@ -481,9 +481,38 @@ // these will all be hidden until the :hover if (node.nodeName == "folder") { + var dropMenuLi = document.createElement("li"); dropMenuLi.setAttribute("id", node.getAttribute("id")); - dropMenuLi.setAttribute("onclick", "openFolder(this)"); + + if (node.hasChildNodes()) + { + dropMenuLi.setAttribute("onclick", "openFolder(this)"); + + // create a span for the folder icon + var iconSpan = document.createElement("span"); + iconSpan.setAttribute("class", "icon"); + + // create the icon image + var iconImage = document.createElement("img"); + iconImage.setAttribute("src", ".themes/ajax/foldericon.png"); + iconSpan.appendChild(iconImage); + dropMenuLi.appendChild(iconSpan); + } + else + { + dropMenuLi.setAttribute("class", "folder empty"); + + // create a span for the folder icon + var iconSpan = document.createElement("span"); + iconSpan.setAttribute("class", "icon"); + + // create the icon image + var iconImage = document.createElement("img"); + iconImage.setAttribute("src", ".themes/ajax/emptyicon.png"); + iconSpan.appendChild(iconImage); + dropMenuLi.appendChild(iconSpan); + } // we do this so we can show the user the currently selected folder in the drop down if (node.getAttribute("name") == currentFolder) @@ -494,7 +523,10 @@ { dropMenuLi.setAttribute("class", "menuentry"); } - dropMenuLi.appendChild(document.createTextNode(node.getAttribute("name"))); + var nameSpan = document.createElement("span"); + nameSpan.setAttribute("class", "name"); + nameSpan.appendChild(document.createTextNode(node.getAttribute("name"))); + dropMenuLi.appendChild(nameSpan); dropMenu.appendChild(dropMenuLi); } @@ -502,8 +534,23 @@ // this is for the current folder if ((node.nodeName == "folder") && (node.getAttribute("name") == currentFolder)) { - menuLi.insertBefore(document.createTextNode(node.getAttribute("name")), menuLi.firstChild); + var nameSpan = document.createElement("span"); + nameSpan.setAttribute("class", "name"); + nameSpan.appendChild(document.createTextNode(node.getAttribute("name"))); + // create a span for the folder icon + var iconSpan = document.createElement("span"); + iconSpan.setAttribute("class", "icon"); + + // create the icon image + var iconImage = document.createElement("img"); + iconImage.setAttribute("src", ".themes/ajax/foldericon.png"); + iconSpan.appendChild(iconImage); + dropMenuLi.appendChild(iconSpan); + + menuLi.insertBefore(nameSpan, menuLi.firstChild); + menuLi.insertBefore(iconSpan, menuLi.firstChild); + breadcrumbEntry.appendChild(menuLi); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |