new Reporting(options)
Name | Type | Description |
---|---|---|
options | Object |
options for function call. |
Fires:
- reporting:sending
- reporting:opened
Example
var reporting = new ol.control.Reporting();
map.addControl(reporting);
Extends
- ol.control.Control
Members
-
auto
-
{Boolean} specify if control add some stuff auto
-
collapsed
-
{Boolean} specify if control is collapsed (true) or not (false)
-
data
-
{Object} raw data
-
draggable
-
{Boolean} specify if control is draggable (true) or not (false)
-
eventsListeners
-
{Array} specify some events listener
Methods
-
getCollapsed(){Boolean}
Controls/Reporting/Reporting.js, line 780 -
Returns true if widget is collapsed (minimized), false otherwise
Returns:
- true if widget is collapsed
-
getContainer(){DOMElement}
Controls/Reporting/Reporting.js, line 771 -
Get container
-
nextStep(){void}
Controls/Reporting/Reporting.js, line 1130 -
This method is used to navigate to the next step in the reporting process.
It retrieves the next step from the stepContainer array based on the current step index.
If a next step exists (indicated by a valid index), it retrieves the action associated with the current step,
clears its data, and disables it.
The data from the current action is merged into the reporting data object. -
onCancelReportingClick(e)
Controls/Reporting/Reporting.js, line 1278 -
Handle the click event on the "Cancel Reporting" button.
Name Type Description e * The click event object.
-
onCloseReportingClick(e)
Controls/Reporting/Reporting.js, line 1269 -
Handle the click event on the "Close Reporting" button.
Name Type Description e * The click event object.
-
onEntryFormDescReportingChange(e)
Controls/Reporting/Reporting.js, line 1324 -
Handle the change event on the "Form Description Reporting" textarea element.
Name Type Description e * The change event object.
-
onEntryFormNameReportingChange(e)
Controls/Reporting/Reporting.js, line 1308 -
Handle the click event on the "Show Form Input Reporting" button.
Name Type Description e * The click event object.
-
onEntrySendMailReportingChange(e)
Controls/Reporting/Reporting.js, line 1335 -
Handle the change event on the "Send Mail Reporting" input element.
Name Type Description e * The change event object.
-
onNextReportingClick(e)
Controls/Reporting/Reporting.js, line 1260 -
Handle the click event on the "Next Reporting" button.
Name Type Description e * The click event object.
-
onPrevReportingClick(e)
Controls/Reporting/Reporting.js, line 1251 -
Handle the click event on the "Previous Reporting" button.
Name Type Description e * The click event object.
-
onReportingFormSubmit(e)
Controls/Reporting/Reporting.js, line 1291 -
Handle the form submission event for the reporting form.
Name Type Description e * The form submission event object.
-
onSelectFormThemeReportingChange(e)
Controls/Reporting/Reporting.js, line 1316 -
Handle the change event on the "Form Theme Reporting" select element.
Name Type Description e * The change event object.
-
onShowFormDrawingReportingClick(e)
Controls/Reporting/Reporting.js, line 1299 -
Handle the click event on the "Show Form Drawing Reporting" button.
Name Type Description e * The click event object.
-
onShowReportingClick(e)
Controls/Reporting/Reporting.js, line 1220 -
Handle the click event on the "Show Reporting" button.
Name Type Description e * The click event object.
-
onShowSendReportingClick(e)
Controls/Reporting/Reporting.js, line 1351 -
This method is called when the user clicks on the "Send Reporting" button.
It is responsible for handling the click event and processing the reporting data.
It retrieves the mail from the event, updates the data object,
and sends the reporting data to the server or processes it as needed.
If the sending is successful, it clears the data and resets the step to the first step.
If there is an error during the sending process, it displays an error message for a limited time.Name Type Description e * {mail, name, desc, theme, drawing, location}
Fires:
- reporting:send
-
prevStep(){void}
Controls/Reporting/Reporting.js, line 1174 -
This method is used to navigate back to the previous step in the reporting process.
It retrieves the previous step from the stepContainer array based on the current step index.
If a previous step exists (indicated by a valid index), it clears the current action's data
and sets the step to the previous one.
The current action's data is cleared to ensure that any unsaved changes are discarded.
This method is typically called when the user wants to go back to the previous step
in the reporting process, allowing them to review or modify their input before proceeding.
It is useful for scenarios where users may need to correct or change their input
before finalizing their report.
If the current step does not have a previous step (indicated by prev being -1),
the method does nothing, effectively preventing navigation to a non-existent step.
This ensures that the reporting process remains linear and prevents users from navigating
to steps that are not part of the defined workflow. -
setCollapsed(collapsed)
Controls/Reporting/Reporting.js, line 789 -
Collapse or display widget main container
Name Type Description collapsed Boolean True to collapse widget, False to display it
-
setMap(map)
Controls/Reporting/Reporting.js, line 718 -
Overwrite OpenLayers setMap method
Name Type Description map ol.Map Map.
-
setStep(num){void}
Controls/Reporting/Reporting.js, line 1085 -
This method sets the current step of the reporting process.
It updates the visibility of the step containers,
activates the corresponding IoC action,
and updates the reporting title and footer display.
It is typically called when the user navigates to a different step in the reporting process,
such as moving from the input step to the form step or the send step.Name Type Description num *