$linkData = wsLinks::decryptLink($linkData);
$animations = contentLink::parseAnimations($linkData['image_rollover']);
foreach ($animations as $animation) {
- if (isset($animation['backgroundColor']) && $animation['backgroundColor'] != 'transparent') {
+ if (isset($animation['backgroundcolor']) && $animation['backgroundcolor'] != 'transparent') {
$dupData = $linkData;
$dupData['type'] = 14;
- $dupData['to'] = $animation['backgroundColor'];
- $dupData['image_rollover'] = '';
+ $dupData['to'] = $animation['backgroundcolor'];
+
$dupData['uid'] = 'b_' . $linkData['uid'];
+ if (!isset($animation['zindex'])) {
+ $animation['zindex'] = 0;
+ }
+ $z = intval($animation['zindex']) - 1;
+ $dupData['image_rollover'] = 'zindex=' . $z;
array_push($links, $dupData);
array_push($links, $linkData);
unset($links[$k]);
}
}
- public static function parseExtras($extras)
+ public static function parseExtras($extras, $normalizeKey = false)
{
$extras = trim($extras);
if ($extras === '') {
if (preg_match('|^\"([^\"]+)\"$|', $v, $matches)) {
$v = $matches[1];
}
- $res[trim($e[0])] = $v;
+ $k = trim($e[0]);
+ if ($normalizeKey) {
+ $k = mb_strtolower($k);
+ }
+ $res[$k] = $v;
}
return $res;
if (!$animation) {
continue;
}
- $extras = self::parseExtras($animation);
+ $extras = self::parseExtras($animation, true);
if (count($extras) > 0) {
if (!isset($extras['direction'])) {
$extras['direction'] = 'right';
class colorLink extends contentLink
{
+ protected $role = '';
+
public function getCSS()
{
return 'background-color:' . wsHTML5::colorToCSS($this->to, 1) . ';';