wiki:DeveloperGuidelines/EdenMobile/Settings

Version 9 (modified by Fran Boon, 7 years ago) ( diff )

--

Settings

table.settings (& consequently resource.settings) is a flexible JSON storage for configuration settings (equivalent to s3db.configure() on the Eden web application).

Here are some of the settings which are in-use:

Developer Settings

These are settings which a developer may see, but generally shouldn't need to touch

Setting Purpose Structure
autototals Allow a field to default to the sum of a set of other fields, whilst still allowing manual entry {"sumFieldname": ["sourceFieldname1", "sourceFieldname2"]}
grids Allow a set of fields to render as a Table in the form {"pseudoFieldname": {"r": ["rowLabel1", "rowLabel2"], "c": ["colLabel1", "colLabel2"], "f": [["realFieldname_forR1C1","realFieldname_forR1C2"],["realFieldname_forR2C1","realFieldname_forR2C2"]]}
subheadings Provide subheadings within CRUD create/update forms {"fieldname": "Heading"} or {"fieldname": ["Heading1", "Heading2"]}

NB New settings need adding to validSettings in services/sync/schema_import.js

Internal Settings

These are settings which a developer may see, but generally shouldn't need to touch

Setting Purpose Structure
main Whether this is a primary resource rather than a component or lookup table boolean
Note: See TracWiki for help on using the wiki.