new bootstrap3(app, engine, view)
- Description:
Bootstrap V3 tools. These tools are used when
BOOTSTRAP_VERSION
system parameter's value is3
Parameters:
Name | Type | Description |
---|---|---|
app |
Business application |
|
engine |
Main UI controller |
|
view |
View engine |
Methods
accordion(ctn)
- Description:
Manage collapsible panels as accordion
Parameters:
Name | Type | Description |
---|---|---|
ctn |
Object | container of panels .collapse |
actionButton(a, o, rowid, onClick, minified)
- Description:
Button of action
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Action { name, label, level, primary, icon, help, showLabel, toState, custom, enabled, disabled, style, size } |
o |
BusinessObject | Business object |
rowid |
string | Optional row ID |
onClick |
function | Handler |
minified |
boolean | hide label ? |
actionIcon(p)
- Description:
Icon button
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | optional parameters Properties
|
actionPlus(items, right, dropUp)
- Description:
Create a 'plus' button
Parameters:
Name | Type | Description |
---|---|---|
items |
Array of item (li) |
|
right |
Align popup to the right of button |
|
dropUp |
on top ? |
addTab(t, tab, active)
- Description:
Add a tab
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | existing tabs |
tab |
Object | tab options { title, icon, content, hidden, click, key, data } |
active |
boolean | activate this tab? |
alert(h, level)
- Description:
Simple alert content
Parameters:
Name | Type | Description |
---|---|---|
h |
HTML content |
|
level |
optional info|success|warning|danger |
button(p)
- Description:
Create a button
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | options Properties
|
buttonHelp(name, help, title)
- Description:
Return a simple help icon with a popover or a dialog when help is too long
Parameters:
Name | Type | Description |
---|---|---|
name |
string | button name |
help |
string | text or html |
title |
string | optional title of dialog |
check(d)
- Description:
Simple checkbox or radio
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d |
Object | id, name, value, label, disabled, change, type Properties
|
col(size, content)
- Description:
Simple column
Parameters:
Name | Type | Description |
---|---|---|
size |
string | media-width (i.e short syntax 'md-5' or long syntax 'col-lg-4 col-md-8'), default 'col-xs-12' |
content |
jQuery | Array.<jQuery> | optional content or array of contents |
compat()
- Description:
Backward compatibility with V3: nothing to do
danger(h)
- Description:
Simple error
Parameters:
Name | Type | Description |
---|---|---|
h |
Content |
dialog(p)
- Description:
Dialog box
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | String content or object Properties
|
dialogClose(dlg, cbk)
- Description:
Close the dialog box
Parameters:
Name | Type | Description |
---|---|---|
dlg |
string | jQuery | name or modal, undefined = close the top dialog if unset, "all" = close all |
cbk |
function | optional callback when dialog is closed |
displayField()
- Description:
Field rendering
displayFieldSearch()
- Description:
Field search rendering
displayLinkSearch()
- Description:
Link search rendering (for N,N pillbox)
dropdown(elt, btn, items, right, dropUp)
- Description:
Create a dropdown button
Parameters:
Name | Type | Description |
---|---|---|
elt |
optional left side of button |
|
btn |
toggle button |
|
items |
Object | List of $ or action |
right |
align popup on right side of button |
|
dropUp |
true to drop on the top of button |
dropup(elt, btn, items, right)
- Description:
Create a dropup button
Parameters:
Name | Type | Description |
---|---|---|
elt |
optional left side of button |
|
btn |
toggle button |
|
items |
Object | List of $ or action |
right |
align popup on right side of button |
fieldDatePicker(elt, type, lang, dateformat, startDate, rdg)
- Description:
Datetime picker
Parameters:
Name | Type | Description |
---|---|---|
elt |
button to attach with picker |
|
type |
field type TYPE_DATE | DATETIME | TIME |
|
lang |
user language |
|
dateformat |
date format |
|
startDate |
optional start date |
|
rdg |
optional rendering limit Y|M|D|H|I|S |
fieldDatePickerSearch(f, filter, id, options)
- Description:
Datetime picker for search
Parameters:
Name | Type | Description |
---|---|---|
f |
Object | Object field |
filter |
string | Field filter YYYY-MM-DD HH:MI:SS or YYYY-MM-DD |
id |
string | input id |
options |
Object | { searchby:(on list column), position:(default "bottom-left") } |
form(p)
- Description:
Simple form
Parameters:
Name | Type | Description |
---|---|---|
p |
Object |
|
formGroup(name, label, inp, msg)
- Description:
Form group of input
Parameters:
Name | Type | Description |
---|---|---|
name |
group name |
|
label |
optional label or text |
|
inp |
input group |
|
msg |
optional message |
formGroupSearch(cls, label, input)
- Description:
Form group for search form
Parameters:
Name | Type | Description |
---|---|---|
cls |
class |
|
label |
text |
|
input |
input |
getDialog(dlg)
- Description:
Find a visible dialog
Parameters:
Name | Type | Description |
---|---|---|
dlg |
string | optional dialog, name or "all", or returns the top level dialog if unset |
getTabActive(t)
- Description:
Get the active tab anchor with data
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | tabs |
getTabPane(t, index)
- Description:
Get a tab container
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | tabs |
index |
number | string | tab index or tab data-key |
getTabs(t, s)
- Description:
Get the tab anchors with data
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | tabs |
s |
string | optional anchor selector |
getTemplate()
- Description:
Get template for v3 (with panel)
getVersion()
- Description:
Bootstrap 3 full version (ex 3.3.4)
help(h)
- Description:
Simple help
Parameters:
Name | Type | Description |
---|---|---|
h |
Content as safe HTML (any script is ignored) |
hideTooltips()
- Description:
Clear remaining tooltips
icon(name, cls)
- Description:
Simple icon
Parameters:
Name | Type | Description |
---|---|---|
name |
string | glyph icon name or prefixed by gly/ fas/ far/ |
cls |
string | optional class name |
image(src)
- Description:
Get responsive image (.img-responsive)
Parameters:
Name | Type | Description |
---|---|---|
src |
string | source |
input(a)
- Description:
Input with attributes
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Optional attributes |
inputGroup(inp, addons)
- Description:
Create an input group with addons actions
Parameters:
Name | Type | Description |
---|---|---|
inp |
Input |
|
addons |
Array | Object | Array of $ or actions |
isDialogModal(dlg)
- Description:
Is the dialog modal (no keyboard ESC and no close button) ?
Parameters:
Name | Type | Description |
---|---|---|
dlg |
string | optional name or top level dialog if unset |
load()
- Description:
Load bootstrap libs
message(m)
- Description:
Inlined message alert
Parameters:
Name | Type | Description |
---|---|---|
m |
string | Object | string or |
panel(params)
- Description:
Simple panel
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | { id, title, icon, content, hidden, collapsed, onCollapsed, footer } Properties
|
progressBar(id, p)
- Description:
Progress bar
Parameters:
Name | Type | Description |
---|---|---|
id |
Progress div or id |
|
p |
value in percent [0..100] |
radio(d)
- Description:
Simple radio
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d |
Object | id, name, value, label, disabled, change Properties
|
readSearch(ctn, o, noRemove)
- Description:
Read the search form into object filters
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | form container |
o |
Simplicite.Ajax.BusinessObject | Object |
noRemove |
boolean | true to keep filter with default "%" |
ready()
- Description:
Home is displayed
removeTab(t, index, prev)
- Description:
Remove a tab
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | tabs |
index |
number | string | tab index or tab data-key |
prev |
boolean | click on previous (or next) tab if exists |
row(cols)
- Description:
Create a row with columns
Parameters:
Name | Type | Description |
---|---|---|
cols |
Array of columns |
select(a, o)
- Description:
Select with options
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Object with attributes |
o |
Array | Array of |
setTabContent(t, index, content)
- Description:
Set a tab content
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | tabs |
index |
number | string | tab index or tab data-key |
content |
string | HTML content |
showTab(t, id, show)
- Description:
Show/hide a tab in a tabs and ensure to activate a visible tab
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | tabs |
id |
string | tab id |
show |
boolean | false to hide the tab |
showTabs(t, fn, cls)
- Description:
Show/Hide empty tabs and ensure to activate a non-empty tab
Parameters:
Name | Type | Description |
---|---|---|
t |
jQuery | tabs |
fn |
function | optional function to test if a tab is visible |
cls |
string | class 'hidden' or 'empty' to hide the tab |
Returns:
true if the tabs is visible = contains something visible
spanIcon(p)
- Description:
Icon button
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | optional parameters Properties
|
success(h)
- Description:
Simple info
Parameters:
Name | Type | Description |
---|---|---|
h |
Content |
tabBadge(tab, val)
- Description:
Add/Replace a badge counter to tab
Parameters:
Name | Type | Description |
---|---|---|
tab |
tab href or any tab content element |
|
val |
badge value (no badge if null) |
tabs(params)
- Description:
Simple tabs
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | { id, selected, vertical, cls, ondrop, tabs } Properties
|
tooltip(e, title, placement, html)
- Description:
Add a tooltip to element
Parameters:
Name | Type | Description |
---|---|---|
e |
element |
|
title |
text or html |
|
placement |
optional, default 'bottom' |
|
html |
HTML title? |
warning(h)
- Description:
Simple warning
Parameters:
Name | Type | Description |
---|---|---|
h |
Content |