Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

app.view

Leonardo Laureti edited this page Jul 23, 2019 · 7 revisions

app.view

"view" functions

<Object>

 

app.view.spoof

Captures the current position inside "view" using location.href

<Function>

returns:

<Object> loc   { action, index }

position:

 

app.view.control

Control "view" function, returns self prototype

<Function> prototype   constructor

avalaible prototype methods:

 - isInitialized (funcName)
 - begin ()
 - end ()
 - setID (id)
 - getID ()
 - getLastID ()
 - setEvent (event)
 - getEvent ()
 - setTitle (section_title, view_title, id)
 - setActionHandler (label, id)
 - denySubmit ()
 - fillTable (table, data, order)
 - fillForm (form, data)
 - fillSelection (data, id)
 - fillCTA (id)
 - paginate (element, pages, current_page)
 - localize (element)

globals:

<Object> appe__config
<Object> appe__control
<Object> appe__locale

arguments:

<Array> events
<Object> data
<ElementNode> form

returns:

<Function> prototype

position:

 

app.view.action

Actions "view", returns self prototype

<Function> prototype   constructor

avalaible prototype methods:

 - isInitialized (funcName)
 - begin ()
 - end ()
 - getID ()
 - validateForm () 
 - prepare (data, submit)
 - prevent (data, submit, title, name)
 - open (data, submit) <=> prepare ()
 - add (data, submit) <=> prepare ()
 - edit (data, submit) <=> prepare ()
 - update (data, submit)<=> prepare ()
 - delete (data, submit, title, name) <=> prevent ()
 - close (data, submit, title, name) <=> prevent ()
 - selection ()
 - print ()

globals:

<Object> appe__config
<Object> appe__control
<Object> appe__locale

arguments:

<Array> events
<String> event
<ElementNode> element
<ElementNode> form

returns:

<Function> prototype

position:

 

app.view.sub

Sub-actions "view", returns requested prototype method

<Function> prototype   constructor

avalaible prototype methods:

 - csv (element, table)
 - clipboard (element, table)
 - toggler (element, dropdown)

globals:

<Object> appe__config

arguments:

<String> method
<ElementNode> element
<ElementNode> table

returns:

<Function>

position:

 

app.view.handle

Fires when "view" is loaded

<Function>

globals:

<Object> appe__config
<Object> appe__control

returns.

position:

 

app.view.send

Sends control messages to "main"

<Function>

globals:

<Object> appe__config
<Object> appe__control

arguments:

<Object> ctl

returns.

position:

 

app.view.fetch

Fetch data from "main" store

<Function>

globals:

<Object> appe__control

arguments:

<String> from

returns.

position:

 

app.view.resize

Fires when "view" is resized

<Function>

globals:

<Object> appe__control

returns.

position:

 

app.view.getFormData

Helper to get form data with transformation and sanitization

<Function>

arguments:

<HTMLCollection> elements

returns:

<Object>

position:

 

app.view.convertTableCSV

Helper to convert object data to csv text format

<Function>

arguments:

<ElementNode> table

returns:

<String>

position:

 

app.view.copyToClipboard

Helper to copy into system clipboard

links: https://gist.github.com/rproenca/64781c6a1329b48a455b645d361a9aa3

<Function>

arguments:

<String> source

returns.

position:

 

app.view.load

Default "view" load function

<Function>

globals:

<Object> appe__config
<Object> appe__locale
<Object> appe__store

returns.

position:

 

app.view.beforeunload

Default "view" before unload function

<Function>

globals:

<Object> appe__control

returns:

<Boolean>

position:

 

app.view.loadComplete

Fires on "view" load complete

<Function>

globals:

<Object> appe__config

arguments:

<Object> routine

returns.

position:

 

Clone this wiki locally