Exemplo n.º 1
0
 function addCSS()
 {
     nextendimport('nextend.css.css');
     $css = NextendCss::getInstance();
     $css->enableLess();
     $css->addLessImportDir((defined('NEXTEND_ACCORDION_MENU_ASSETS') ? NEXTEND_ACCORDION_MENU_ASSETS : NEXTENDLIBRARYASSETS) . 'accordionmenu' . DIRECTORY_SEPARATOR . 'less' . DIRECTORY_SEPARATOR);
     $data =& $this->_data;
     $css3animation = $data->get('css3animation', 0);
     $context = array('id' => '~"#' . $this->getId() . '"', 'snaptobottom' => $data->get('snaptobottom', 0), 'css3animation' => $css3animation, 'accordionmode' => $data->get('accordionmode', 0));
     if ($css3animation) {
         nextendimport('nextend.animation.animation');
         $animation = explode('|*|', $data->get('animation', '500|*|dojo.fx.easing.cubicInOut|*|dojo.fx.easing.cubicInOut'));
         $context['animationinterval'] = round($animation[0] / 1000, 2) . 's';
         $context['animationopening'] = NextendAnimation::dojoEasingToCSSEasing($animation[1]);
         $context['animationclosing'] = NextendAnimation::dojoEasingToCSSEasing($animation[2]);
         $context['animationclosing'] = NextendAnimation::dojoEasingToCSSEasing($animation[2]);
     }
     include $this->_themePath . 'context.php';
     $css->addCssFile(array($this->getId(), $this->_themePath . 'style.less', $context));
 }
Exemplo n.º 2
0
 function addCSS()
 {
     nextendimport('nextend.css.css');
     $css = NextendCss::getInstance();
     $css->enableLess();
     $css->addLessImportDir((defined('NEXTEND_ACCORDION_MENU_ASSETS') ? NEXTEND_ACCORDION_MENU_ASSETS : NEXTENDLIBRARYASSETS) . 'accordionmenu' . DIRECTORY_SEPARATOR . 'less' . DIRECTORY_SEPARATOR);
     $data =& $this->_data;
     $css3animation = $data->get('css3animation', 0);
     $context = array('id' => '~"#' . $this->getId() . '"', 'snaptobottom' => $data->get('snaptobottom', 0), 'css3animation' => $css3animation, 'accordionmode' => $data->get('accordionmode', 0));
     if ($css3animation) {
         nextendimport('nextend.animation.animation');
         $animation = explode('|*|', $data->get('animation', '500|*|dojo.fx.easing.cubicInOut|*|dojo.fx.easing.cubicInOut'));
         if ($animation[0] < 1) {
             $animation[0] = 1;
         }
         $context['animationinterval'] = number_format(round($animation[0] / 1000, 2), 2, '.', '') . 's';
         $context['animationopening'] = NextendAnimation::dojoEasingToCSSEasing($animation[1]);
         $context['animationclosing'] = NextendAnimation::dojoEasingToCSSEasing($animation[2]);
         $context['animationclosing'] = NextendAnimation::dojoEasingToCSSEasing($animation[2]);
         $transform = intval($data->get('transform', 0));
         $context['transform'] = $transform;
         if ($transform) {
             $context['opacity'] = floatval($data->get('opacity', 1));
             $context['transformperspective'] = $data->get('transformperspective', 0) . 'px';
             $context['transformorigin'] = implode(' ', NextendParse::parse($data->get('transformorigin', 'center|*|center|*|0')));
             $translate = NextendParse::parse($data->get('transformtranslate', '0|*|0|*|0'));
             $scale = NextendParse::parse($data->get('transformscale', '1|*|1|*|1'));
             $rotate = NextendParse::parse($data->get('transformrotate', '0|*|0|*|0'));
             $context['transformvalue'] = 'translate3d(' . implode('px,', $translate) . 'px' . ') scale3d(' . implode(',', $scale) . ') rotateX(' . $rotate[0] . 'deg) rotateY(' . $rotate[1] . 'deg) rotateZ(' . $rotate[2] . 'deg)';
         }
     }
     include $this->_themePath . 'context.php';
     $css->addCssFile(array($this->getId(), $this->_themePath . 'style.less', $context));
 }