Form

Simplicite.UI.View. Form

new Form()

Description:
  • Object form rendering

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.UI.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.UI.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)

forceChange(force)

Description:
  • Call to action in case of ERR_UPDATED

Parameters:
Name Type Description
force boolean

true to force the timestamp to the DB value and re-save, false to discard changes = reload form

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

stateNavbar(ctn, data)

Description:
  • Display a state-model navbar

Parameters:
Name Type Description
ctn jQuery

container

data Object

navbar data style BREAD/METRO/ARROW + list of states

tracker(tk, options)

Description:
  • Open a dialog to track one asynchronous action

Parameters:
Name Type Description
tk Object

Tracker infos name + state + tasks

options Object
Properties
Name Type Description
title string

optional dialog title (default tracker name)

start function

optional function(cbk) to start the tracking (default auto-start)

progress function

function(cbk) service to get back-end tracking

stop function

Optional service to request action stop

minify function

Optional service to toggle/minify popup

done function

optional function(log,task,pbar) when finished

bar jQuery

optional actions bar (default = Close button) function