A modal window that allows users to create a new spec along with information about the spec.
Extends
- module:explorer/widgets/ModalDialog
- dijit/_WidgetsInTemplateMixin
- dojo/Evented
Requires
Methods
-
clear()
-
Clears the input boxes after a new spec is added.
-
getGadgetSpecService() → {gadgetSpecService}
-
Getter method for the GadgetSpecService module for testing purposes.
Returns:
The gadgetSpecService object.- Type
- gadgetSpecService
-
onSubmit()
-
Sends the data of user-submitted spec to the servlet and hides and clears the modal.
-
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. -
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. -
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.