Module: explorer/widgets/sidebar/CreationModalDialog

explorer/widgets/sidebar/CreationModalDialog

A modal window that allows users to create a new spec along with information about the spec.
Source:
See:

Extends

Requires

Methods

clear()

Clears the input boxes after a new spec is added.
Source:

getGadgetSpecService() → {gadgetSpecService}

Getter method for the GadgetSpecService module for testing purposes.
Source:
Returns:
The gadgetSpecService object.
Type
gadgetSpecService

onSubmit()

Sends the data of user-submitted spec to the servlet and hides and clears the modal.
Source:

postCreate()

Called right before widget is added to the dom. See link for more information.
Source:
See:

postNewEESpec(userInput, thenFunction)

Posts a new EESpec to the servlet.
Parameters:
Name Type Description
userInput Object User input information in the form of { title: ..., filename: ..., author: ..., description: ... }
thenFunction Function Callback function to execute if the POST to the servlet is successful.
Source:

postNewGadgetSpec(userInput, thenFunction)

Posts a new GadgetSpec to the servlet.
Parameters:
Name Type Description
userInput Object User input information in the form of { title: ..., filename: ..., author: ..., description: ... }
thenFunction Function Callback function to execute if the POST to the servlet is successful.
Source:

replaceResourceStubs(str, mapObj)

Replaces all instances of ${...} in a html code stub string with user input. This method makes sure that the stubs generated for a new spec have the user's information in it (title, description, author).
Parameters:
Name Type Description
str String The html string that has instances of ${...} to replace.
mapObj Object The object containing user data.
Source: