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']) : '' ...@@ -8,21 +8,37 @@ $sComponent=(isset($_GET['id']) ? preg_replace('/[^a-z]/', '', $_GET['id']) : ''
$aPresets=[ $aPresets=[
'yesno'=>[ 'colors'=>[
// https://adminlte.io/themes/v3/pages/UI/general.html
''=>'no value', ''=>'no value',
'0'=>'no', 'indigo'=>'indigo',
'1'=>'yes', 'lightblue'=>'',
'navy'=>'',
'purple'=>'',
'fuchsia'=>'',
'pink'=>'',
'maroon'=>'',
'orange'=>'',
'lime'=>'',
'teal'=>'',
'olive'=>'',
'black'=>'black',
'dark'=>'dark gray',
'gray'=>'gray',
'light'=>'light gray',
], ],
'type'=>[ 'type'=>[
''=>'no value', ''=>'no value',
'danger'=>'red', 'danger'=>'red',
'dark'=>'dark gray',
'gray'=>'gray',
'info'=>'aqua', 'info'=>'aqua',
'primary'=>'blue', 'primary'=>'blue',
'secondary'=>'gray', 'secondary'=>'gray',
'success'=>'green', 'success'=>'green',
'warning'=>'yellow', 'warning'=>'yellow',
'dark'=>'dark gray',
'gray'=>'gray',
], ],
'shadow'=>[ 'shadow'=>[
''=>'no value', ''=>'no value',
...@@ -30,7 +46,13 @@ $aPresets=[ ...@@ -30,7 +46,13 @@ $aPresets=[
'small'=>'small', 'small'=>'small',
'regular'=>'regular', 'regular'=>'regular',
'large'=>'large' 'large'=>'large'
] ],
// for keys: dismissable
'yesno'=>[
''=>'no value',
'0'=>'no',
'1'=>'yes',
],
]; ];
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
...@@ -52,6 +74,21 @@ $aComponents=[ ...@@ -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'=>[ 'infobox'=>[
'label'=>'Infobox', 'label'=>'Infobox',
'description'=>'', 'description'=>'',
...@@ -100,8 +137,9 @@ if(!isset($aComponents[$sComponent])){ ...@@ -100,8 +137,9 @@ if(!isset($aComponents[$sComponent])){
? $aParam['default'] ? $aParam['default']
: '' : ''
)); ));
if($sValue!==''){
$aWidgetOptions[$sOptionkey]=$sValue; $aWidgetOptions[$sOptionkey]=$sValue;
}
if (isset($aParam['select'])){ if (isset($aParam['select'])){
foreach($aParam['select'] as $sSelectItem=>$sLabel){ foreach($aParam['select'] as $sSelectItem=>$sLabel){
// $sInput.='<option value="'.$sSelectItem.'">'.($sSelectItem ? $sSelectItem : '-- none --').'</option>'; // $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