# HG changeset patch # User Dan # Date 1183863260 14400 # Node ID 3dea509d88ae1d1399a52ca2f5f43461d2a3dc4a # Parent 10ed1f728bf34617929dfad86da1e525136c2531 Enano CMS Project button can fade now diff -r 10ed1f728bf3 -r 3dea509d88ae includes/clientside/static/faders.js --- a/includes/clientside/static/faders.js Sat Jul 07 18:33:21 2007 -0400 +++ b/includes/clientside/static/faders.js Sat Jul 07 22:54:20 2007 -0400 @@ -380,6 +380,32 @@ } } +var opacityDOMCache = new Object(); +function domOpacity(obj, opacStart, opacEnd, millisec) { + //speed for each frame + var speed = Math.round(millisec / 100); + var timer = 0; + + // unique ID for this animation + var uniqid = Math.floor(Math.random() * 1000000); + opacityDOMCache[uniqid] = obj; + + //determine the direction for the blending, if start and end are the same nothing happens + if(opacStart > opacEnd) { + for(i = opacStart; i >= opacEnd; i--) { + setTimeout("var obj = opacityDOMCache["+uniqid+"]; domObjChangeOpac(" + i + ",obj)",(timer * speed)); + timer++; + } + } else if(opacStart < opacEnd) { + for(i = opacStart; i <= opacEnd; i++) + { + setTimeout("var obj = opacityDOMCache["+uniqid+"]; domObjChangeOpac(" + i + ",obj)",(timer * speed)); + timer++; + } + } + setTimeout("delete(opacityDOMCache["+uniqid+"]);",(timer * speed)); +} + //change the opacity for different browsers function changeOpac(opacity, id) { var object = document.getElementById(id).style; diff -r 10ed1f728bf3 -r 3dea509d88ae includes/template.php --- a/includes/template.php Sat Jul 07 18:33:21 2007 -0400 +++ b/includes/template.php Sat Jul 07 22:54:20 2007 -0400 @@ -23,6 +23,18 @@ var $site_disabled = false; + /** + * One of the absolute best parts of Enano :-P + * @var string + */ + + var $fading_button = ' + + + '; + function __construct() { global $db, $session, $paths, $template, $plugins; // Common objects @@ -1369,7 +1381,6 @@ // SourceForge/W3C buttons $ob = Array(); $admintitle = ( $session->user_level >= USER_LEVEL_ADMIN ) ? 'title="You may disable this button in the admin panel under General Configuration."' : ''; - if(getConfig('powered_btn') =='1') $ob[] = ''; if(getConfig('sflogo_enabled')=='1') { $ob[] = ''; @@ -1388,7 +1399,7 @@ eval($cmd); } - if(count($ob) > 0) $sb_links = '
+ | - - + + |