8889841cBlockButtonImport.php 0000644 00000000441 15051561343 0010700 0 ustar 00 setLabel(n2_('Import')); $this->setBig(); $this->setGreen(); } } BlockButtonBack.php 0000644 00000000440 15051561343 0010265 0 ustar 00 setLabel(n2_('Back')); $this->setBig(); $this->setGreyDark(); } } BlockButtonCancel.php 0000644 00000000437 15051561343 0010620 0 ustar 00 setLabel(n2_('Cancel')); $this->setBig(); $this->setRed(); } } AbstractButton.php 0000644 00000004173 15051561343 0010224 0 ustar 00 getContent(), $this->getUrl(), $this->getAttributes()), Sanitize::$adminTemplateTags); } abstract protected function getContent(); /** * @return string */ public function getUrl() { return $this->url; } /** * @param string $url */ public function setUrl($url) { $this->url = $url; } /** * @param $className */ public function addClass($className) { $this->classes[] = $className; } public function addAttribute($name, $value) { $this->attributes[$name] = $value; } public function getAttributes() { $classes = array_merge(array($this->baseClass), $this->getClasses()); return $this->attributes + array('class' => implode(' ', $classes)); } /** * @param string $target */ public function setTarget($target) { $this->addAttribute('target', $target); } /** * @return array */ public function getClasses() { $classes = $this->classes; $classes[] = $this->baseClass . '--' . $this->size; return $classes; } public function setSmall() { $this->size = 'small'; } public function setMedium() { $this->size = 'medium'; } public function setBig() { $this->size = 'big'; } /** * @param integer $tabIndex */ public function setTabIndex($tabIndex) { $this->tabindex = $tabIndex; if ($this->tabindex === 0) { unset($this->attributes['tabindex']); } else { $this->attributes['tabindex'] = $this->tabindex; } } } BlockButtonPlainIcon.php 0000644 00000000662 15051561343 0011307 0 ustar 00 icon . '">'; } /** * @param string $icon */ public function setIcon($icon) { $this->icon = $icon; } } BlockButtonIconCode.php 0000644 00000000325 15051561343 0011112 0 ustar 00 icon; } } BlockButtonSpacer.php 0000644 00000001145 15051561343 0010645 0 ustar 00 isVisible) { $classes[] = 'n2_button_spacer--visible'; } echo '
'; } /** * @param bool $isVisible */ public function setIsVisible($isVisible) { $this->isVisible = $isVisible; } } AbstractButtonLabel.php 0000644 00000002421 15051561343 0011156 0 ustar 00 iconBefore)) { $content .= ''; } $content .= '' . $this->getLabel() . ''; if (!empty($this->icon)) { $content .= ''; } return $content; } /** * @return string */ public function getLabel() { return $this->label; } /** * @param string $label */ public function setLabel($label) { $this->label = $label; } /** * @param string $icon */ public function setIcon($icon) { $this->icon = $icon; } /** * @param string $icon * @param string $extraClass */ public function setIconBefore($icon, $extraClass = "") { $this->iconBefore = $icon; $this->iconBeforeClass = $extraClass; } } BlockButtonSave.php 0000644 00000000435 15051561343 0010327 0 ustar 00 setLabel(n2_('Save')); $this->setBig(); $this->setGreen(); } } BlockButtonApply.php 0000644 00000000437 15051561343 0010520 0 ustar 00 setLabel(n2_('Apply')); $this->setBig(); $this->setGreen(); } } BlockButtonPlain.php 0000644 00000001053 15051561343 0010471 0 ustar 00 color = 'blue'; } /** * @return array */ public function getClasses() { $classes = parent::getClasses(); if (!empty($this->color)) { $classes[] = $this->baseClass . '--color-' . $this->color; } return $classes; } } BlockButtonDashboardInfo.php 0000644 00000001016 15051561343 0012130 0 ustar 00 setTabIndex(-1); } protected function getContent() { return ''; } } BlockButton.php 0000644 00000001342 15051561343 0007506 0 ustar 00 color = 'blue'; } public function setGreen() { $this->color = 'green'; } public function setRed() { $this->color = 'red'; } public function setGrey() { $this->color = 'grey'; } public function setGreyDark() { $this->color = 'grey-dark'; } public function getClasses() { $classes = parent::getClasses(); $classes[] = $this->baseClass . '--' . $this->color; return $classes; } } BlockButtonIcon.php 0000644 00000001355 15051561343 0010323 0 ustar 00 color = 'blue'; } public function setGreen() { $this->color = 'green'; } public function setRed() { $this->color = 'red'; } public function setGrey() { $this->color = 'grey'; } public function setGreyDark() { $this->color = 'grey-dark'; } public function getClasses() { $classes = parent::getClasses(); $classes[] = $this->baseClass . '--' . $this->color; return $classes; } } ItemButtonFrontend.php 0000644 00000003342 15052207135 0011051 0 ustar 00 getHtml(); } public function renderAdminTemplate() { return $this->getHtml(); } private function getHtml() { $owner = $this->layer->getOwner(); $this->loadResources($owner); $font = $owner->addFont($this->data->get('font'), 'link'); $html = Html::openTag("div", array( "class" => "n2-ss-button-container n2-ss-item-content n2-ow " . $font . ($this->data->get('nowrap', 1) ? ' n2-ss-nowrap' : '') . ($this->isAuto() ? ' n2-ss-button-container--non-full-width' : '') )); $content = '