Skip to content
Snippets Groups Projects
Commit c6762dbb authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

uupdate colors; add badge

parent 272da4e7
No related branches found
No related tags found
No related merge requests found
......@@ -8,21 +8,37 @@ $sComponent=(isset($_GET['id']) ? preg_replace('/[^a-z]/', '', $_GET['id']) : ''
$aPresets=[
'yesno'=>[
'colors'=>[
// https://adminlte.io/themes/v3/pages/UI/general.html
''=>'no value',
'0'=>'no',
'1'=>'yes',
'indigo'=>'indigo',
'lightblue'=>'',
'navy'=>'',
'purple'=>'',
'fuchsia'=>'',
'pink'=>'',
'maroon'=>'',
'orange'=>'',
'lime'=>'',
'teal'=>'',
'olive'=>'',
'black'=>'black',
'dark'=>'dark gray',
'gray'=>'gray',
'light'=>'light gray',
],
'type'=>[
''=>'no value',
'danger'=>'red',
'dark'=>'dark gray',
'gray'=>'gray',
'info'=>'aqua',
'primary'=>'blue',
'secondary'=>'gray',
'success'=>'green',
'warning'=>'yellow',
'dark'=>'dark gray',
'gray'=>'gray',
],
'shadow'=>[
''=>'no value',
......@@ -30,7 +46,13 @@ $aPresets=[
'small'=>'small',
'regular'=>'regular',
'large'=>'large'
]
],
// for keys: dismissable
'yesno'=>[
''=>'no value',
'0'=>'no',
'1'=>'yes',
],
];
// ----------------------------------------------------------------------
......@@ -52,6 +74,21 @@ $aComponents=[
]
],
// ------------------------------------------------------------
'badge'=>[
'label'=>'Badge',
'description'=>'Tiny additional info; mostly as counter',
'method'=>'getBadge',
'params'=>[
'type' => ['select'=>$aPresets['type'], 'default'=>'danger'],
'bgcolor' => ['select'=>$aPresets['colors'], 'default'=>''],
'class' => ['default'=>''],
'id' => ['default'=>''],
'title' => ['default'=>'Errors: 5'],
'text' => ['default'=>'5'],
]
],
// ------------------------------------------------------------
'infobox'=>[
'label'=>'Infobox',
'description'=>'',
......@@ -100,8 +137,9 @@ if(!isset($aComponents[$sComponent])){
? $aParam['default']
: ''
));
if($sValue!==''){
$aWidgetOptions[$sOptionkey]=$sValue;
}
if (isset($aParam['select'])){
foreach($aParam['select'] as $sSelectItem=>$sLabel){
// $sInput.='<option value="'.$sSelectItem.'">'.($sSelectItem ? $sSelectItem : '-- none --').'</option>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment