Source for file LAutoEffectPanel.php
Documentation is available at LAutoEffectPanel.php
* @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
* @copyright 2005, diemeisterei GmbH. All rights reserved.
* @author $Author: schmunk $
* @version $Revision: 313 $ $Date: 2006-07-30 21:04:58 +0000 (So, 30 Jul 2006) $
* @package Phundament.Components
* @subpackage ActiveControls
* Adds script.aclo.us effects to a TActivePanel
* @package System.Web.UI.ActiveControls
$this->setViewState('EffectDelay', $value, '');
return $this->getViewState('EffectDelay', 250);
$this->setViewState('EffectDuration', $value, '');
return $this->getViewState('EffectDuration', 500);
$this->setViewState('VisibleDelay', $value, '');
return $this->getViewState('VisibleDelay', 150);
parent::onPreRender($param);
if ($this->Page->getClientSupportsJavaScript() == false || $this->Visible == false) return; // this may work in the future
$this->setId(uniqid("LAutoEffectPanel")); // set Id for DOM trre
// use global counter (in the same order PRADO renders components)
$GLOBALS["LAutoEffectCounter"] = (isset ($GLOBALS['LAutoEffectCounter'])? $GLOBALS['LAutoEffectCounter']: 0);
$GLOBALS["LAutoEffectCounter"]++ ;
$effectDelay = $GLOBALS["LAutoEffectCounter"]* $this->getEffectDelay();
// set the comoponent invisible, not display: none, so space is reserved
$this->Style->setStyleField("visibility","hidden");
$this->Style->setStyleField("width","auto");
$this->Style->setStyleField("position","relative");
// add & attach script event
Event.OnLoad(function() //execute this function when page fully loads
window.setTimeout('$(\'". $this->ClientId. "\').style.visibility = \'visible\';', ". $visibleDelay. ");
window.setTimeout('new Effect.Appear(\'". $this->ClientId. "\', {duration: ". ($this->getEffectDuration()/ 1000). ", from:0, to:1});', ". $effectDelay. ");
$scripta = "//alert('now');
//document.getElementById('". $this->ClientId. "').style.visibility = 'visible';
//new Effect.Appear('". $this->ClientId. "', {duration: ". ($this->getEffectDuration()/ 1000). ", from:0, to:1});
window.setTimeout('document.getElementById(\'". $this->ClientId. "\').style.visibility = \'visible\';', ". $visibleDelay. ");
//window.setTimeout('new Effect.Appear(\'". $this->ClientId. "\', {duration: ". ($this->getEffectDuration()/ 1000). ", from:0, to:1});', ". $effectDelay. ");";
$scriptMgr = $this->getPage()->getClientScript();
$scriptMgr->registerEndScript(uniqid("LAutoEffectPanel"), $script);
|