Navigator

Simplicite.UI. Navigator

Description:
  • Navigation controller

Parameters:
Name Type Description
app Simplicite.Ajax

Ajax service

ui Simplicite.UI.Engine

Main UI controller

container jQuery

Optional container (popup, div...)

uniqueId string

Optional navigator Id (default is the container#id if any)

Methods

addHistory()

Description:
  • Add a history of opened object in main navigation

clearHistory()

Description:
  • Clear sysparam HISTORY

focus(apply)

Description:
  • Preserve page focus. If the previous focus is not found, try to focus the first visible '.js-focusable' in container

Parameters:
Name Type Description
apply boolean

true to restore focus, false to keep activeElement infos

getCurrentItem()

Description:
  • Current element

getHistory()

Description:
  • Session history

getItem()

Description:
  • Navigation element

getItems()

Description:
  • Navigation history

getRootItem()

Description:
  • Root element

leave(y)

Description:
  • Preserve nav informations (scroll and focus)

Parameters:
Name Type Description
y number

save the scrollTop + focus of nav container

length()

Description:
  • Navigation length

loadHistory()

Description:
  • Load sysparam HISTORY

Description:
  • Navigation. Returns the current item.

Parameters:
Name Type Description
action

Optional 'new': reinit, 'add': push, 'del': pop, 'none': update last label

item

Item to push in navigation { container, type, object, rowId, params, callback, url }

  • container: navigate location
  • label: item label
  • object: optional business object
  • rowId: optional object row ID to display the form
  • type: optional type form, list, index, placemap, agenda, crosstab...
  • view: optional view
  • home: homepage?
  • params: optional parameters related to list, form...
  • callback: optional callback related to list, form...
  • url: optional specific location to load in container
  • index: index search
Description:
  • Returns back in navigation

Parameters:
Name Type Description
n

backward iterations (default 1, reload 0)

params

Optional additive parameters (to display messages or to override old parameters)

Description:
  • Navigator Id to isolate its object instances

Parameters:
Name Type Description
id string

Optional value to set the unique id

Description:
  • Navigate to item. Returns to home if unknown.

Parameters:
Name Type Description
n

Navigation item or index, default is the last one

params

Optional additive parameters (to display messages or to override old parameters)

reload()

Description:
  • Reload current navigation and notify js-reload components

restore()

Description:
  • Restore nav informations (scroll and focus)

saveHistory()

Description:
  • Save sysparam HISTORY

vscroll(apply)

Description:
  • Preserve vertical scroll of current nav

Parameters:
Name Type Description
apply boolean | number

apply when true or save the scrollTop of nav container