Class: Main

Simplicite.UI.View.Main

new Main

Main view

Parameters:
Name Type Description
app Simplicite.Ajax Ajax service
engine Simplicite.UI.Engine Main controller
Source:
  • main.js, line 16

Members

board :Simplicite.UI.View.Board

Board renderer

Source:
  • main.js, line 41

crosstab :Simplicite.UI.View.Crosstab

Crosstab renderer

Source:
  • main.js, line 101

external :Simplicite.UI.View.External

External object renderer

Source:
  • main.js, line 107

form :Simplicite.UI.View.Form

Form renderer

Source:
  • main.js, line 53

index :Simplicite.UI.View.Index

Index search renderer

Source:
  • main.js, line 77

list :Simplicite.UI.View.List

List renderer

Source:
  • main.js, line 47

Menu renderer

Source:
  • main.js, line 29

prefs :Simplicite.UI.View.Prefs

Preferences renderer

Source:
  • main.js, line 71

Search renderer

Source:
  • main.js, line 59

social :Simplicite.UI.View.Social

Social renderer

Source:
  • main.js, line 95

tray :Simplicite.UI.View.Tray

Trays renderer

Source:
  • main.js, line 83

update :Simplicite.UI.View.Update

Update renderer

Source:
  • main.js, line 65

widget :Simplicite.UI.View.Widget

Widget renderer

Source:
  • main.js, line 35

wkf :Simplicite.UI.View.Workflow

Workflow renderer

Source:
  • main.js, line 89

Methods

changePassword

Change password redirection

Source:
  • main.js, line 291

createNav

Create a new navigation in a work area: adding a splittable zone with a .desk including the .nav and .content parts

Parameters:
Name Type Description
work string | jQuery work zone
content string | jQuery optional HTML content to display
Source:
  • main.js, line 551

destroy

Destroy field components (tinymce, ace, datepicker, popover...)

Source:
  • main.js, line 1796

ensureVisible

Ensure element to be visible in container

Source:
  • main.js, line 490

fieldEnter

ENTER KEY management = focus the next form-group, or call a function on the last input

Parameters:
Name Type Description
ctn jQuery container
fg jQuery form-group with a field input
fn function optional function to call after the last input
Source:
  • main.js, line 1034

getAction

Get UI extended action

Parameters:
Name Type Description
ctn jQuery Container
obj Simplicite.Ajax.BusinessObject Business object
action string | object Name or action metadata
Source:
  • main.js, line 898
Returns:
The action with action.ui = instance of Simplicite.UI.View.UIAction

getArea

Get UI extended area

Parameters:
Name Type Description
ctn jQuery Container
obj Simplicite.Ajax.BusinessObject Business object
area string | object Name or area metadata
Source:
  • main.js, line 929
Returns:
The area with area.ui = instance of Simplicite.UI.View.UIArea

getContent

