diff --git a/docs/50_Components/Card.md b/docs/50_Components/Card.md index 99d0bd89207351fea00b56d163c516e2dfe95d1c..2cb8563e23d2ae05455ac76c8df92bc4df615cc2 100644 --- a/docs/50_Components/Card.md +++ b/docs/50_Components/Card.md @@ -33,11 +33,11 @@ Set to true to show it; default: none of it is visible Key | Description --- | --- -tb-collaps | -tb-expand | it is added automatically if you set 'state'=>'collapsed' -tb-maximize | -tb-minimize | it is added automatically if you set 'state'=>'maximized' -tb-remove | +tb-collapse | show minus icon to collapse widget +tb-expand | show plus button to expand; it is added automatically if you set 'state'=>'collapsed' +tb-maximize | show maximize button +tb-minimize | show minimize button; it is added automatically if you set 'state'=>'maximized' +tb-remove | show cross button to remove widget Content: diff --git a/public_html/classes/render-adminlte.class.php b/public_html/classes/render-adminlte.class.php index f6fa69e137d0ccbf2bf48389085dcbdda4f02cf2..c48847c832060a11b988583145534f5980d6fe65 100755 --- a/public_html/classes/render-adminlte.class.php +++ b/public_html/classes/render-adminlte.class.php @@ -476,13 +476,15 @@ class renderadminlte { public function getButton($aOptions){ $aOptions=$this->_ensureOptions($aOptions, ['type', 'size', 'class', 'text', 'icon']); $aElement=$aOptions; - $aElement['class']='btn ' + $aElement['class']='btn' .($aOptions['class'] ? ' '.$aOptions['class'] : '') .($aOptions['type'] ? ' btn-'.$aOptions['type'] : '') .($aOptions['size'] ? ' btn-'.$aOptions['size'] : '') ; $aElement['label']=$aOptions['text'] ? $aOptions['text'] : ' '; - unset($aElement['_infos']); + foreach(['_infos', 'type', 'size', 'icon', 'text'] as $sDeleteKey){ + unset($aElement[$sDeleteKey]); + } return $this->_tag('button', $aElement); } @@ -530,7 +532,7 @@ class renderadminlte { * - state - one of [none]|collapsed|maximized * * >> toolbar icons - set to true to show it; default: none of it is visible - * - tb-collaps + * - tb-collapse * - tb-expand it is added automatically if you set 'state'=>'collapsed' * - tb-maximize * - tb-minimize it is added automatically if you set 'state'=>'maximized' @@ -559,7 +561,7 @@ class renderadminlte { 'maximized'=>[ 'class'=>'maximized-card', 'tool'=>'tb-minimize'], ]; $aTools=[ - 'tb-collaps'=>'<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i></button>', + 'tb-collapse'=>'<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i></button>', 'tb-expand'=>'<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-plus"></i></button>', 'tb-maximize'=>'<button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-expand"></i></button>',