1,813
การแก้ไข
| บรรทัดที่ 318: | บรรทัดที่ 318: | ||
* '''Status Attributes''' | * '''Status Attributes''' | ||
** '''in_table_row''' ''(int)'': The row index of the entry currently working on by the in-line form. | |||
** '''triggered''': Whether the form is in the triggered (fill-able and submit-able) state. | |||
** '''populating''': Whether the form is currently in a populating cycle. This state attribute prevents other populating-based routines to run in conflict and prevents the submission of an incompletely populated form. Only reset this flag via setter routine {{code|lang=javascript|form_obj.populating_tag_reset}}. | |||
** '''search_filling''': Whether the form is currently in a search-fill cycle. Search-filling counts as a populating-based routine. This flag prevents conflicting cycles and submission of incompletely populated form. Only reset this flag via setter routine {{code|lang=javascript|form_obj.search_filling_tag_reset}}. | |||
** '''proceeding''': Whether the form is trying to proceed in its tab sequence. This flag might seem trivial, but since the key press {{key press|Tab}} and {{key press|Enter}} trigger both search-filling and proceeding, it is crucial to correctly handle element in focus. Only reset this flag via setter routine {{code|lang=javascript|form_obj.proceeding_tag_reset}}. | |||
** '''waiting_instacalc''': An array (queue) for intracalc cycles being stopped from running by another cycle in process (e.g. by ''populating'' flag). | |||
** '''skip_instacalc''': A temporary lock put on the form's instacalc cycle. When this flag is {{code|lang=javascript|true}}, instacalc cycles will be be triggered by change events on fields. This flag is a normal part of in-line form populating cycle. | |||
** '''submit_as_del''': Whether the form will be submit in ''delete'' mode. This flag is flipped to {{code|lang=javascript|true}} only when the ''real'' delete button (the one in the confirm modal) is clicked, and is reset immediately when a submission cycle ends. Handle this flag exclusively through setter routine {{code|lang=javascript|form_obj.set_submit_as_del}}. | |||
** '''pass_timechk''': Whether the form has passed a time-check test. Prior to each submission request, the form must send a small time-check request. If the server found that the form is working under the wrong month, a 461 error is raised and the submission is halted. | |||
** '''waiting_to_submit''': Whether the form has a submit action in queue. This flag is flipped to {{code|lang=javascript|true}} when a submit routine is interrupted by other flags or by the need to make a time-check request beforehand. It is reset automatically as a part of the submission cycle. | |||
** '''pass_finalchk''' ''(Only applies to form with 'redirecting' submit)'': Whether the form has passed final check and a submission request is underway. This flag prevents redundant submit requests. | |||
** '''submitting''' ''(Only applies to form with 'non-redirecting' submit)'': Whether a submission request is underway. This flag prevents redundant submit requests. | |||
* '''Data Attributes''' | * '''Data Attributes''' | ||
| บรรทัดที่ 325: | บรรทัดที่ 336: | ||
* '''Additional Functions & Routines''' | * '''Additional Functions & Routines''' | ||
** '''post_load_cmds''' ''([function,] or {{code|lang=javascript|false}})'': An array of functions to run at the end of a form-populating cycle. | |||
** '''post_insta_cmds''' ''([function,] or {{code|lang=javascript|false}})'': An array of functions to run at the end of an instacalc cycle. | |||
** '''post_submit_cmds''' ''([function,] or {{code|lang=javascript|false}}: Only applies to forms with 'non-redirecting' submit)'': An array of functions to run at the end of a submission cycle. | |||
** '''field_change_routines''': An object that organizes functions to run on change events of different fields. | |||
=== CuneiForm Jinja2 Macro Pack === | === CuneiForm Jinja2 Macro Pack === | ||