function fetchElement() { $this->value = $this->getValue(); $html = N2Html::tag('div', array('class' => 'n2-form-element-checkbox', 'style' => N2XmlHelper::getAttribute($this->_xml, 'style')), $this->generateOptions($this->_xml) . parent::fetchElement()); N2JS::addInline('new NextendElementCheckbox("' . $this->_id . '", ' . json_encode($this->values) . ');'); return $html; }
function fetchElement() { $html = N2Html::tag('div', array('class' => 'n2-form-element-text n2-form-element-icon n2-border-radius'), N2Html::image(N2Image::base64Transparent(), '', array('class' => 'n2-form-element-preview')) . '<a id="' . $this->_id . '_edit" class="n2-form-element-button n2-h5 n2-uc" href="#">' . n2_('Choose') . '</a>' . parent::fetchElement()); N2JS::addInline(' new NextendElementIconManager("' . $this->_id . '"); '); return $html; }
function fetchElement() { $html = "<div class='n2-form-element-onoff " . $this->isOn() . "' style='" . N2XmlHelper::getAttribute($this->_xml, 'style') . "'>"; $html .= N2Html::tag('div', array('class' => 'n2-onoff-slider'), N2Html::tag('div', array('class' => 'n2-onoff-no'), '<i class="n2-i n2-i-close"></i>') . N2Html::tag('div', array('class' => 'n2-onoff-round')) . N2Html::tag('div', array('class' => 'n2-onoff-yes'), '<i class="n2-i n2-i-tick"></i>')); $html .= parent::fetchElement(); $html .= "</div>"; N2JS::addInline('new NextendElementOnoff("' . $this->_id . '");'); return $html; }
function fetchElement() { $areas = ''; for ($i = 1; $i <= 12; $i++) { $areas .= N2Html::tag('div', array('class' => 'n2-area n2-area-' . $i . $this->isSelected($i), 'data-area' => $i)); } $html = N2Html::tag('div', array('id' => $this->_id . '_area', 'class' => 'n2-widget-area'), N2Html::tag('div', array('class' => 'n2-widget-area-inner')) . $areas); $html .= parent::fetchElement(); N2JS::addInline('new NextendElementSliderWidgetArea("' . $this->_id . '");'); return $html; }
function fetchElement() { N2JS::addInline('new NextendElementFont("' . $this->_id . '", { previewmode: "' . N2XmlHelper::getAttribute($this->_xml, 'previewmode') . '", style: "' . N2XmlHelper::getAttribute($this->_xml, 'style') . '", style2: "' . N2XmlHelper::getAttribute($this->_xml, 'style2') . '", preview: ' . json_encode((string) $this->_xml) . ', set: "' . N2XmlHelper::getAttribute($this->_xml, 'set') . '" });'); return N2Html::tag('div', array('class' => 'n2-form-element-option-chooser n2-border-radius'), parent::fetchElement() . N2Html::tag('input', array('type' => 'text', 'class' => 'n2-h5', 'style' => 'width: 130px;' . N2XmlHelper::getAttribute($this->_xml, 'css'), 'disabled' => 'disabled'), false) . N2Html::tag('a', array('href' => '#', 'class' => 'n2-form-element-clear'), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-empty n2-i-grey-opacity'), '')) . N2Html::tag('a', array('href' => '#', 'class' => 'n2-form-element-button n2-h5 n2-uc'), n2_('Font'))); }
function fetchElement() { $widgetTypes = $this->getOptions(); $id = 'n2-form-matrix-' . $this->_id; $html = N2Html::openTag("div", array('id' => $id, "class" => "n2-form-matrix")); $value = $this->getValue(); $test = false; foreach ($widgetTypes as $type => $v) { if ($value == $type) { $test = true; break; } } if (!$test) { $value = 'arrow'; } $html .= N2Html::openTag('div', array('class' => 'n2-h2 n2-content-box-title-bg n2-form-matrix-views')); $class = 'n2-underline n2-h4 n2-uc n2-has-underline n2-form-matrix-menu'; foreach ($widgetTypes as $type => $v) { $html .= N2Html::tag("div", array("onclick" => "n2('#{$this->_id}').val('{$type}');", "class" => $class . ($value == $type ? ' n2-active' : '')), N2Html::tag("span", array("class" => "n2-underline"), $v[0])); } $html .= N2Html::closeTag("div"); $html .= N2Html::openTag("div", array("class" => "n2-tabs")); foreach ($widgetTypes as $type => $v) { $html .= N2Html::openTag('div', array('class' => 'n2-form-matrix-pane' . ($value == $type ? ' n2-active' : ''))); $GLOBALS['nextendbuffer'] = ''; $form = new N2Form($this->_form->appType); $form->_data =& $this->_form->_data; $form->loadXMLFile($v[1] . 'config.xml'); ob_start(); $form->render($this->control_name); $html .= ob_get_clean(); $html .= $GLOBALS['nextendbuffer']; $html .= N2Html::closeTag("div"); } $html .= N2Html::closeTag("div"); $html .= N2Html::closeTag("div"); N2JS::addInline(' (function(){ var matrix = $("#' . $id . '"), views = matrix.find("> .n2-form-matrix-views > div"), panes = matrix.find("> .n2-tabs > div"); views.on("click", function(){ views.removeClass("n2-active"); panes.removeClass("n2-active"); var i = views.index(this); views.eq(i).addClass("n2-active"); panes.eq(i).addClass("n2-active"); }); })() '); return $html . parent::fetchElement(); }
function fetchElement() { $preview = preg_replace_callback('/url\\(\'(.*?)\'\\)/', 'N2ElementStyle::fixPreviewImages', (string) $this->_xml); N2JS::addInline('new NextendElementStyle("' . $this->_id . '", { previewmode: "' . N2XmlHelper::getAttribute($this->_xml, 'previewmode') . '", font: "' . N2XmlHelper::getAttribute($this->_xml, 'font') . '", font2: "' . N2XmlHelper::getAttribute($this->_xml, 'font2') . '", style2: "' . N2XmlHelper::getAttribute($this->_xml, 'style2') . '", preview: ' . json_encode($preview) . ', set: "' . N2XmlHelper::getAttribute($this->_xml, 'set') . '" });'); return N2Html::tag('div', array('class' => 'n2-form-element-option-chooser n2-border-radius'), parent::fetchElement() . N2Html::tag('input', array('type' => 'text', 'class' => 'n2-h5', 'style' => 'width: 130px;' . N2XmlHelper::getAttribute($this->_xml, 'css'), 'disabled' => 'disabled'), false) . N2Html::tag('a', array('href' => '#', 'class' => 'n2-form-element-clear'), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-empty n2-i-grey-opacity'), '')) . N2Html::tag('a', array('href' => '#', 'class' => 'n2-form-element-button n2-h5 n2-uc'), n2_('Style'))); }
function fetchElement() { $values = array(); $html = "<div class='n2-form-element-switcher' style='" . N2XmlHelper::getAttribute($this->_xml, 'style') . "'>"; $i = 0; $units = count($this->_xml->unit) - 1; $currentValue = $this->getValue(); foreach ($this->_xml->unit as $unit) { $value = (string) $unit->attributes()->value; $values[] = $value; $html .= N2Html::tag('div', array('class' => 'n2-switcher-unit n2-h5 n2-uc ' . ($value == $currentValue ? 'n2-active ' : '') . ($i == 0 ? 'n2-first ' : '') . ($i == $units ? 'n2-last ' : '')), n2_((string) $unit)); $i++; } $html .= parent::fetchElement(); $html .= "</div>"; N2JS::addInline('new NextendElementSwitcher("' . $this->_id . '", ' . json_encode($values) . ');'); return $html; }
function fetchElement() { $this->_values = explode('||', $this->getValue()); if (!is_array($this->_values)) { $this->_values = array(); } $this->_multiple = intval(N2XmlHelper::getAttribute($this->_xml, 'multiple')); $this->_translateable = intval(N2XmlHelper::getAttribute($this->_xml, 'translateable')); $size = N2XmlHelper::getAttribute($this->_xml, 'size'); if ($size != '') { $size = " size='" . $size . "'"; } $html = N2Html::openTag("div", array("class" => "n2-form-element-list", "style" => N2XmlHelper::getAttribute($this->_xml, 'style'))); $html .= "<select id='" . $this->_id . "_select' name='select" . $this->_inputname . "' " . $size . $this->isMultiple() . " autocomplete='off'>"; $html .= $this->generateOptions($this->_xml); if ($this->_xml->optgroup) { $html .= $this->generateOptgroup($this->_xml); } $html .= "</select>"; $html .= N2Html::closeTag("div"); $html .= parent::fetchElement(); N2JS::addInline('new NextendElementList("' . $this->_id . '", ' . $this->_multiple . ', "' . $this->getValue() . '");'); return $html; }
function fetchElement() { N2Localization::addJS(array('Disabled', 'Multiple animations', 'Single animation')); N2JS::addInline('new NextendElementAnimationManager("' . $this->_id . '", "backgroundanimationManager");'); return N2Html::tag('div', array('class' => 'n2-form-element-option-chooser n2-border-radius'), parent::fetchElement() . N2Html::tag('input', array('type' => 'text', 'class' => 'n2-h5', 'style' => 'width: 130px;' . N2XmlHelper::getAttribute($this->_xml, 'css'), 'disabled' => 'disabled'), false) . N2Html::tag('a', array('href' => '#', 'class' => 'n2-form-element-clear'), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-empty n2-i-grey-opacity'), '')) . N2Html::tag('a', array('href' => '#', 'class' => 'n2-form-element-button n2-h5 n2-uc'), n2_('Animations'))); }
function fetchElement() { N2JS::addInline('new NextendElementLayerPicker("' . $this->_id . '");'); return parent::fetchElement() . N2Html::tag('div', array('class' => 'n2-ss-layer-picker'), '<i class="n2-i n2-it n2-i-16 n2-i-layerlink"></i>'); }