diff --git a/framework/elements/accordion/accordion.php b/framework/elements/accordion/accordion.php index 375c03c5..d4cfd423 100644 --- a/framework/elements/accordion/accordion.php +++ b/framework/elements/accordion/accordion.php @@ -27,7 +27,11 @@ return false; } $style = $params->get('style', ''); +$style = $params->get('style', ''); $style = $style !== '' ? ' '. $style : ''; + +$collapse = $params->get('collapse', ''); +$always_open = $params->get('always_open', 0); $wa = Factory::getApplication()->getDocument()->getWebAssetManager(); $wa->useScript('bootstrap.collapse'); echo '
'; @@ -36,10 +40,10 @@ echo '
'; echo '

'; - echo ''; + echo ''; echo '

'; - echo '
'; + echo '
'; echo '
'. $item_params->get('content', '') . '
'; echo '
'; diff --git a/framework/elements/accordion/accordion.xml b/framework/elements/accordion/accordion.xml index d6e35c27..9af16087 100644 --- a/framework/elements/accordion/accordion.xml +++ b/framework/elements/accordion/accordion.xml @@ -25,6 +25,11 @@ + + + + + diff --git a/framework/elements/button/button.php b/framework/elements/button/button.php index 200f0680..b68eb9f7 100644 --- a/framework/elements/button/button.php +++ b/framework/elements/button/button.php @@ -47,8 +47,22 @@ if (isset($btn_params['icon']) && $btn_params['icon']) { $title = $btn_params['icon_position'] === 'first' ? '' . $title : $title . ''; } + $btn_element_size = $button_size; + if (isset($btn_params['button_size']) && $btn_params['button_size']) { + $btn_element_size = ' ' . $btn_params['button_size']; + // Item Padding + if (trim($btn_params['button_size']) == 'custom') { + $item_padding = $btn_params['btn_padding']; + if (!empty($item_padding)) { + $padding = \json_decode($item_padding, false); + foreach ($padding as $device => $props) { + $element->style->child('#btn-'.$button->id)->addStyle(Style::spacingValue($props, "padding"), $device); + } + } + } + } $link_target = !empty($btn_params['link_target']) ? ' target="'.$btn_params['link_target'].'"' : ''; - echo ''.$title.''; + echo ''.$title.''; } echo '
'; diff --git a/framework/elements/button/button.xml b/framework/elements/button/button.xml index b5d0c23c..29c52b79 100644 --- a/framework/elements/button/button.xml +++ b/framework/elements/button/button.xml @@ -38,6 +38,13 @@ + + + + + + + diff --git a/language/en-GB/en-GB.astroid.ini b/language/en-GB/en-GB.astroid.ini index b810c3a1..9dc43c66 100644 --- a/language/en-GB/en-GB.astroid.ini +++ b/language/en-GB/en-GB.astroid.ini @@ -1647,4 +1647,8 @@ ASTROID_WIDGET_FORM_SHOW_LABEL_LABEL="Show Label" ; Accordion ASTROID_WIDGET_ACCORDION_LABEL="Accordion" -ASTROID_WIDGET_ACCORDION_ITEMS_LABEL="Accordion Items" \ No newline at end of file +ASTROID_WIDGET_ACCORDION_ITEMS_LABEL="Accordion Items" +ASTROID_WIDGET_ACCORDION_COLLAPSE_STYLE_LABEL="Collapse style" +ASTROID_WIDGET_ACCORDION_CLOSE_ALL_LABEL="Close All" +ASTROID_WIDGET_ACCORDION_OPEN_FIRST_ITEM_LABEL="Open first item" +ASTROID_WIDGET_ACCORDION_ALWAYS_OPEN_LABEL="Always Open?" \ No newline at end of file