public $tooltipBackgroundColor = null;
public $parallax = 0;
public $attachLeft = false;
+ public $allowsAnimation = false;
+
protected $role = 'button';
protected $_init;
class contentLink extends wsHTML5Link
{
public $defaultZIndex = 30;
+ public $allowsAnimation = true;
public function getHTMLContainerClass()
{
public function getAdditionnalContent()
{
$res = parent::getAdditionnalContent();
- $animations = self::parseAnimations($this->image_rollover);
- foreach ($animations as $animation) {
- if (isset($animation['blendmode'])) {
- $this->blendmode = $animation['blendmode'];
- unset($animation['blendmode']);
- }
- if (isset($animation['zindex'])) {
- $this->zindex = $animation['zindex'];
+ if ($this->allowsAnimation) {
+ $animations = self::parseAnimations($this->image_rollover);
+ foreach ($animations as $animation) {
+ if (isset($animation['blendmode'])) {
+ $this->blendmode = $animation['blendmode'];
+ unset($animation['blendmode']);
+ }
+ if (isset($animation['zindex'])) {
+ $this->zindex = $animation['zindex'];
+ }
+ if (isset($animation['addzindex'])) {
+ $this->addzindex = $animation['addzindex'];
+ }
+ if (isset($animation['parallax'])) {
+ $this->parallax = $animation['parallax'];
+ unlink($animation['parallax']);
+ }
}
- if (isset($animation['addzindex'])) {
- $this->addzindex = $animation['addzindex'];
+ $res .= ' data-animations="' . htmlspecialchars(json_encode($animations), ENT_QUOTES) . '" ';
+ if ($this->_isHiddenFirst($animations)) {
+ $res .= ' data-animation-hide ';
}
- if (isset($animation['parallax'])) {
- $this->parallax = $animation['parallax'];
- unlink($animation['parallax']);
+ if ($this->_isFinallyHidden($animations)) {
+ $res .= ' data-animation-hide-on-leave ';
}
}
- $res .= ' data-animations="' . htmlspecialchars(json_encode($animations), ENT_QUOTES) . '" ';
- if ($this->_isHiddenFirst($animations)) {
- $res .= ' data-animation-hide ';
- }
- if ($this->_isFinallyHidden($animations)) {
- $res .= ' data-animation-hide-on-leave ';
- }
return $res;
}