Support class for WEBvivo panel generation
showConfig($cnf) - Generate and show a bootstrap 3 panel menu
* menu values
* ----------
* menu (array): Call $this->showMenu() to show menu.
* Every menu item values (icon, scr, title, href,btn), i.e.:
* $cnf['menu'][] = ['icon'=>'account','scr'=>'user_type','title'=>'User Type','btn'=>'primary']
*
* item values
* -----------
* $cnf['title'] (str): Panel title
* $cnf['icon'] (str): Icon name
* $cnf['icon_set'] (str): Set of icons fa, glyphicon, mdi (mdi by default)
* $cnf['back']: Page to return to
* $cnf['cnf_cat'] (str): Framework keys category
* $cnf['cnf_key'] (str): Framework keys keyword
* $cnf['item'][] (array): Every panel item values (name,title,type)
*
* item array values
* -----------------
* $cnf['item'][] = [cat=>'',name=>'',title=>'',scale=>'',type=>'',readonly=>true]
*
* cat (str): Show a table row with category text (no input inserted)
* name (str): Input field name
* title (str): Input field Title
* scale (str): Text, image, symbol after input line
* type (str): Type of input (text, number, radio, checkbox, select, list, hidden)
* readonly (bool): true to ser input as read only
*
* input types
* -----------
* checkbox: single checkbox item
* radio|select: Radio or select list. Values should be passed by array, i.e:
* [type=>'select','options'=>[0=>['title'=>'Spain','value'=>'ES'],1=>['title'=>'France','value'=>'FR']]]
* list: List of items |count=Number of items in list, default=array with default list of elements |hidden=array with hidden IDs, ie:
* [type=>'list','count'=>2',default'=>['Spain','France'],'hidden'=>[0]]
* text|date|datetime-local|email|number|password|range|tel|time|url
* opt: Alternative CSS input options, i.e. 'opt'=>['min'=>1,'step'=>'any']
*
*
* Select example:
$opt[0] = ['title'=>'None','value'=>'0'];
$opt[1] = ['title'=>'By price','value'=>'1'];
$opt[2] = ['title'=>'By shipping','value'=>'2'];
$cnf['item'][] = ['name'=>'item_name','title'=>'Shipping type',
'type'=>'select','options'=>$opt];
*
* Radio example:
$opt[0] = ['title'=>'None','value'=>'0'];
$opt[1] = ['title'=>'By price','value'=>'1'];
$opt[2] = ['title'=>'By shipping','value'=>'2'];
$cnf['item'][] = ['name'=>'item_name','title'=>'Shipping type',
'type'=>'radio','options'=>$opt];
* List example:
$cnf['item'][] = ['name'=>'colors','title'=>'Colors','type'=>'list','count'=>3,'default'=>['Red','Blue','Yellow']];
*
* Cat example:
$cnf['item'][] = ['type'=>'cat','title'=>'CATEGORY TEXT'];
* checkbox example:
$cnf['item'][] = ['name'=>'freeship','title'=>'Free shipping',
'type'=>'checkbox'];
* Number example:
$cnf['item'][] = ['name'=>'price','title'=>'Price',
'scale'=>'&eur;','type'=>'number',
'opt'=>['min'=>0,'step'=>'any']];
* Text example:
$cnf['item'][] = ['name'=>'country_list',
'title'=>'Countries to ship to',
'type'=>'text','scale'=>'ISO code comma separated'];
* Number example:
$cnf['item'][] = ['name'=>'shipping_price',
'title'=>'Shipping Price',
'type'=>'number','opt'=>['min'=>0,'step'=>'any']];
showMenu($cnf) - Generate and show a bootstrap 3 button panel menu
item values of $cnf['menu']
* ---------------------------
* ['item'][]: Every main menu item values (icon, scr, title, href,btn,dis):
* icon: Menu icon name (default mdi set)
* scr: Value por _scr (screen to show on click)
* title: Menú title
* btn: Bootstrap btn type (default, success, danger, info, primary)
* dis: true to disable the button
* $cnf['title'] (str): Panel title
* $cnf['icon'] (str): Icon name
* $cnf['icon_set'] (str): Set of icons fa, glyphicon, mdi (mdi by default)
* $cnf['back']: Page to return to
*
* ths: Panel title header size
* ihs: Item button title header size
showBtnBar($cnf) - Generate and show a Bootstrap 3 button bar
*
* main bar conf values
* ############
* color = [info] - Background color style (default|primary|success|info|warning|danger|gray)
* class = [box-bordered] - Bar css class
*
* item conf values (values for every bar item)
* ##########################
* OBLIGATORIOS
* tag = Tag type of item (raw|btn|a|span)
* order (int) = Order of item in their position
* align = [left] Position in bar (left|right)
*
* OPCIONALES
* content = If raw tag, html code of item
* margin (int) = Margin of item
* margin_left (int) = Margin left of item
* margin_right (int) = Margin right of item
* dis = true to disable item
* href = If a tag, URL to link botton to
* btn_size = [sm] Button size (xs|sm|md|lg)
* btn_color = [default] Button color (default|primary|success|info|warning|danger|gray)
* btn_id = Button ID
* btn_title = Button title text
* btn_style = Button style
* btn_tt = Valid position to activate "tooltip" (top|bottom|right|left)
* btn_type = [submit] (only to btn tag) - If btn tag, "type" of button (button|submit|reset)
* btn_name = (only to btn tag) - Value to name parameter of button tag
* btn_value = (only to btn tag) -Value to value parameter of button tag
* only_txt (bool) = If true, only a text is generated (no button class added)
* icon = Icon class. i.e. (mdi mdi-account)
* icon_align = [left] Position of the icon in relation to the text (left|right)
* text = Text of item
* txt_color = [default] Text color (default|primary|success|info|warning|danger|gray)
* txt_padding (int) = Text padding
* txt_padding_left (int) = Text left padding
* txt_padding_right (int) = Text right padding
* txt_align = [left] Text align (left|center|right|justify|nowrap)
* txt_case = Text case (lowercase|uppercase|capitalize)