Find the .content element if exists in container (or #work)

Parameters:
Name Type Description
ctn jQuery container, null = #work
Source:
  • main.js, line 480
Returns:
the .content element in container, or the container itself

getField

Get UI extended field

Parameters:
Name Type Description
ctn jQuery Parent container where the field is displayed
obj Simplicite.Ajax.BusinessObject Business object
field string | Simplicite.Ajax.ObjectField name or field
index string Optional list index
silent boolean true to ignore message 'unknown field'
Source:
  • main.js, line 883
Returns:
The field with field.ui = instance of Simplicite.UI.View.UIField

getView

Get UI extended view

Parameters:
Name Type Description
ctn jQuery Container
obj Simplicite.Ajax.BusinessObject Business object
view string | object Name or view metadata
Source:
  • main.js, line 914
Returns:
The view with view.ui = instance of Simplicite.UI.View.UIView

hideLoading

Hide the loading spinner

Parameters:
Name Type Description
ctn jQuery optional container
Source:
  • main.js, line 957

icon

Get icon

Parameters:
Name Type Description
icon string prefixed icon name (fas/ far/ gly/ icon/...)
options object | string | number { size, cls } | class name | number: size in px
Source:
  • main.js, line 438

image

Get a static image (located in root/images/image)

Parameters:
Name Type Description
image string name
Source:
  • main.js, line 114

init

Init field components (tinymce, ace, datepicker, popover, pillbox...)

Source:
  • main.js, line 1616

initMain

Prepare the main page when loaded

Parameters:
Name Type Description
p Simplicite.UI.Globals launch parameters merged with Globals
Source:
  • main.js, line 123

linkedLists

Reload and redraw all linked lists

Parameters:
Name Type Description
all boolean get all linked values when field is empty (case of search)
Source:
  • main.js, line 1832

moduleChooser

Modules filtering for designers

Source:
  • main.js, line 2075

notify

Notification handler

Parameters:
Name Type Description
e object Event { type:create|update|delete, object, rowId, item:when known } sent to '.js-notify' elements with 'ui.notify' handler
Source:
  • main.js, line 800

reload

Reload UI data: refresh current page and treeviews

Source:
  • main.js, line 282

resize

Resize event on .js-resizable with ui.resize handler

Parameters:
Name Type Description
ctn jQuery optional container to resize (default all page)
w number New viewport width
h number New viewport height
reload boolean true to force a redraw of components
Source:
  • main.js, line 772

serviceLost

Popup when service is lost (no internet or server down)

Source:
  • main.js, line 2137

setApps

Init the multi-apps popup

Parameters:
Name Type Description
b jQuery Scopes container with apps
apps object[] Array of granted scope { icon|logo, label, url, home }
Source:
  • main.js, line 301

setContent

Replace the content

Parameters:
Name Type Description
ctn jQuery Container
html string Optional HTML content (full page or embedded elements)
url string Or optional URL to load in iframe .frame-wrapper
cbk function Optional callback
Source:
  • main.js, line 512

shortcuts

Displays the shortcuts

Parameters:
Name Type Description
list object[] Array of granted shortcut { name, icon, label, url, target }
backend boolean true to add a return to back-end interface
ctn jQuery UI container
head boolean display as a "plus" button in header?
Source:
  • main.js, line 334

showLoading

Show the loading spinner (widget waitdlg)

Parameters:
Name Type Description
ctn jQuery optional container (full body if undefined or #work area if null)
  • explicit element in page
  • undefined: displayed on "body"
  • null: displayed on #work area
Source:
  • main.js, line 946

showProgress

Show a job progress

Parameters:
Name Type Description
ctn object optional container (in a dialog if null)
params object parameters
Properties
Name Type Description
name string optional job name
title string optional label
circular boolean true for a circular bar
service function service(fn) to get progression
delay function delay of refresh in ms
callback function optional callback({percent,message}) during progression
Source:
  • main.js, line 973

split

Split the container in 2 parts (any previous split is removed)

Parameters:
Name Type Description
ctn jQuery container
pos string position left|right|top|bottom, default 'top'
options object | jQuery optional parameters or content
Properties
Name Type Description
content jQuery content to add at position
resizable boolean can resize content ?
height string optional content height
width string optional content width
collapsible boolean can collapse content ?
collapsed boolean collapsed by default ?
Source:
  • main.js, line 576

theme

Theme picker

Parameters:
Name Type Description
themes string[] list of themes
Source:
  • main.js, line 412

undoredo

Init Undo/Redo controls

Parameters:
Name Type Description
ctn jquery Container
use boolean | string true|false|'keys'
Source:
  • main.js, line 2020

unsplit

Remove the splitted content

Parameters:
Name Type Description
ctn jQuery container with content
Source:
  • main.js, line 747

<inner> initAce

Init the ACE editor

Parameters:
Name Type Description
f Simplicite.Ajax.ObjectField related field with _ace parameters
Source:
  • main.js, line 829

<inner> initTinymce

Init the TinyMCE editor

Parameters:
Name Type Description
f Simplicite.Ajax.ObjectField related field with _tinymce parameters
Source:
  • main.js, line 818