[Openfirst-cvscommit] SF.net SVN: openfirst: [183] trunk/src
Brought to you by:
xtimg
From: <ast...@us...> - 2006-06-22 22:07:15
|
Revision: 183 Author: astronouth7303 Date: 2006-06-22 15:07:08 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=183&view=rev Log Message: ----------- Fixed slug ads. Weird things happening, though. Modified Paths: -------------- trunk/src/includes/skinfunctions.php trunk/src/index.php trunk/src/style/slugs.css trunk/src/style/slugs.js Modified: trunk/src/includes/skinfunctions.php =================================================================== --- trunk/src/includes/skinfunctions.php 2006-06-22 17:01:36 UTC (rev 182) +++ trunk/src/includes/skinfunctions.php 2006-06-22 22:07:08 UTC (rev 183) @@ -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 "<span class=\"slug\"><img src=\"{$eimage}\" alt=\"(SLUG)\" title=\"Show slug\" /><span>{$eslug}</span></span>"; + echo "<span class=\"slug\"><img src=\"{$eimage}\" alt=\"(SLUG)\" title=\"Show slug\" /><span class=\"hide\">{$eslug}</span></span>"; } /** Prints out the URI for a slug. Modified: trunk/src/index.php =================================================================== --- trunk/src/index.php 2006-06-22 17:01:36 UTC (rev 182) +++ trunk/src/index.php 2006-06-22 22:07:08 UTC (rev 183) @@ -35,8 +35,7 @@ $count = 0; global $Modules; ?> - <h1>openFIRST Web Portal</h1> - <?php slug('slug:/'); ?> + <h1>openFIRST Web Portal <?php slug('slug:/'); ?></h1> <table> <tr> <?php @@ -124,4 +123,4 @@ echo(" </td></tr></table>"); include($ogFooter); -?> \ No newline at end of file +?> Modified: trunk/src/style/slugs.css =================================================================== --- trunk/src/style/slugs.css 2006-06-22 17:01:36 UTC (rev 182) +++ trunk/src/style/slugs.css 2006-06-22 22:07:08 UTC (rev 183) @@ -1,52 +1,47 @@ .slug { - border: thin solid red; /* debug */ -/* display:block;*/ /* float: left;*/ margin: .2em; overflow: visible; - width: 18px; /* Change with image */ - height: 15px; /* Change with image */ + position: relative; + vertical-align: top; + height: 15px; /* change with image */ + line-height: 15px; /* change with image */ } .slug > * { - vertical-align: middle; + vertical-align: top; } .slug > img { cursor: pointer; border: none; } .slug > span { -/* visibility: hidden;*/ - border: thin solid silver; - background: white; - height: 15px; /* Change with image */ + border: 1px solid silver; + background: #DDD; 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 */ + position: absolute; + top: 0; + left: 20px; /* Change with image: img width + margin left */ + height: auto; + width: auto; + right: auto; + white-space: nowrap; + + /* Match normal formatting, so that putting it in eg headers has no effect. */ + font-family: sans-serif; + font-size: 12px; + font-weight: normal; + font-style: normal; + font-variant: normal; + text-decoration: none; } -/*.slug.expand > span { +.slug > span.show { display: inline; -}*/ +} -/*.slug > img:active + span, -.slug > img:focus + span, -.slug:focus > span, -.slug:active > span { - display: inline; -}*/ - -/*.slug > img:hover + span, -.slug:hover > span { - display: inline; -}*/ - -/*.slug > span:selection { - display: inline; +.slug > span.hide { + display: none; } -.slug > span::selection { - display: inline; -}*/ Modified: trunk/src/style/slugs.js =================================================================== --- trunk/src/style/slugs.js 2006-06-22 17:01:36 UTC (rev 182) +++ trunk/src/style/slugs.js 2006-06-22 22:07:08 UTC (rev 183) @@ -3,16 +3,15 @@ // Pass this the DOM event function handleSlugClick(evt) { - 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"; + if (target.className == 'show') { + target.className = "hide"; + obj.title = "Show slug"; } else { - target.style.visibility = disp; - target.title = "Hide slug"; + target.className = "show"; + obj.title = "Hide slug"; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |