/**
  * Renders the crossSlide call
  *
  * @param string $identifier
  * @param Tx_PtExtlist_Domain_Model_List_ListData $listData
  */
 public function render($identifier, Tx_PtExtlist_Domain_Model_List_ListData $listData)
 {
     $imageListArray = $this->buildImageListArray($listData);
     $parameterString = $this->buildParameterString();
     $crossSlideJavascript = $this->buildScript($identifier, $parameterString, $imageListArray);
     $this->inclusionUtility->addJSInlineCode('crosslide', $crossSlideJavascript);
 }
Example #2
0
 /**
  * @param string $library
  * @param string $file
  * @param string $position
  */
 public function render($library = '', $file = '', $position = 'footer')
 {
     if ($library) {
         $this->inclusionUtility->addDefinedLibJSFiles($library);
     } elseif ($file) {
         $this->inclusionUtility->addJSFile($file);
     } else {
         $javaScriptCode = $this->renderChildren();
         if ($javaScriptCode) {
             $codeBlockName = 'yag-' . md5($javaScriptCode);
             $this->inclusionUtility->addJSInlineCode($codeBlockName, $javaScriptCode);
         }
     }
 }
    /**
     * Renders the superSized call
     *
     * @param Tx_PtExtlist_Domain_Model_List_ListData $listData
     */
    public function render(Tx_PtExtlist_Domain_Model_List_ListData $listData)
    {
        $superSizedSettings = $this->buildSuperSizedSettings();
        $superSizedSettings['slides'] = $this->buildSlideArray($listData);
        $superSizedSettingsJSon = json_encode($superSizedSettings);
        $this->templateVariableContainer->add('superSizedImagePath', $superSizedSettings['image_path']);
        $output = '
				jQuery(function($){
					$.supersized(' . $superSizedSettingsJSon . ');
					$.supersized.themeVars.image_path = "' . $superSizedSettings['image_path'] . '";
				});
			';
        $this->inclusionUtility->addJsInlineCode('superSized-' . $this->configurationBuilder->getContextIdentifier(), $output);
    }
    /**
     * @return void
     */
    public function addCustomCSS()
    {
        $nivoSettings = $this->configurationBuilder->getJSCompliantSettings('nivoSliderSettings');
        if ($nivoSettings['controlNavThumbs'] == true) {
            $this->headerInclusion->addCSSFile($this->configurationBuilder->getSettings('thumbNavCSS'));
        } else {
            $itemCount = $this->templateVariableContainer->get('listData')->getCount();
            $leftMargin = (int) ($itemCount * 12.5);
            $this->headerInclusion->addCssInlineBlock('nivoSlider-' . $this->contextIdentifier, '#nivoSlider-' . $this->contextIdentifier . ' .nivo-controlNav {
					margin-left: -' . $leftMargin . 'px;
				}');
        }
    }