Contains the functionalities related to the resources page.
- Copyright:
- 2015 Kepler project authors
- License:
- BSD 3-clause, see LICENSE for more details.
- Source:
Methods
(static) doc_ready()
This is executed after the HTML page has been loaded.
This is a common procedure of all of the client-side modules to
initialise the page content.
- Source:
(static) fillEditFields()
Displays the information of the current resource in the corresponding fields.
- Source:
(static) makeUpdateStatuses()
Determines an event for an element. Counts the sum of all status fields.
- Source:
(static) resetView()
Empties the edit fields and reloads the current list of resources.
- Source:
(static) setCurrentSelection()
Sets the information of the chosen resource to the corresponding fields.
Adds a new label and text input fields for each status that the resource has.
- Source:
(static) setNewResource()
Makes a new object by cloning the empty resource received from the database.
- Source:
(static) updateResList(inputText)
Fills the current list of resources with the resources
that match the given string.
Parameters:
Name | Type | Description |
---|---|---|
inputText |
string | The string that has to be found in the name of every displayed resource. |
- Source:
(static) updateTotalCount()
Calculates the total count for the current resource.
- Source:
(inner) btnAddNewResource click()
Empties the edit fields and sets placeholders. Initialises the resource
status fields.
- Source:
(inner) btnDeleteResource click()
If a current resource is selected, displays a confirmation dialog and
removes the resource from the database if approved by the user.
- Source:
(inner) btnSaveChanges click()
If the id of the current resource is -1, makes a call to create
a new resource with the given parameters.
Otherwise makes a call to save changes to the current resource.
If any important fields are empty, shows a notification without
making a call. Updates the view after the call has been completed.
- Source:
(inner) modalButtonYes click()
Makes a call to remove the current resource from the database.
- Source:
(inner) resourceList change()
Makes a clone of the selected resource and fill the edit fields with its
information.
- Source: