Index
navigate
This object is created for navigation functions specific to the siteUP! system, creating the nav object for that purpose.
Although we have tried to automate it as much as possible, it still requires the specification of some parameters.
It was decided to leave it as an object and not as a series of functions for data protection reasons.
Internal Values
In this case, there are no constants, only variables that obtain their value according to the action and module being accessed. These are:
- serviceID
- ID of the service being "served"
- subserviceID
- ID of the subservice
- servedID
- ID corresponding to the service or subservice
- action
- action to perform
- availableactions
- additional actions that the user can perform
- initdata
- data contained in the JSON of the module
- defaultparams
- default parameters in case of auxiliary forms
- fconditions
- values in case of a list (results per page, initial record, sort field, sort type, filters) data)
Functions/Methods
Function and procedure names are preceded by the prefix nav, which is the same name as the returned connector object.
(initialization)
Identifies the service ID to load the initialization JSON corresponding to the module, and subsequently the subservice, as well as the ID and corresponding action to be displayed. If it's a list, it identifies the list's conditions and possible complementary actions.
navForm
Returns the method for a form, or the path to the CGI or script of the corresponding service/subservice.
navModulesList
Generates an array of the current services, subservices, and actions; Expanding only the corresponding branch.
That is, it will only expand the current service branch, showing its relevant subservices and actions. If it is a subservice, it will only expand the corresponding selected one.
The returned array is not in tree form, but rather a sequence of structures defined as follows:
- name
- Name of the service, subservice, or action.
- type
- Whether it is a service, subservice, or action.
- class
- Whether it is selected or is part of the path.
- privileged
- Whether this type of action requires special privileges (administrator).
- icon
- Icon of the service, subservice, or action.
- params
- Parameters to form the link to this action.
navOtherActionsList
Generates a list of complementary actions to which the user also has access.
navGet
Returns information about the current service, subservice, action, and other data.
navCreateModifiedData
For created and modified fields in tables, it returns author data.
navFHeadersListing
Creates data for table headers for list actions (F).
navFRecordActions
Likewise, for records, it returns a list of actions to be executed on the record passed as a parameter.
navFPageList
Designed to generate pagination for lists. It receives the total number as a parameter. of elements and returns an array containing information about the pagination links.