@@ -9,6 +9,12 @@ view-genericbehavior or function should be implemented in a common
99Template/View behavior or maybe enriched (like some things are today) by the
1010:ref: `cosmoz-page-router `.
1111
12+ .. note ::
13+
14+ Tip! The file locations presented in this reference are directly openable in
15+ :ref:`vscode` if you have opened the repository root folder in the editor, just
16+ run the path in the command palette (``Ctrl + Shift + P``).
17+
1218 .. _view-imports :
1319
1420View imports
@@ -17,15 +23,21 @@ View imports
1723All views should import the ``views/imports.html `` file which imports the most
1824common dependencies required for the views.
1925
20- View behaviors reference
21- ------------------------
26+ View behavior reference
27+ -----------------------
28+
29+ Internal functions (those beginning with and underscore) are not listed here,
30+ unless the behavior only has internal functions (which may indicate that the
31+ functions are not correctly named in that behavior).
2232
2333``Cosmoz.CommonBehaviors ``
2434~~~~~~~~~~~~~~~~~~~~~~~~~~
2535
2636This is a meta behavior that links to other behaviors:
27- ``Cosmoz.DateHelperBehavior ``, ``Cosmoz.MoneyHelperBehavior `` and
28- ``Cosmoz.TemplateHelperBehavior ``.
37+
38+ * ``Cosmoz.DateHelperBehavior ``
39+ * ``Cosmoz.MoneyHelperBehavior ``
40+ * ``Cosmoz.TemplateHelperBehavior ``
2941
3042Located in::
3143
@@ -277,7 +289,8 @@ Located in:
277289
278290Functions shared between rule and supplier views.
279291
280- * ``isPathLocatorAncestor(pathLocatorAncestor, pathLocator) `` - Find out if one path locator is an ancestor of another path locator
292+ * ``isPathLocatorAncestor(pathLocatorAncestor, pathLocator) `` - Find out if one
293+ path locator is an ancestor of another path locator
281294
282295Located in::
283296
@@ -304,6 +317,32 @@ Located in::
304317
305318Omnitable search (OTS) shared functions.
306319
320+ * ``_capitalizeFirstLetter(string) `` - Capitalize the first letter of a string
321+ * ``_computeBaseOtsQueryParams(pathLocator, myItemsOnly, baseSearchParams,
322+ filtersNotify) `` - Get parameters for the base request call
323+ * ``_computeOtsExternalValues(local, baseOtsSearchParams) `` - Decide whether
324+ external values should be used or not
325+ * ``_computeOtsOurReferenceSuggestParams(baseOtsQueryParams, query) `` - Get
326+ parameters for our reference suggestion call
327+ * ``_computeOtsPathLocatorSuggestParams(baseOtsQueryParams) `` - Get parameters
328+ for path locator suggestion call
329+ * ``_computeOtsSuggestParams(fieldName, baseOtsQueryParams, run = true) `` - Get
330+ parameters for a large amount of suggestion calls
331+ * ``_computeOtsCategorySuggestParams(baseOtsQueryParams, categoryQuery) `` - Get
332+ parameters for category suggestion call
333+ * ``_computeOtsSuppliersSuggestParams(baseOtsQueryParams, sellerPartyName,
334+ run) `` - Get parameters for supplier suggestion call
335+ * ``_getISODateString(date) `` - Convert a date to an ISO date string
336+ * ``_getLocalISODateString(date) `` - Convert a date to a local ISO date string
337+ * ``_otsIsMoreRestrictive(origParams, newParams) `` - Decide whether omnitable
338+ search should be more restrictive or not
339+ * ``_otsObserveSearchParams(viewParams, userParams, subPath) `` - Observer for
340+ user and view parameters that sets search parameters
341+
342+ Located::
343+
344+ app/views/general/omnitablesearch-helper-behavior.html
345+
307346``cz.behaviors.OrderHelperBehavior ``
308347~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309348
@@ -351,7 +390,7 @@ Located in::
351390``cz.behaviors.PurchaseSuppliersHelperBehavior ``
352391~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
353392
354- Shared functions for supplier views in purchase directory. Provides shared
393+ Shared functions for supplier views in purchase directory. Provides only shared
355394arrays at the moment.
356395
357396Located in::
@@ -364,7 +403,8 @@ Located in::
364403Shared functions for simple actions.
365404
366405* ``filterSimpleActions(action) `` - Get the simpleAction part of an action
367- * ``getSimpleRowActions(rows, numRows = 0) `` - Iterate invoice/order rows and get actions matching simple row action criterias
406+ * ``getSimpleRowActions(rows, numRows = 0) `` - Iterate invoice/order rows and
407+ get actions matching simple row action criterias
368408
369409Located in::
370410
@@ -373,4 +413,22 @@ Located in::
373413``cz.behaviors.Template ``
374414~~~~~~~~~~~~~~~~~~~~~~~~~
375415
376- .. todo :: Document view behaviors
416+ * ``created() ``
417+ * ``attached() ``
418+ * ``detached() ``
419+ * ``deepEquals(a, b) `` - Compare two arrays or objects deeply
420+ * ``linkToCurrentPage(params, hashhash) `` - Construct a link to the current
421+ page
422+ * ``findBranchById(branchId) `` - Recursively search cz.boot.organization for a
423+ branchId
424+ * ``hasAnyRoleFunction(items) `` - Find out if any item has the required
425+ function for it
426+ * ``hasRoleFunction(roleFunction, cz = this.cz) `` - Find out if user has a
427+ role function
428+ * ``openDataDialog(event) `` - Generic helper to use 'data-dialog' attribute to
429+ find element ID of dialog to open
430+ * ``validateForm(event, detail) `` - Validate data-dialog form
431+
432+ Located in::
433+
434+ app/polymer/cz-behaviors/cz-behaviors.js
0 commit comments