Form

Simplicite.UI.View. Form

new Form(app, ui, view)

Description:
  • Object form rendering

Parameters:
Name Type Description
app Simplicite.Ajax

Ajax service

ui Simplicite.UI.Engine

Main UI controller

view Simplicite.UI.View.Main

View services

Methods

about()

Description:
  • Object informations

build(params)

Description:
  • Build a form based on global form.template

Parameters:
Name Type Description
params Object

options

Properties
Name Type Description
icon string

icon name

title Object

form title

content Object

form content

actions Object

form actions

confirm(act, o, run)

Description:
  • Confirm action with dialog

Parameters:
Name Type Description
act Object

Action

o Simplicite.Ajax.BusinessObject

Object

run function

Optional confirm callback with actions 'values' and 'cbk(msg)' to send errors

Returns:

Promise(ok, refuse)

display(ctn, o, p, cbk)

Description:
  • Build the object form based on the UI template

Parameters:
Name Type Description
ctn jQuery

parent container

o Simplicite.Ajax.BusinessObject

object

p Simplicite.UI.Globals.list

optional parameters

cbk function

optional callback

floatingActions(ctn, div, bar, form, bottom, left)

Description:
  • Bind scroll to set the floating actions vertical position

Parameters:
Name Type Description
ctn jQuery

main container

div jQuery

form container with a scrollable parent

bar jQuery

actions bar to detach

form jQuery

optional form to stay inside

bottom boolean

true to float on bottom (default top)

left boolean

true to float on left (default right)

objectUsage(ctn, list, obj, id, action)

Description:
  • Display the object usages

Parameters:
Name Type Description
ctn jQuery

container to populate

list Array

list of users { login, firstname, lastname, picture }

obj string

optional object name when ctn is unknown (keepAlive trigger)

id Object

optional row Id (keepAlive trigger)

action string

optional action use|close|delete|logout