static function render($slider, $id, $params) { $html = ''; $indicatorstripe = $params->get('indicatorstripe', false); if ($indicatorstripe && $indicatorstripe != -1) { $displayclass = self::getDisplayClass($params->get('widgetindicatordisplay', '0|*|always|*|0|*|0'), true) . 'nextend-indicator '; $css = NextendCss::getInstance(); $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stripe' . DIRECTORY_SEPARATOR . 'style.css')); list($style, $data) = self::getPosition($params->get('indicatorposition', '')); $style .= 'z-index:10;'; $width = NextendParse::parse($params->get('indicatorwidth', '100%')); if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') { $style .= 'width:' . $width . ';'; } else { $data .= 'data-sswidth="' . $width . '" '; } $size = intval($params->get('indicatorsize', 50)); list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('indicatorstripecolor', '000000cc')); list($colorhexbg, $rgbacssbg) = NextendColor::colorToCss($params->get('backgroundstripecolor', '7670c7ff')); $height = $params->get('indicatorstripeheight', '6'); $info = pathinfo($indicatorstripe); $class = 'nextend-indicator nextend-indicator-stripe nextend-indicator-stripe-' . basename($indicatorstripe, '.' . $info['extension']); $html = '<div class="' . $displayclass . 'nextend-indicator-stripe-container" style="' . $style . 'background-color:' . $colorhexbg . '; background-color:' . $rgbacssbg . '; height: ' . $height . 'px;" ' . $data . '><div class="' . $class . '" style="width: 0%; background-color:' . $colorhex . '; background-color:' . $rgbacss . '; height: ' . $height . 'px;"></div></div>'; $html .= "\r\n <script type='text/javascript'>\r\n njQuery(document).ready(function () {\r\n var stripe = window.njQuery('#" . $id . " .nextend-indicator-stripe');\r\n window['" . $id . "-indicator'] = {\r\n hide: function(){\r\n stripe.hide();\r\n },\r\n show: function(){\r\n stripe.show();\r\n },\r\n refresh: function(val){\r\n stripe.css('width', val+'%');\r\n }\r\n };\r\n });\r\n </script>\r\n "; } return $html; }
static function render($slider, $id, $params) { $html = ''; $thumbnail = $params->get('thumbnail', false); if ($thumbnail && $thumbnail != '-1') { $displayclass = self::getDisplayClass($params->get('widgetthumbnaildisplay', '0|*|always|*|0|*|0'), true); $css = NextendCss::getInstance(); $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'horizontal' . DIRECTORY_SEPARATOR . 'style.css')); $js = NextendJavascript::getInstance(); $js->addLibraryJsFile('jquery', dirname(__FILE__) . '/horizontal/script.js'); list($colorhexthumbnailactivebackground, $rgbacssthumbnailactivebackground) = NextendColor::colorToCss($params->get('thumbnailactivebackground', '00000080')); $info = pathinfo($thumbnail); $class = 'nextend-thumbnail nextend-thumbnail-horizontal nextend-thumbnail-horizontal-' . basename($thumbnail, '.' . $info['extension']); $style = ''; $thumbnailsize = NextendParse::parse($params->get('thumbnailsize', '100|*|54')); $thumbnailperpage = $params->get('thumbnailperpage', 2); $style .= 'width:' . $thumbnailsize[0] . 'px; height:' . $thumbnailsize[1] . 'px;'; list($positionstyle, $data) = self::getPosition($params->get('thumbnailposition', '')); $positionstyle .= 'z-index:10; width: 100%;'; $html .= '<div id="' . $id . '-thumbnail" class="' . $displayclass . '" style="' . $positionstyle . '" ' . $data . '>'; $html .= '<div class="nextend-thumbnail-container ' . $class . ' nextend-clearfix"> <div class="nextend-arrow-left" style="height:' . $thumbnailsize[1] . 'px"></div>'; $html .= '<div class="nextend-thumbnail-strip-hider"><div class="nextend-thumbnail-strip">'; for ($i = 0; $i < count($slider->_slides); $i++) { if (!$slider->_slides[$i]['thumbnail'] && $slider->_slides[$i]['bg']['desktop']) { $im = new NextendImage(); $slider->_slides[$i]['thumbnail'] = $im->resizeImage($slider->_slides[$i]['bg']['desktop'], $thumbnailsize[0], $thumbnailsize[1]); } $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'goto\',' . $i . ',false);" class="' . $class . ($slider->_slides[$i]['first'] ? ' active' : '') . '" style="' . $style . 'background-image: url(\'' . $slider->_slides[$i]['thumbnail'] . '\')"></div>'; } $html .= '</div></div>'; $html .= '<div class="nextend-arrow-right" style="height:' . $thumbnailsize[1] . 'px"></div> </div> <style> .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal1 .nextend-thumbnail:HOVER, .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal1 .nextend-thumbnail.active{ box-shadow: inset 0 0 0 6px ' . $rgbacssthumbnailactivebackground . '; } .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal-dark .nextend-thumbnail:HOVER, .nextend-thumbnail-container.nextend-thumbnail-horizontal-horizontal-dark .nextend-thumbnail.active{ box-shadow: 0 0 3px 1px RGBA(0,0,0,0.6), 0 0 0 6px ' . $rgbacssthumbnailactivebackground . ' inset; } </style> '; $html .= '</div>'; $html .= "\r\n <script type='text/javascript'>\r\n njQuery(document).ready(function () {\r\n window['" . $id . "-thumbnail'] = new smartSliderHorizontal({\r\n id: '" . $id . "',\r\n node: window.njQuery('#" . $id . "-thumbnail'),\r\n thumbnailperpage: '" . $thumbnailperpage . "',\r\n thumbnailanimation: '" . $params->get('thumbnailanimation', 700) . "'\r\n });\r\n });\r\n </script>\r\n "; } return $html; }
static function render($slider, $id, $params) { $html = ''; $thumbnail = $params->get('thumbnail', false); if ($thumbnail && $thumbnail != '-1') { $displayclass = self::getDisplayClass($params->get('widgetthumbnaildisplay', '0|*|always|*|0|*|0'), true); $css = NextendCss::getInstance(); $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'gallery' . DIRECTORY_SEPARATOR . 'style.css')); $js = NextendJavascript::getInstance(); $js->addLibraryJsFile('jquery', dirname(__FILE__) . '/gallery/script.js'); $info = pathinfo($thumbnail); $class = 'nextend-thumbnail nextend-thumbnail-gallery nextend-thumbnail-gallery-' . basename($thumbnail, '.' . $info['extension']); $style = ''; $thumbnailsize = NextendParse::parse($params->get('thumbnailgallerysize', '100|*|54')); $thumbnailperpage = $params->get('thumbnailperpage', 2); $style .= 'width:' . $thumbnailsize[0] . 'px; height:' . $thumbnailsize[1] . 'px;'; list($positionstyle, $data) = self::getPosition($params->get('thumbnailgalleryposition', '')); $positionstyle .= 'z-index:10;'; $thumbnailgalleryoutersize = NextendParse::parse($params->get('thumbnailgalleryoutersize', '100%|*|auto')); if (is_numeric($thumbnailgalleryoutersize[0]) || $thumbnailgalleryoutersize[0] == 'auto' || substr($thumbnailgalleryoutersize[0], -1) == '%') { $positionstyle .= 'width:' . $thumbnailgalleryoutersize[0] . ';'; } else { $data .= 'data-sswidth="' . $thumbnailgalleryoutersize[0] . '" '; } if (is_numeric($thumbnailgalleryoutersize[1]) || $thumbnailgalleryoutersize[1] == 'auto' || substr($thumbnailgalleryoutersize[1], -1) == '%') { $positionstyle .= 'height:' . $thumbnailgalleryoutersize[1] . ';'; } else { $data .= 'data-ssheight="' . $thumbnailgalleryoutersize[1] . '" '; } list($colorhexthumbnailgallerybackground, $rgbacssthumbnailgallerybackground) = NextendColor::colorToCss($params->get('thumbnailgallerybackground', 'eeeeeefff')); $positionstyle .= 'background: #' . $colorhexthumbnailgallerybackground . '; background: ' . $rgbacssthumbnailgallerybackground . ';'; $br = NextendParse::parse($params->get('thumbnailgalleryborderradius', '0|*|0|*|0|*|0')); $positionstyle .= 'border-radius: ' . $br[0] . 'px ' . $br[1] . 'px ' . $br[2] . 'px ' . $br[3] . 'px; overflow: auto;'; $html .= '<div id="' . $id . '-thumbnail" class="' . $displayclass . '" style="opacity: 0.9999; ' . $positionstyle . '" ' . $data . '>'; $p = NextendParse::parse($params->get('thumbnailgallerypadding', '5|*|5|*|5|*|5')); $html .= '<div class="nextend-thumbnail-container ' . $class . '" style="padding: ' . $p[0] . 'px ' . $p[1] . 'px ' . $p[2] . 'px ' . $p[3] . 'px;">'; $m = NextendParse::parse($params->get('thumbnailgallerymargin', '0|*|1|*|1|*|0')); for ($i = 0; $i < count($slider->_slides); $i++) { if (!$slider->_slides[$i]['thumbnail'] && $slider->_slides[$i]['bg']) { $im = new NextendImage(); $slider->_slides[$i]['thumbnail'] = $im->resizeImage($slider->_slides[$i]['bg'], $thumbnailsize[0], $thumbnailsize[1]); } $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'goto\',' . $i . ',false);" class="' . $class . ($slider->_slides[$i]['first'] ? ' active' : '') . '" style="' . $style . 'background-image: url(\'' . $slider->_slides[$i]['thumbnail'] . '\'); margin: ' . $m[0] . 'px ' . $m[1] . 'px ' . $m[2] . 'px ' . $m[3] . 'px;"></div>'; } $html .= '</div></div>'; $html .= "\r\n <script type='text/javascript'>\r\n njQuery(document).ready(function () {\r\n window['" . $id . "-thumbnail'] = new smartSliderGallery({\r\n id: '" . $id . "',\r\n node: window.njQuery('#" . $id . "-thumbnail')\r\n });\r\n });\r\n </script>\r\n "; } return $html; }
static function render($slider, $id, $params) { $html = ''; $barcolored = $params->get('barcolored', false); if ($barcolored && $barcolored != -1) { $displayclass = self::getDisplayClass($params->get('widgetbardisplay', '0|*|always|*|0|*|0'), true); list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('barbackground', '00000080')); $css = NextendCss::getInstance(); $css->enableLess(); $cssfile = NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'colored' . DIRECTORY_SEPARATOR . 'style.less'); $css->addCssFile(array($cssfile, $cssfile, array('id' => '~"#' . $id . '"')), $id); list($style, $data) = self::getPosition($params->get('barcoloredposition', '')); $style .= 'background-color:' . $rgbacss . ';'; $width = NextendParse::parse($params->get('barcoloredwidth', '20')); if (is_numeric($width)) { $style .= 'width:' . $width . '%;'; } else { $data .= 'data-sswidth="' . $width . '" '; } /*$height = NextendParse::parse($params->get('barcoloredheight', '100')); if(is_numeric($height)){ $style.= 'height:'.$height.'px;'; }else{ $data.= 'data-ssheight="'.$height.'" '; } $style .= 'font-size: '.intval($slider->_sliderParams->get('globalfontsize', '12')).'px;'; */ $style .= 'padding: ' . NextendParse::parse($params->get('barcoloredpadding', '0')) . '% 0;'; $borderradius = NextendParse::parse($params->get('barcoloredborderradius', '0|*|0|*|0|*|0')); $style .= '-webkit-border-radius: ' . $borderradius[0] . 'px ' . $borderradius[1] . 'px ' . $borderradius[2] . 'px ' . $borderradius[3] . 'px;'; $style .= '-moz-border-radius: ' . $borderradius[0] . 'px ' . $borderradius[1] . 'px ' . $borderradius[2] . 'px ' . $borderradius[3] . 'px;'; $style .= 'border-radius: ' . $borderradius[0] . 'px ' . $borderradius[1] . 'px ' . $borderradius[2] . 'px ' . $borderradius[3] . 'px;'; $info = pathinfo($barcolored); $class = 'nextend-bar nextend-bar-c nextend-bar-c-' . basename($barcolored, '.' . $info['extension']); $html .= '<div class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '>'; for ($i = 0; $i < count($slider->_slides); $i++) { $html .= '<div class="nextend-bar-slide ' . ($slider->_slides[$i]['first'] ? ' active' : '') . '">'; $html .= '<h6 class="' . $params->get('barcoloredtitlefont', '') . '">' . $slider->_slides[$i]['title'] . '</h6>'; if ($slider->_slides[$i]['description']) { $html .= '<p class="' . $params->get('barcoloreddescriptionfont', '') . '">' . $slider->_slides[$i]['description'] . '</p>'; } $html .= '<div style="clear: both;"></div></div>'; } $html .= '</div>'; } return $html; }
static function render($slider, $id, $params) { $html = ''; $previous = $params->get('previous', false); $next = $params->get('next', false); $enabled = $previous && $previous != -1 || $next && $next != -1; $fontsize = intval($slider->_sliderParams->get('globalfontsize', '12')); if ($enabled) { $displayclass = self::getDisplayClass($params->get('widgetarrowdisplay', '0|*|always|*|0|*|0'), true); list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('arrowtextbackground', '00ff00ff')); list($colorhexhover, $rgbacsshover) = NextendColor::colorToCss($params->get('arrowtextbackgroundhover', '000000ff')); $css = NextendCss::getInstance(); $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'text' . DIRECTORY_SEPARATOR . 'style.css')); if ($previous && $previous != -1) { list($style, $data) = self::getPosition($params->get('previousposition', '')); $style .= 'font-size: ' . $fontsize . 'px;'; $info = pathinfo($previous); $class = 'nextend-arrow-previous nextend-arrow-text nextend-arrow-text-previous nextend-arrow-text-previous-' . basename($previous, '.' . $info['extension']); $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'previous\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '> <span class="' . $params->get('fontclassprev', 'sliderfont7') . '">' . $params->get('contentprev', 'Prev') . '</span> </div>'; } if ($next && $next != -1) { list($style, $data) = self::getPosition($params->get('nextposition', '')); $style .= 'font-size: ' . $fontsize . 'px;'; $info = pathinfo($next); $class = 'nextend-arrow-next nextend-arrow-text nextend-arrow-text-next nextend-arrow-text-next-' . basename($next, '.' . $info['extension']); $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'next\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '> <span class="' . $params->get('fontclassnext', 'sliderfont7') . '">' . $params->get('contentnext', 'Next') . '</span> </div>'; } $css->addCssFile(' #' . $id . ' .nextend-arrow-text-next, #' . $id . ' .nextend-arrow-text-previous{ background-color:' . $rgbacss . '; } #' . $id . ' .nextend-arrow-text-next:HOVER, #' . $id . ' .nextend-arrow-text-previous:HOVER{ background-color:' . $rgbacsshover . '; }', $id); } return $html; }
function _renderAdmin($data, $id, $sliderid, $items) { $link = (array) NextendParse::parse($data->get('link', '')); if (!isset($link[1])) { $link[1] = ''; } $colors = NextendColor::colorToCss($data->get('color2', '357cbdff')); $hovercolors = NextendColor::colorToCss($data->get('hovercolor2', '01add3ff')); return ' <div class="' . $data->get('fontclass') . '"> ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" target="' . $link[1] . '">' : '') . ' <span class="nextend-smartslider-tag-' . $data->get('tagclass') . ' ' . $data->get('class') . '"> ' . $data->get('content') . ' </span> ' . ($link[0] != '#' ? '</a>' : '') . ' <style> ' . $this->getCSS($sliderid, $data->get('tagclass'), $colors[1], $colors[0], $hovercolors[1], $hovercolors[0]) . ' </style> </div> '; }
static function render($slider, $id, $params) { $html = ''; $previous = $params->get('previous', false); $next = $params->get('next', false); $enabled = $previous && $previous != -1 || $next && $next != -1; if ($enabled) { $displayclass = self::getDisplayClass($params->get('widgetarrowdisplay', '0|*|always|*|0|*|0'), true); list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('arrowbackground', '00ff00ff')); list($colorhexhover, $rgbacsshover) = NextendColor::colorToCss($params->get('arrowbackgroundhover', '000000ff')); $css = NextendCss::getInstance(); $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'transition' . DIRECTORY_SEPARATOR . 'style.css')); if ($previous && $previous != -1) { list($style, $data) = self::getPosition($params->get('previousposition', '')); $info = pathinfo($previous); $class = 'nextend-arrow-previous nextend-transition nextend-transition-previous nextend-transition-previous-' . basename($previous, '.' . $info['extension']); $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'previous\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '><div class="smartslider-outer"></div><div class="smartslider-inner"></div></div>'; } if ($next && $next != -1) { list($style, $data) = self::getPosition($params->get('nextposition', '')); $info = pathinfo($next); $class = 'nextend-arrow-next nextend-transition nextend-transition-next nextend-transition-next-' . basename($next, '.' . $info['extension']); $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'next\');" class="' . $displayclass . $class . '" style="' . $style . '" ' . $data . '><div class="smartslider-outer"></div><div class="smartslider-inner"></div></div>'; } $css->addCssFile(' #' . $id . ' .nextend-transition.nextend-transition-previous .smartslider-outer, #' . $id . ' .nextend-transition.nextend-transition-next .smartslider-outer{ background-color:' . $rgbacss . '; } #' . $id . ' .nextend-transition.nextend-transition-previous .smartslider-inner, #' . $id . ' .nextend-transition.nextend-transition-next .smartslider-inner{ background-color:' . $rgbacsshover . '; }', $id); } return $html; }
static function render($slider, $id, $params) { $html = ''; $bullet = $params->get('bullet', false); if ($bullet && $bullet != -1) { $displayclass = self::getDisplayClass($params->get('widgetbulletdisplay', '0|*|always|*|0|*|0'), true) . 'nextend-widget-bullet '; $css = NextendCss::getInstance(); $css->addCssFile(NextendFilesystem::translateToMediaPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'numbers' . DIRECTORY_SEPARATOR . 'style.css')); list($colorhex, $rgbacss) = NextendColor::colorToCss($params->get('bulletbackground', '00000060')); list($colorhexhover, $rgbacsshover) = NextendColor::colorToCss($params->get('bulletbackgroundhover', '7670C7ff')); list($colorhexborderbar, $rgbacssborderbar) = NextendColor::colorToCss($params->get('bulletbarcolor', '00000060')); list($colorhexthumbnail, $rgbacssthumbnail) = NextendColor::colorToCss($params->get('bulletthumbnail', '00000060')); list($style, $data) = self::getPosition($params->get('bulletposition', '')); $style .= 'visibility: hidden;z-index:10; line-height: 0;'; $width = NextendParse::parse($params->get('bulletwidth', 'width')); if (is_numeric($width) || $width == 'auto' || substr($width, -1) == '%') { $style .= 'width:' . $width . ';'; } else { $data .= 'data-sswidth="' . $width . '" '; } $bulletalign = $params->get('bulletalign', 'center'); if ($bulletalign) { $style .= 'text-align:' . $bulletalign . ';'; } $info = pathinfo($bullet); $class = 'nextend-bullet nextend-bullet-numbers nextend-bullet-numbers-' . basename($bullet, '.' . $info['extension']); $class .= ' nextend-bullet-' . $params->get('bulletorientation', 'horizontal'); $shadow = $params->get('bulletshadow', 'none'); switch ($shadow) { case 'inner': $class .= ' bullet-shadow-inner'; break; case 'outer': $class .= ' bullet-shadow-outer'; break; } $bar = $params->get('bulletbar', 'none'); switch ($bar) { case 'simplerounded': $class .= ' bullet-bar-simple-rounded'; break; case 'elegantrounded': $class .= ' bullet-bar-elegant-rounded'; break; case 'simple': $class .= ' bullet-bar-simple'; break; case 'elegant': $class .= ' bullet-bar-elegant'; break; } $html .= '<div style="' . $style . '" class="' . $displayclass . '" ' . $data . '><div class="nextend-bullet-container ' . $class . '">'; $i = 0; foreach ($slider->_slides as $slide) { $html .= '<div onclick="njQuery(\'#' . $id . '\').smartslider(\'goto\',' . $i . ',false);" data-thumbnail="' . $slide['thumbnail'] . '" class="' . $class . ($slide['first'] ? ' active' : '') . '"><span class="' . $params->get('fontclassnumber', 'sliderfont7') . '"> ' . ($i + 1) . ' </span></div>'; $i++; } $html .= '</div></div>'; self::tooltip($id, NextendParse::parse($params->get('bullethumbnail', false), '0|*|top'), "nextend-bullet-numbers-thumbnail"); $thumbnailsize = NextendParse::parse($params->get('thumbnailsizebullet', false), '100|*|60'); $css->addCssFile(' #' . $id . ' .nextend-bullet-container .nextend-bullet-numbers.nextend-bullet{ background:' . $rgbacss . '; } #' . $id . ' .nextend-bullet-container .nextend-bullet-numbers.nextend-bullet.active, #' . $id . ' .nextend-bullet-container .nextend-bullet-numbers.nextend-bullet:HOVER{ background:' . $rgbacsshover . '; } #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-simple-rounded, #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-elegant-rounded, #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-simple, #' . $id . ' .nextend-bullet-container.nextend-bullet.nextend-bullet-numbers.bullet-bar-elegant{ background:' . $rgbacssborderbar . '; } #' . $id . ' .nextend-bullet-numbers-thumbnail .qtip-content{ width:' . $thumbnailsize[0] . 'px; height:' . $thumbnailsize[1] . 'px; padding: 4px; } #' . $id . ' .nextend-bullet-numbers-thumbnail .qtip-content img{ box-shadow: 0 0px 0px 1px RGBA(255,255,255,.2); } #' . $id . ' .nextend-bullet-numbers-thumbnail{ background: ' . $rgbacssthumbnail . '; }', $id); } return $html; }
function _renderAdmin($data, $id, $sliderid, $items) { $link = (array) NextendParse::parse($data->get('link', '')); if (!isset($link[1])) { $link[1] = ''; } $colors = NextendColor::colorToCss($data->get('color', '00000080')); $size = (array) NextendParse::parse($data->get('size', '')); if (!isset($size[0])) { $size[0] = '100'; } if (!isset($size[1])) { $size[1] = '100'; } return ' <div id="' . $id . '"> ' . ($link[0] != '#' ? '<a href="' . $link[0] . '" target="' . $link[1] . '" style="display: block; background: none !important;">' : '') . ' <div class="nextend-smartslider-caption ' . $data->get('customcaptionclass', '') . '" style="width:' . $size[0] . 'px; height:' . $size[1] . 'px;"> <img alt="' . htmlspecialchars($data->get('alt', '')) . '" src="' . $data->get('image', '') . '" class="img-' . $data->get('captionclass', '') . '" /> <div class="caption nextend-smartslider-caption-' . $data->get('captionclass', '') . '" style="background:#' . $colors[0] . ';background:' . $colors[1] . ';"> <h4 class="' . $data->get('fontclasstitle', '') . '">' . $data->get('content', '') . '</h4> <p class="' . $data->get('fontclass', '') . '">' . $data->get('description', '') . '</p> </div> </div> ' . ($link[0] != '#' ? '</a>' : '') . ' <script type="text/javascript"> ' . $this->getJs($sliderid, $id) . ' </script> </div> '; }
static function render($slider, $id, $params) { $html = ''; $indicatorskin = $params->get('indicatorskin', false); if ($indicatorskin && $indicatorskin != -1) { $displayclass = self::getDisplayClass($params->get('widgetindicatordisplay', '0|*|always|*|0|*|0'), true) . 'nextend-indicator '; $js = NextendJavascript::getInstance(); $js->addLibraryJsFile('jquery', dirname(__FILE__) . '/pie/jquery.knob.js'); list($style, $data) = self::getPosition($params->get('indicatorposition', '')); $style .= 'z-index:10;'; $size = intval($params->get('indicatorsize', 50)); $color = NextendParse::parse($params->get('indicatorcolor', 50)); list($color[0], $rgbafg) = NextendColor::colorToCss($color[0]); list($color[1], $rgbabg) = NextendColor::colorToCss($color[1]); $html = '<div class="' . $displayclass . 'nextend-indicator-pie" style="line-height:0;' . $style . '" ' . $data . '> <input class="nextend-indicator-pie-input" name="pie" type="hidden" value="0" data-thickness="' . $params->get('indicatorthickness', 0.5) . '" data-width="' . $size . '" data-height="' . $size . '" data-linecap="' . $params->get('indicatorlinecap', 'butt') . '" data-fgcolor="' . $rgbafg . '" data-bgcolor="' . $rgbabg . '" data-readOnly="1" autocomplete="off" /> </div>'; $skin = ''; switch (basename($params->get('indicatorskin', 'default.png'))) { case 'tron.png': $skin = 'draw : function () { var a = this.angle(this.cv) // Angle , sa = this.startAngle // Previous start angle , sat = this.startAngle // Start angle , ea // Previous end angle , eat = sat + a // End angle , r = true; this.g.lineWidth = this.lineWidth; this.o.cursor && (sat = eat - 0.3) && (eat = eat + 0.3); if (this.o.displayPrevious) { ea = this.startAngle + this.angle(this.value); this.o.cursor && (sa = ea - 0.3) && (ea = ea + 0.3); this.g.beginPath(); this.g.strokeStyle = this.previousColor; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false); this.g.stroke(); } this.g.beginPath(); this.g.strokeStyle = r ? this.o.fgColor : this.fgColor ; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false); this.g.stroke(); this.g.lineWidth = 2; this.g.beginPath(); this.g.strokeStyle = this.o.fgColor; this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false); this.g.stroke(); return false; }'; break; } $html .= "\n <script type='text/javascript'>\n function isCanvasSupported(){\n var elem = document.createElement('canvas');\n return !!(elem.getContext && elem.getContext('2d'));\n }\n njQuery(document).ready(function () {\n if(isCanvasSupported()){\n var input = window.njQuery('#" . $id . " .nextend-indicator-pie-input');\n input.knob({\n " . $skin . "\n });\n window['" . $id . "-indicator'] = {\n hide: function(){\n input.hide();\n },\n show: function(){\n input.show();\n },\n refresh: function(val){\n input.val(val).trigger('change');\n }\n };\n }\n });\n </script>\n "; } return $html; }
function _render($data, $id, $sliderid, $items) { $shapeclass = $data->get('shapeclass', 'square'); $colors = NextendColor::colorToCss($data->get('color', '00000080')); $data->set('colorhex', $colors[0]); $data->set('colora', $colors[1]); $size = (array) NextendParse::parse($data->get('size', '')); if (!isset($size[0])) { $size[0] = '100'; } if (!isset($size[1])) { $size[1] = '100'; } $data->set('width', $size[0]); $data->set('height', $size[1]); $attr = ''; $click = $data->get('onmouseclick', ''); if (!empty($click)) { $attr .= ' data-click="' . htmlspecialchars($click) . '"'; } $enter = $data->get('onmouseenter', ''); if (!empty($enter)) { $attr .= ' data-enter="' . htmlspecialchars($enter) . '"'; } $leave = $data->get('onmouseleave', ''); if (!empty($leave)) { $attr .= ' data-leave="' . htmlspecialchars($leave) . '"'; } return '<div> <div id="' . $id . '" class="' . $id . ' nextend-smartslider-shape nextend-smartslider-shape-' . $shapeclass . '" ' . $attr . '></div> <style>' . $this->getCss($shapeclass, $id, $sliderid, $data) . '</style> <script type="text/javascript">' . $this->getJs($shapeclass, $id, $sliderid, $data) . '</script> </div>'; }