new Engine()
- Description:
Main UI Controller with abstract view to display components.
- Controller implements the UI logic with interactions between components (list, form, menu...) and the data (ajax).
- It does not contain UI drawing and must load the view service to display controls.
- Each View engine implements the UI interfaces (without data access) and interacts with the controller (to access to data).
Members
FILE_ICONS
- Description:
Common file extension icon
Common file extension icon
KEYS
- Description:
Common key codes
- BACKSPACE
- TAB
- ENTER
- SHIFT
- CTRL
- ALT
- PAUSE
- CAPS_LOCK
- ESCAPE
- PAGE_UP
- PAGE_DOWN
- END
- HOME
- LEFT_ARROW
- UP_ARROW
- RIGHT_ARROW
- DOWN_ARROW
- INSERT
- DELETE
Common key codes
- BACKSPACE
- TAB
- ENTER
- SHIFT
- CTRL
- ALT
- PAUSE
- CAPS_LOCK
- ESCAPE
- PAGE_UP
- PAGE_DOWN
- END
- HOME
- LEFT_ARROW
- UP_ARROW
- RIGHT_ARROW
- DOWN_ARROW
- INSERT
- DELETE
MEDIA_SIZE
- Description:
Media sizes (XS=576, SM=768, MD=992, LG=1200) mobile | tablet | medium | large
Media sizes (XS=576, SM=768, MD=992, LG=1200) mobile | tablet | medium | large
MIME_EXT
- Description:
Mime type to file extension
Mime type to file extension
grant
- Description:
User rights
User rights
options
- Description:
global options: merge of the launch parameters with Simplicite.UI.Globals
global options: merge of the launch parameters with Simplicite.UI.Globals
screenSize
- Description:
Current screen size
{w,h}
Current screen size {w,h}
view
- Description:
View: main renderer
View: main renderer
Methods
addLocalLogin(g)
- Description:
Add the connected login to local storage
Parameters:
Name | Type | Description |
---|---|---|
g |
Object | grant |
addShortcuts(keys)
- Description:
Add keys shortcuts to document
Parameters:
Name | Type | Description |
---|---|---|
keys |
Object | Pair of ('ctrl' | 'shift' | 'alt') + letter or char-code = callback or shortcut definition |
alert(params)
- Description:
Alert dialog box
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
string | Object | Message or object with: Properties
|
applyConstraints(ctn, obj, elt, index, context, cbk)
- Description:
Apply constraints
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
elt |
string | Optional DOM element (input, select, textarea) with data {field, index} |
index |
string | Optional editlist line index (row Id or creation index 00 01...) |
context |
number | Optional context (default Simplicite.CONTEXT_UPDATE) |
cbk |
function | Optional callback |
backendException(msg)
- Description:
Back-end exception
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Object | Array | Simple text or |
backendMessage(msg, toast, title)
- Description:
Back-end message(s)
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Object | Array | Plain text / encoded message |
toast |
boolean | True to display a toast instead a dialog box |
title |
string | Optional title |
backendMessages(msg)
- Description:
Back-end messages in a single dialog
Parameters:
Name | Type | Description |
---|---|---|
msg |
Object | Array of backend messages per rowId |
bind(name, fn)
- Description:
Bind one UI action with implementation
Parameters:
Name | Type | Description |
---|---|---|
name |
string | action name |
fn |
function | handler |
bindChange(ctn, obj, selector)
- Description:
Attach change event to fields
- set the hasChanged on object
- apply related constraints
- exclude elements with class
js-ignore-haschanged
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container of inputs, selects and textareas |
obj |
Simplicite.Ajax.BusinessObject | Simplicite.Ajax.BusinessProcess | Object or Process |
selector |
string | Optional selector (default: input, select and textarea) |
bindEnabled(name, enable)
- Description:
Enable action binding
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Action name |
enable |
boolean | True to activate / false to disable binding |
bindGenericActions()
- Description:
Bind generic actions (create, copy, delete...)
bindSaveAndQuit(ctn, obj, p, save)
- Description:
Manage the save and close when fields have changed
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Simplicite.Ajax.BusinessProcess | Object or Process |
p |
Object | Parameters |
save |
function | Save handler |
canCloseContent(ctn, cbk)
- Description:
Checks if the content can close
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
cbk |
function | Callback if the content can close |
changeLang(lang, pref)
- Description:
Change user's language on server side and reload the page
Parameters:
Name | Type | Description |
---|---|---|
lang |
string | Language FRA, ENU... |
pref |
boolean | true to update also the preferred language |
clearCache(action)
- Description:
System clear cache
Parameters:
Name | Type | Description |
---|---|---|
action |
string | Action |
clickDocument(doc)
- Description:
Click on a document: open the document
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
doc |
Object | Document data Properties
|
clickImage(doc)
- Description:
Click on image: default open a dialog with the image
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
doc |
Object | Image data Properties
|
clickMenu(item)
- Description:
Main menu handler
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
item |
Object | Menu item Properties
|
clickShortcut(item)
- Description:
Shortcut handler
Parameters:
Name | Type | Description |
---|---|---|
item |
Item |
clientId()
- Description:
Return the local client Id from local storage
closeForm(ctn)
- Description:
Close the object form: default going back in navigation
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
compat(w)
- Description:
Complete globals in window.Simplicite
Parameters:
Name | Type | Description |
---|---|---|
w |
Object | Optional window to init |
confirm(params)
- Description:
Confirm dialog box
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
string | Object | Message or object with: Properties
|
contentClose(ctn, cbk)
- Description:
Force to close a content and destroy components
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
cbk |
function | Callback when done |
contentLoaded(ctn, onload, onunload, params)
- Description:
Prepare content handlers
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
onload |
function | Optional load handler |
onunload |
function | Optional unload handler |
params |
boolean | Optional context parameters |
contentUnload(ctn, cbk)
- Description:
Unload the container = destroy embedded components (editors...)
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
cbk |
function | Callback when done |
copyToClipboard(text, silent)
- Description:
Copy a text to clipboard
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Text to copy |
silent |
boolean | True to hide the toast |
countList(ctn, obj, options, cbk)
- Description:
Count rows with context and filters
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business Object |
options |
Simplicite.UI.Globals.list | Options to override Globals |
cbk |
function | Optional callback(obj) to read obj.count |
countReference(obj, parent, cbk)
- Description:
Count references of a parent object in PANELLIST context
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | Referenced object name or business object |
parent |
Object | Specify the parent object and the foreign-key |
cbk |
function | Callback(obj, count) |
createObjectDialog(ctn, obj, cbk)
- Description:
Create an object in a dialog
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container |
obj |
string | Simplicite.Ajax.BusinessObject | Object |
cbk |
function | Callback with the created object |
createReference(ctn, obj, ref, index)
- Description:
Create an object in a dialog to populate a reference
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container to populate |
obj |
string | Simplicite.Ajax.BusinessObject | Object |
ref |
string | Simplicite.Ajax.ObjectField | Referenced field or FK itself |
index |
string | Optional row index (edit list) |
datamapCompletion(ctn, obj, field, index, sel, disp)
- Description:
Datamap completion
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
field |
string | Simplicite.Ajax.ObjectField | Referenced field |
index |
string | Optional row index (edit list) |
sel |
function | Optional select item callback(item) |
disp |
function | Optional display item callback(item, ref) |
decodeImage(buffer, {function)
- Description:
Convert bytes to Image (supports gif, png and jpeg)
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Array | Image as bytes |
{function |
onload Optional callback |
detachURL(url, options)
- Description:
Open the url in a separate window with the UI engine
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string | URL to load in a new window |
|||||||||||||||||||||||||||||||||||
options |
Object | Detach options Properties
|
Returns:
new window
dispatchMessages(messages, obj)
- Description:
Set visible field messages and returns other/head messages
Parameters:
Name | Type | Description |
---|---|---|
messages |
Array.<string> | Array.<Object> | Backend messages |
obj |
Simplicite.Ajax.BusinessObject | Optional object to affect message when #field matches |
displayAssociate(ctn, obj, def)
- Description:
Bulk association between objects
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Parent container |
|||||||||||||||
obj |
Simplicite.Ajax.BusinessObject | Object from panel instance |
|||||||||||||||
def |
Object | Associate definition Properties
|
displayCalendar(ctn, obj, agenda, params, cbk)
- Description:
Calendar rendering
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business object |
agenda |
string | Agenda name |
params |
Object | Options |
cbk |
function | Optional callback |
displayColorPicker(ctn, input, dropdown, cbk)
- Description:
Color picker
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
input |
string | jQuery | Element to receive selected color as |
dropdown |
boolean | Displays as dropdown or dialog box |
cbk |
function | Optional callback(color,valid) |
displayCompletion(ctn, obj, field, index, req, cbk)
- Description:
Field completion on field
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Object or name |
field |
string | Simplicite.Ajax.ObjectField | Field or name |
index |
string | Optional row index (edit list) |
req |
string | User request |
cbk |
function | Callback with search result |
displayCrosstab(ctn, obj, name, options, cbk)
- Description:
Crosstab
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
||||||||||||
obj |
string | Simplicite.Ajax.BusinessObject | Name or Object |
||||||||||||
name |
string | Crosstab name |
||||||||||||
options |
Object | Options Properties
|
||||||||||||
cbk |
function | Optional callback |
displayEditor(ctn, options, cbk)
- Description:
Code editor
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
options |
Object | Optional parameters |
cbk |
function | Optional callback |
displayExport(ctn, obj, rowId)
- Description:
Display the export dialog and get exported data
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object or name |
rowId |
string | Optional row ID to export only one record |
displayFeedback()
- Description:
User feedback
displayForm(ctn, obj, rowId, options, cbk)
- Description:
Build a form with the object item
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Target container |
obj |
string | Simplicite.Ajax.BusinessObject | Object |
rowId |
string | Row ID to get |
options |
Simplicite.UI.Globals.form | Options to override globals |
cbk |
function | Optional callback(obj, params) |
displayGantt(ctn, obj, ts, options, cbk)
- Description:
Gantt diagram based on timesheet data
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Assignment object |
ts |
String | Timesheet name |
options |
Object | Options |
cbk |
function | Optional callback |
displayHelp(ctn, obj)
- Description:
Object help: call the help service and open a dialog
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container |
obj |
Simplicite.Ajax.BusinessObject | Object |
displayHome(ctn, options, cbk)
- Description:
Home page
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
options |
Object | Options |
cbk |
function | Optional callback |
displayImportCSV(ctn)
- Description:
Manage import CSV thru UI
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Optional container |
displayImportXML(ctn)
- Description:
Manage import XML thru UI
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Optional container |
displayIndex(ctn, options, cbk)
- Description:
Index search form
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
||||||||||||||||||
options |
Object | Options Properties
|
||||||||||||||||||
cbk |
function | Optional callback |
displayIndexSearch(ctn, req, options, cbk)
- Description:
Index search result
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
req |
string | User request (see Simplicite.Ajax.indexsearch service) |
options |
Object | Options |
cbk |
function | Optional callback |
displayIndexSearchDocs(ctn, req, list, options)
- Description:
Index search in documents
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container for result |
req |
string | User request |
list |
Array.<string> | Array of objects with documents |
options |
Object | Options |
displayIndexSearchDomain(ctn, domain, all, options)
- Description:
Index search in domain
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container for result |
domain |
string | Domain name |
all |
boolean | False to limit search to objects updated by the user |
options |
Object | Options |
displayIndexSearchSession(ctn)
- Description:
Session index
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container for result |
displayInlinedForm(ctn, o, params)
- Description:
Display form of inlined link (cardinlity 0,1 or 1,1 with inline rendering)
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
|||||||||||||||
o |
Simplicite.Ajax.BusinessObject | object |
|||||||||||||||
params |
Simplicite.UI.Globals.list | Reference data Properties
|
displayList(ctn, obj, options, cbk)
- Description:
Build a list with the object search
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Target container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business Object |
options |
Simplicite.UI.Globals.list | Options to override Globals |
cbk |
function | Optional callback |
displayLogs(ctn, {string, {string)
- Description:
Show server logs thru web-socket. Useful when UI has no console.
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Optional container to split (default is #work) |
{string |
action |
|
{string |
pos - Optional position |
displayMerge(ctn, obj, options, cbk)
- Description:
Merge object
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
||||||
obj |
Simplicite.Ajax.BusinessObject | Object with merge access |
||||||
options |
Object | Options Properties
|
||||||
cbk |
function | Optional callback |
displayModeler(ctn, modelId, options)
- Description:
Load and display the modeler
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
modelId |
string | Model row ID |
options |
Object | Options |
displayModuleDelete(ctn, moduleId)
- Description:
Display the delete module screen
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
moduleId |
string | module row Id |
displayMonitoring(params, cbk)
- Description:
UI Monitoring
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Options Properties
|
|||||||||
cbk |
function | Optional callback |
displayPlaceMap(ctn, params, cbk)
- Description:
Placemap service
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container to append the map |
params |
Object | Static image |
cbk |
function | Optional callback when the map is loaded |
displayPreferences(ctn, obj)
- Description:
Object preferences
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business Object |
displayPrint(ctn, name, obj, rowId, cbk)
- Description:
Display a print/publication
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Optional container (_blank if null) |
name |
string | Print name |
obj |
Simplicite.Ajax.BusinessObject | Object |
rowId |
string | Optional row ID |
cbk |
function | Optional callback |
displayReferenceList(ctn, obj, params)
- Description:
Display referenced object as panel list or pillbox
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
|||||||||
obj |
string | Simplicite.Ajax.BusinessObject | Referenced object or name |
|||||||||
params |
Simplicite.UI.Globals.list | List options + parent object + link metadata Properties
|
displayReferencePillbox(ctn, o, params)
- Description:
Display references in a pillbox control
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
|||||||||||||||
o |
Simplicite.Ajax.BusinessObject | N,N object |
|||||||||||||||
params |
Simplicite.UI.Globals.list | Reference data Properties
|
displayRow(ctn, elt, obj, rowId, options, cbk)
- Description:
Build a record of list
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Nav container |
elt |
string | jQuery | row container (tr or div) |
obj |
Simplicite.Ajax.BusinessObject | Object |
rowId |
string | Object row Id |
options |
Simplicite.UI.Globals.list | List options to override global row options |
cbk |
function | Optional callback to chain something |
displaySearch(ctn, obj, options, cbk)
- Description:
Search form
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business Object |
options |
Simplicite.UI.Globals.search | Options to override Globals |
cbk |
function | Optional callback |
displaySocial(ctn, options, cbk)
- Description:
Displays social posts
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
||||||||||||||||||||||||||||||
options |
Object | Social options Properties
|
||||||||||||||||||||||||||||||
cbk |
function | Optional callback |
displayStatusMetrics(ctn, obj, params, cbk)
- Description:
Status metrics
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
||||||||||||||||||||||||||||||||||||||||||||||||
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business object |
||||||||||||||||||||||||||||||||||||||||||||||||
params |
Object | Options Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||
cbk |
function | Optional callback |
displaySummary(ctn, obj, rowId, options, cbk)
- Description:
Object summary
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
||||||||||||||||||||||||||||||
obj |
string | Simplicite.Ajax.BusinessObject | Object |
||||||||||||||||||||||||||||||
rowId |
string | Object row ID |
||||||||||||||||||||||||||||||
options |
Object | Optional parameters Properties
|
||||||||||||||||||||||||||||||
cbk |
function | Callback to chain |
displaySysInfos(ctn, options)
- Description:
System informations
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
options |
Object | Options |
displayTemplate(ctn, obj, rowId)
- Description:
Template editor
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | ObjectInternal or View |
rowId |
string | Object/view ID |
displayTheme(rowId, options)
- Description:
Theme editor
Parameters:
Name | Type | Description |
---|---|---|
rowId |
String | Theme row Id |
options |
Object | Options |
displayTimesheet(ctn, obj, rowId, ts, options, cbk)
- Description:
Timesheet of object
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Resource object 1 or 2, or panel instance of assign object |
rowId |
String | Optional resource row ID |
ts |
String | Timesheet name |
options |
Object | Options |
cbk |
function | Optional callback |
displayTray(ctn, obj, field, options, cbk)
- Description:
Trays based on a state model
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business object |
field |
string | Optional enum name (default is the status field) |
options |
Object | Optional parameters |
cbk |
function | Optional callback |
displayTreeView(ctn, obj, rowId, name, options, cbk)
- Description:
Display a tree view
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Optional container |
||||||||||||||||||||||||||||||
obj |
Simplicite.Ajax.BusinessObject | Root object |
||||||||||||||||||||||||||||||
rowId |
string | Row ID of the record |
||||||||||||||||||||||||||||||
name |
string | Treeview name |
||||||||||||||||||||||||||||||
options |
Object | Optional parameters Properties
|
||||||||||||||||||||||||||||||
cbk |
function | Optional callback |
displayUpdateForm(ctn, obj, options, cbk)
- Description:
Build a form for bulk update
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Target container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or BusinessObject |
options |
Object | See Globals.form |
cbk |
function | Optional callback |
displayUserFilters(ctn, options)
- Description:
Display the user filters: date range and fields
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Optional container (dialog if null) |
options |
Object | Options |
displayView(ctn, view, options, cbk)
- Description:
Display a view
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
||||||||||||||||||||||||
view |
string | Object | View definition or name |
||||||||||||||||||||||||
options |
Object | View options Properties
|
||||||||||||||||||||||||
cbk |
function | Optional callback |
displayWebNews(ctn, options)
- Description:
Display the web news (user needs read access to WebNews)
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container (in a dialog if undefined) |
|||||||||||||||
options |
Object | Optional parameters Properties
|
displayWorkflow(ctn, wkf, action, options, cbk)
- Description:
Workflow wrapper
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
wkf |
string | Simplicite.Ajax.BusinessProcess | Business process or name |
action |
string | Action |
options |
Object | Optional activity |
cbk |
function | Optional callback |
doAction(a, obj, rowId)
- Description:
Execute one action
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Action metadata |
obj |
Simplicite.Ajax.BusinessObject | Business object |
rowId |
string | Optional object row ID on form/row |
doActionCustom(a, obj, rowId, values, cbk)
- Description:
Execute a custom/backend action (object.action call) after saving the form
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Action metadata |
obj |
Simplicite.Ajax.BusinessObject | Business object |
rowId |
string | Optional object row ID on form/row |
values |
Object | Optional confirm field values |
cbk |
function | Optional callback(msg) |
doActionGeneric(a, obj, rowId)
- Description:
Execute a generic/UI action (all binded implementations)
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Action metadata |
obj |
Simplicite.Ajax.BusinessObject | Business object |
rowId |
string | Optional object row ID on form/row |
doActionModel()
- Description:
Wrap "open model" actions
doActionURL(a, obj, rowId)
- Description:
Wrap a backend URL action to front
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Action metadata |
obj |
Simplicite.Ajax.BusinessObject | Business object |
rowId |
string | Optional object row ID on form/row |
error(msg)
- Description:
Error dialog box
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Content |
findAction(o, name, list, plus)
- Description:
Find an action in plain or plus actions
Parameters:
Name | Type | Description |
---|---|---|
o |
Simplicite.Ajax.BusinessObject | Object |
name |
string | Action name |
list |
Array.<Object> | List of actions |
plus |
Array.<Object> | List of 'plus' actions |
firebase(data)
- Description:
Firebase service wrapper
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | Service data Properties
|
fkCompletion(ctn, obj, field, index, sel, disp)
- Description:
Foreign-key completion
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
field |
string | Simplicite.Ajax.ObjectField | Referenced field |
index |
string | Optional row index (edit list) |
sel |
function | Optional select item callback(item) |
disp |
function | Optional display item callback(item, ref) |
getAjax()
- Description:
Current ajax session
Returns:
Simplicite.Ajax instance
getApp()
- Description:
Current ajax session (alias to getAjax)
Returns:
Simplicite.Ajax instance
getFileIcon()
- Description:
Get icon from the file name
getLocalLogins()
- Description:
All logins from local storage
getNav(c)
- Description:
Get container navigator, default returns the main navigation of #work area
Parameters:
Name | Type | Description |
---|---|---|
c |
string | jQuery | Component or selector |
Returns:
Simplicite.UI.Navigator instance
getNavContainer(c)
- Description:
Find the closest container with a navigator
Parameters:
Name | Type | Description |
---|---|---|
c |
string | jQuery | component |
getNavInstanceName(c, obj, inst)
- Description:
Generate the instance name within the component navigator. Returns the common instance name on main navigation, otherwise add a suffix ex: the_ajax_(name)_nav(id)
Parameters:
Name | Type | Description |
---|---|---|
c |
string | jQuery | Component |
obj |
string | Simplicite.Ajax.BusinessObject | Object name or BusinessObject |
inst |
string | Optional instance name, default = |
getNavObject(ctn, obj, inst, cbk, params)
- Description:
Get a business object extended with UI abilities per container navigator
- obj.metadata: object metadata with extended ObjectField
- obj.ui: this UI engine shorthand
- obj.locals.ui: copy of global UI options, to be changed per instance
- optional editors: load Ace and/or Tinymce
- optional web resources: STYLES and SCRIPT
- optional UI constraints script
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
string | Simplicite.Ajax.BusinessObject | Object name or BusinessObject |
inst |
string | Optional instance name, default is the_ajax_name to be managed as a Main and Ajax object on server side |
cbk |
function | Callback function(obj) when loaded |
params |
Object | Optional parameters to load metadata |
getTop()
- Description:
Top Simplicite window
getUIAction(ctn, obj, action)
- Description:
Gets the action with UIAction interface
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
action |
Object | Action metadata or name |
getUIArea(ctn, obj, area)
- Description:
Gets the area with UIArea interface
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
area |
Object | Area metadata or name or position |
getUIField(ctn, obj, field, index, silent)
- Description:
Gets the field extended with the UIField interface
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
field |
string | Simplicite.Ajax.ObjectField | Object field or name |
index |
string | Optional for multiple inputs of the same field (edit list) |
silent |
boolean | No trace when field is unknown |
getUIObject(obj, inst, cbk, params)
- Description:
Get a business object extended with UI abilities:
- obj.metadata: object metadata with extended ObjectField
- obj.ui: this UI engine shorthand
- obj.locals.ui: copy of global UI options, to be changed per instance
- optional editors: load Ace and/or Tinymce
- optional web resources: STYLES and SCRIPT
- optional UI constraints script
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | Simplicite.Ajax.BusinessObject | Object name or BusinessObject |
inst |
string | Optional instance name, default is the_ajax_name to be managed as a Main and Ajax object on server side |
cbk |
function | Callback function(obj) when loaded |
params |
Object | Optional parameters to load metadata |
getUIView(ctn, obj, view)
- Description:
Gets the view with UIView interface
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Optional object |
view |
Object | View metadata or name |
gotoDefinition(name, id)
- Description:
Open one object definition if granted
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Object name (Field...) |
id |
string | Object id |
info(msg)
- Description:
Information dialog box
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Content |
isActionBinded(a)
- Description:
Is action binded ?
Parameters:
Name | Type | Description |
---|---|---|
a |
Object | Action metadata |
Returns:
True if the action is binded
isBinded(name)
- Description:
Is UI action binded and enabled ?
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Action name |
Returns:
True if the action is enabled
isMediaDesktop()
- Description:
Is the media a desktop ?
isMediaMobile()
- Description:
Is the media a mobile ?
isMediaTablet()
- Description:
Is the media a tablet ?
keepAlive(enable, obj, id)
- Description:
Keep the session alive during data updates (used by form and edit list) and refresh object usage by other people
Parameters:
Name | Type | Description |
---|---|---|
enable |
boolean | true to start the timer, false to stop |
obj |
string | optional object name to get usage |
id |
string | optional rowId |
keysLabel(keys)
- Description:
Translate sort keys
Parameters:
Name | Type | Description |
---|---|---|
keys |
string | Ctrl+Shift+Alt+Left... |
linkedLists(ctn, obj, field, code, index, cbk, all)
- Description:
Reload the linked lists of an enum field
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
field |
Simplicite.Ajax.ObjectField | Enum field |
code |
string | Array | Selected value(s) |
index |
string | Edit list index |
cbk |
function | Callback |
all |
boolean | Get all values when code is empty (case of a search field) |
loadAceEditor(cbk)
- Description:
Load ACE editor
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadCSS(p)
- Description:
Load a server CSS
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | string | Parameters or URL Properties
|
loadCalendar(cbk)
- Description:
Calendar loading from FULLCALENDAR_LIBS or /scripts/fullcalendar. Needs sysparam
FULLCALENDAR_VERSION
= "3" or "4" (default 3 for backward compatibility)
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional callback |
loadCharts()
- Description:
Load chart.js libs
loadDiagramEngine(svg, cbk)
- Description:
Load the diagram engine
Parameters:
Name | Type | Description |
---|---|---|
svg |
boolean | Load only SVG engine? |
cbk |
function | Optional callback |
loadEditor(editor, {function))
- Description:
External editor loading
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
editor |
Object | editor parameters Properties
|
||||||||||||
{function) |
cbk - callback when loaded |
loadEngine(name, cbk)
- Description:
Load the Rendering engine
Parameters:
Name | Type | Description |
---|---|---|
name |
string | extended engine name (bootstrap4 by default) |
cbk |
function | onload callback |
loadGridJson(cbk)
- Description:
Grid tool for JSON in a table
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadHighlight(cbk)
- Description:
Load highlight tool
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadJqPlot(cbk)
- Description:
Load jqPlot
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadLocalEditor(cbk)
- Description:
Load local code editor
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | callback |
loadMarked(cbk)
- Description:
Load Marked parser (Markdown to HTML)
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadMustache(cbk)
- Description:
Load Mustache template parse
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadPart(p)
- Description:
Load a HTML/JS/CSS resource in the target selector
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | Parameters Properties
|
loadParts(list, {function))
- Description:
Load HTML/JS/CSS resources
Parameters:
Name | Type | Description |
---|---|---|
list |
Array | list of parts [{ name, url, type, target }] |
{function) |
cbk - callback when loaded |
loadResource(p)
- Description:
Load a disposition resource and replace [ROOT] tokens
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | Parameters Properties
|
loadScript(p)
- Description:
Load a server JavaScript
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p |
Object | string | minimal parameter { url } or URL Properties
|
loadScripts(list, onload)
- Description:
Load a list of JS/CSS scripts (preserve ordering)
Parameters:
Name | Type | Description |
---|---|---|
list |
Array.<Object> | Array.<string> | list of scripts URL (js or css) |
onload |
function | callback |
loadSelectBox(cbk)
- Description:
Load the select box component (see https://select2.org)
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadSimpliciteClient(cbk)
- Description:
Load Simplicite standalone client lib
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadSpeech()
- Description:
Load the speech engine
loadTerminal(cbk)
- Description:
Load Terminal (XTerm.js)
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadTinyMCE(cbk)
- Description:
Load TinyMCE editor
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
loadURL(ctn, url, options, cbk)
- Description:
Load URL in a container: wrap the URL to specific controllers (list, form...) or call the back-end thru ajax
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container to load the URL (default is #work) |
||||||||||||||||||||||||||||||
url |
string | URL to load |
||||||||||||||||||||||||||||||
options |
Object | Contextual parameters Properties
|
||||||||||||||||||||||||||||||
cbk |
function | Optional callback when loaded |
logout(params)
- Description:
Default logout: confirm (with text CONFIRM_LOGOUT) and save session before quit
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | logout parameters Properties
|
main(cbk)
- Description:
Displays all site parts:
- Create main div
- load only options.resources if specified
- load part MAIN/HEADER/FOOTER/MENU/WORK when options.useMainParts=true
- load STYLES + SCRIPT resources of disposition or object
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Final callback when displayed |
mediaSize(w)
- Description:
Get the media size
Parameters:
Name | Type | Description |
---|---|---|
w |
number | viewport width |
Returns:
media size
monitor(ctn, params)
- Description:
UI monitoring
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
ctn |
jQuery | Container to monitor |
||||||
params |
Object | Parameters or action Properties
|
mousePos(e, o)
- Description:
Get the mouse/touch position
{x,y}
on screen
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Mouse or touch event |
o |
Object | Optional offset |
onFollow(method, param, cbk)
- Description:
Follow service wrapper
Parameters:
Name | Type | Description |
---|---|---|
method |
string | Method name |
param |
string | Mmethod param |
cbk |
function | Optional callback |
onMessageReceived(m)
- Description:
Firebase default handler when a message is received thru FCM or worker.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
m |
Object | Message or notification Properties
|
openForm(ctn, obj, rowId)
- Description:
Open object form: default displayForm with nav add
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Target container |
obj |
string | Simplicite.Ajax.BusinessObject | Name or Business Object |
rowId |
string | Referenced row ID |
openObject(ctn, obj, rowId, params)
- Description:
Open handler (on a list row or summary): default switch to open object form, reference, doc or image
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Container |
|||||||||||||||||||||||||||
obj |
Simplicite.Ajax.BusinessObject | String | Target object or name |
|||||||||||||||||||||||||||
rowId |
string | Target row ID |
|||||||||||||||||||||||||||
params |
Object | Optional parameters Properties
|
openURL(url, target)
- Description:
Open the URL in a new window
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL to open |
target |
string | Optional, default |
populateAction(ctn, obj, refField, refId, action, cbk)
- Description:
Populate the referenced fields of action
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
refField |
string | Foreign key field |
refId |
string | Reference row ID, or null to reset referenced fields |
action |
Object | Current action on object |
cbk |
function | Optional callback |
populateReference(ctn, obj, refField, refId, index, cbk, noChange, userKey)
- Description:
Populate the referenced fields
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Object |
refField |
string | Foreign key field |
refId |
string | Reference row ID, or null to reset referenced fields |
index |
string | Optional row index (edit list) |
cbk |
function | Optional callback |
noChange |
boolean | Optional to bypass change events on each fields |
userKey |
boolean | Optional to get foreign user-key |
previewDocument(doc, embedded)
- Description:
Preview a document: default open a dialog with the preview
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
doc |
Object | Document data Properties
|
||||||||||||||||||
embedded |
boolean | Embedded or dialog |
prompt(params)
- Description:
Prompt dialog box
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
string | Object | Message or object with: Properties
|
quit(params)
- Description:
Default quit is a session logout
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | logout parameters Properties
|
randomString(len)
- Description:
Random string
Parameters:
Name | Type | Description |
---|---|---|
len |
Length |
Returns:
Random string of specified length
readCookie(name)
- Description:
Read a cookie
Parameters:
Name | Type | Description |
---|---|---|
name |
string | cookie name |
readField(ctn, obj, f, index, cbk)
- Description:
Read the form field into object field (async/file reading)
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container to find field |
obj |
Simplicite.Ajax.BusinessObject | Optional business object |
f |
Simplicite.Ajax.ObjectField | Business field |
index |
string | Optional index of field (list edit) |
cbk |
function | Callback when readed |
readFile(file, cbk, output, progress, optional)
- Description:
Read a form input file
Parameters:
Name | Type | Description |
---|---|---|
file |
Object | Input file (jQuery, input or file) |
cbk |
function | Required callback |
output |
string | Base64 (default) | ArrayBuffer | File |
progress |
function | Optional progress callback(loaded, total, percent) |
optional |
number | size limit (Mo) 0:no error or null=MAX_UPLOAD_SIZE |
readForm(ctn, obj, index, cbk)
- Description:
Read all form fields into object fields (async/file reading)
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Container to find fields |
obj |
Simplicite.Ajax.BusinessObject | Business object |
index |
string | Optional index (list edit) |
cbk |
function | Callback |
ready(app, engine, options, cbk)
- Description:
When page is loaded: load user rights, menu, texts and engine.
Then call the main page service.
Parameters:
Name | Type | Description |
---|---|---|
app |
Simplicite.Ajax | Ajax API to access to data |
engine |
string | extension name (default 'bootstrap') |
options |
Simplicite.UI.Globals | some globals options to override |
cbk |
function | Optional callback(err) when loaded |
reloadForm(ctn)
- Description:
Reload the object form: default reload navigation
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
removeLocalLogin(login)
- Description:
Remove a login from local storage
Parameters:
Name | Type | Description |
---|---|---|
login |
string | remove all logins if null |
resetDatamap(ctn, obj, field, index, cbk)
- Description:
Reset datamap fields
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container of referenced fields to set |
obj |
Simplicite.Ajax.BusinessObject | Object |
field |
Simplicite.Ajax.ObjectField | Mapped field |
index |
string | Optional row index (edit list) |
cbk |
function | Optional callback to override fields change |
resize(force)
- Description:
Resize window handler
Parameters:
Name | Type | Description |
---|---|---|
force |
boolean | True to force a full redraw |
saveForm(ctn, obj, cbk, params)
- Description:
Save the object form
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Business object |
cbk |
function | Callback function(obj, errors, messages) |
params |
Object | Optional parameters (parent) |
saveList(ctn, obj, params, cbk)
- Description:
Save the object list
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | List container |
obj |
Simplicite.Ajax.BusinessObject | Business object |
params |
Object | Optional parameters (parent) |
cbk |
function | Callback |
saveObject(ctn, obj, index, params, onSuccess, onError)
- Description:
Save the object after reading UI values
Parameters:
Name | Type | Description |
---|---|---|
ctn |
jQuery | Container |
obj |
Simplicite.Ajax.BusinessObject | Business object |
index |
string | Optional index/row ID in list |
params |
Object | Optional parameters (parent, inline) |
onSuccess |
function | Callback |
onError |
function | Callback |
saveSession(cbk)
- Description:
Save the session (by default the recent activity in HISTORY)
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | optional callback |
selectDatamap(ctn, obj, field, index, cbk, reset)
- Description:
Object datamap picker: default open a popup to select data
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container of referenced fields to set |
obj |
Simplicite.Ajax.BusinessObject | Object |
field |
Simplicite.Ajax.ObjectField | Mapped field |
index |
string | Optional row index (edit list) |
cbk |
function | Optional callback to override fields change |
reset |
boolean | True to only reset all datamap fields |
selectMetaObject(ctn, obj, field, index)
- Description:
Meta-object picker: default open a popup to select a reference
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container of referenced fields to set |
obj |
string | Simplicite.Ajax.BusinessObject | Object |
field |
string | Simplicite.Ajax.ObjectField | Field of meta-object to select |
index |
string | Optional row index (edit list) |
selectObject(ctn, obj, options, cbk)
- Description:
Object picker: default open a popup to select object(s) (used by pillbox, modeler and associate)
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ctn |
string | jQuery | Parent container |
||||||||||||
obj |
string | Simplicite.Ajax.BusinessObject | Object name or business object |
||||||||||||
options |
Object | List additive options Properties
|
||||||||||||
cbk |
function | Callback(obj, id or array of ids) called on selection |
selectReference(ctn, obj, ref, refField, index, cbk, userKeys)
- Description:
Object reference picker: default open a popup to select a reference
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Parent container of referenced fields to set |
obj |
Simplicite.Ajax.BusinessObject | Object |
ref |
string | Simplicite.Ajax.BusinessObject | Referenced object name or business object (list popup) |
refField |
string | Simplicite.Ajax.ObjectField | Foreign key (or meta object) field to select (name or field) |
index |
string | Optional row index (edit list) |
cbk |
function | Optional callback (will replace all change events on each field) |
userKeys |
boolean | Optional to get foreign user-key |
session(cbk, params)
- Description:
Open the user session with authtoken
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
cbk |
function | callback(err) when the session is opened or not |
||||||
params |
Object | options Properties
|
setAjax(ajax)
- Description:
Set the Ajax APIs
Parameters:
Name | Type | Description |
---|---|---|
ajax |
Simplicite.Ajax | Simplicite.Ajax instance |
setCompletionMinSize(size)
- Description:
Completion minimum size to trigger the search
Parameters:
Name | Type | Description |
---|---|---|
size |
number | Positive number (0 = disable) |
setEngineView(name, cbk)
- Description:
Set the view engine
Parameters:
Name | Type | Description |
---|---|---|
name |
string | extension name (ex: bootstrap) |
cbk |
function | onload callback |
setTheme(theme, cbk)
- Description:
Change the current CSS theme (stored in local storage)
Parameters:
Name | Type | Description |
---|---|---|
theme |
string | theme name (ex: 'default', 'light', 'dark', 'simplicite') |
cbk |
function | optional callback |
speechAssist(options, cbk)
- Description:
Speech assistant (experimental)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options Properties
|
||||||||||||||||||||||||
cbk |
function | Callback(assist) |
speechRecognition(el, options)
- Description:
Speech recognition
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
el |
Object | Element input or textarea |
|||||||||||||||||||||||||||||||||||||||
options |
Object | Options Properties
|
speechSynthesis(el, options)
- Description:
Speech synthesis
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
el |
Object | Text or input or textarea |
||||||||||||||||||||||||||||||
options |
Object | Options Properties
|
splash()
- Description:
Loading page with status
title(obj, userKey, plural)
- Description:
Object title to display.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Simplicite.Ajax.BusinessObject | Object with metadata (label, plurallabel, userkey) |
userKey |
boolean | True to add the valued user-key |
plural |
boolean | True to use the plural label if exists |
toast(params)
- Description:
Toast dialog box
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
string | Object | Message or object with: Properties
|
unbind(name)
- Description:
Unbind one UI action
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Action name |
undoRedo(ctn, action, num, url)
- Description:
Undo/Redo service
Parameters:
Name | Type | Description |
---|---|---|
ctn |
string | jQuery | Target container |
action |
string | Undo|redo |
num |
string | Number of iterations (default 1) |
url |
string | Optional URL to reload after server call (else use response url) |
warning(msg)
- Description:
Warning dialog box
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Content |
yesNo(params)
- Description:
Yes/No dialog box
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
string | Object | Message or object with: Properties
|
yesNoCancel(params)
- Description:
Yes/No/Cancel dialog box
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
string | Object | Message or object with: Properties
|
zipEditor(ctn, doc, params, cbk)
- Description:
ZIP editor
Parameters:
Name | Type | Description |
---|---|---|
ctn |
Object | Parent container |
doc |
Object | Document |
params |
Object | Options |
cbk |
function | Optional callback to get the new ZIP as Base64 |
(inner) keydown(e)
- Description:
Default keydown handler
CTRL-S : trigger "ui.key.ctrls" to all "js-ctrl-s" elements
ESCAPE : in order of priority close dialog, blur field (remove focus), or back in navigation
SHIFT-LEFT/RIGHT : navigation between list items
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Key event |
(inner) loadImport()
- Description:
load import view