[Openfirst-cvscommit] SF.net SVN: openfirst: [170] trunk/src/style
Brought to you by:
xtimg
From: <ast...@us...> - 2006-06-21 18:26:15
|
Revision: 170 Author: astronouth7303 Date: 2006-06-21 11:26:09 -0700 (Wed, 21 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=170&view=rev Log Message: ----------- Tweaking slug appearance. Modified Paths: -------------- trunk/src/includes/skinfunctions.php trunk/src/style/slugs.css trunk/src/style/slugs.js Modified: trunk/src/includes/skinfunctions.php =================================================================== --- trunk/src/includes/skinfunctions.php 2006-06-21 15:49:15 UTC (rev 169) +++ trunk/src/includes/skinfunctions.php 2006-06-21 18:26:09 UTC (rev 170) @@ -35,7 +35,7 @@ $eimage = htmlentities($StylePath).'/images/slug.gif'; // Image source: http://www.onescience.com/forum/images/slug_125.gif //onclick=\"handleSlugClick(this)\" - echo "<div class=\"slug\"><img src=\"{$eimage}\" alt=\"(SLUG)\" title=\"Show slug\" /><span>{$eslug}</span></div>"; + echo "<span class=\"slug\"><img src=\"{$eimage}\" alt=\"(SLUG)\" title=\"Show slug\" /><span>{$eslug}</span></span>"; } /** Prints out the URI for a slug. @@ -66,4 +66,4 @@ # } -?> \ No newline at end of file +?> Modified: trunk/src/style/slugs.css =================================================================== --- trunk/src/style/slugs.css 2006-06-21 15:49:15 UTC (rev 169) +++ trunk/src/style/slugs.css 2006-06-21 18:26:09 UTC (rev 170) @@ -1,9 +1,11 @@ .slug { + border: thin solid red; /* debug */ +/* display:block;*/ +/* float: left;*/ margin: .2em; - float: left; - /* Set font size, etc. to normal */ -/* border: solid red; - padding: .1em;*/ + overflow: visible; + width: 18px; /* Change with image */ + height: 15px; /* Change with image */ } .slug > * { vertical-align: middle; @@ -13,13 +15,23 @@ border: none; } .slug > span { - display: none; - border: thin solid silver; - height: 15px; /* Change with image */ - line-height: 15px; - margin-left: 2px; - padding: 0 2px; +/* visibility: hidden;*/ + border: thin solid silver; + background: white; + height: 15px; /* Change with image */ + line-height: 15px; + margin-left: 2px; + padding: 0 2px; + z-index: 50; +/* position: relative; +/* left: 18px; /* Change with image */ +/* top: -15px; /* Change with line-height */ } + +/*.slug.expand > span { + display: inline; +}*/ + /*.slug > img:active + span, .slug > img:focus + span, .slug:focus > span, Modified: trunk/src/style/slugs.js =================================================================== --- trunk/src/style/slugs.js 2006-06-21 15:49:15 UTC (rev 169) +++ trunk/src/style/slugs.js 2006-06-21 18:26:09 UTC (rev 170) @@ -1,17 +1,21 @@ +// vim:syn=php +// <?php + // Pass this the DOM event function handleSlugClick(evt) { - var obj = evt.target; - if (obj.parentNode.className != 'slug') return; - var target = obj.nextSibling; - if (target.style.display == "none") { - target.style.display = "inline"; - } else if (target.style.display == "inline") { - target.style.display = "none"; - } else { - target.style.display = "inline"; - } + disp = 'visible'; + var obj = evt.target; + if (obj.parentNode.className != 'slug') return; + var target = obj.nextSibling; + if (target.style.visibility == disp) { + target.style.visibility = "hidden"; + target.title = "Show slug"; + } else { + target.style.visibility = disp; + target.title = "Hide slug"; + } } document.documentElement.addEventListener('click', handleSlugClick, true); -// TODO: Add support for non-JS browsers \ No newline at end of file +// TODO: Add support for non-JS browsers This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |