API Docs for:
Show:

partTableGlobal Class

Methods

grabExtension

(
  • theName
)
String

Accepts a string and outputs the string of all characters following the final '.' symbol in the string. This is used internally to extract file extensions from file names.

Parameters:

  • theName String

    The file name to be processed

Returns:

String:

the extension in the given file name. If no extension is found, the 'undefined' value is returned.

grabExtension

(
  • theName
)
String

Accepts a string and outputs the string of all characters following the final '.' symbol in the string. This is used internally to extract file extensions from file names.

Parameters:

  • theName String

    The file name to be processed

Returns:

String:

the extension in the given file name. If no extension is found, the 'undefined' value is returned.

part_addEntry

(
  • theEntry
)
Void

Given a jQuery object representation of a part entry, inserts an html representation of that entry in the table

Parameters:

  • theEntry JQuery Object

    The jQuery object containing the representation of a table entry, as extracted from an XML document

Returns:

Void:

part_changeDensity

(
  • theButton
)
Void

A function automatically called by button elements associated with sample densities. Will fill the associated density input box with the value associated with the inner text of the button.

Parameters:

  • theButton HTML Element

    The button element that called this function

Returns:

Void:

part_clickFocus

() Void

Makes it so that the table row associated with this call has its part model displayed

Returns:

Void:

part_conversion

(
  • theString
)
Float

Accepts a string and outputs a part_conversion value for the string's described unit to the standard units of this application. If no suitable unit is identified in the string, the part_conversion value returned is 0.

Parameters:

  • theString String

    A string representation of the unit being looked up

Returns:

Float:

the unit part_conversion value

part_doDensityDrop

(
  • theButton
)
Void

A function automatically called by button elements associated with accessing sample densities. Adds a div element containing several sample density options.

Parameters:

  • theButton HTML Element

    The button element that called this function

Returns:

Void:

part_fillGlobalDensity

() Void

Takes the value present in the global density input textbox and applies it to all parts currently in the table.

Returns:

Void:

part_flipCheck

(
  • theBox
)
Void

A function automatically called by text box elements upon becoming checked/unchecked. Sets an internal value to indicate the checked state of the element.

Parameters:

  • theBox HTML Element

    The checkbox element calling this function

Returns:

Void:

part_getChildrenByTag

(
  • theNode
  • tag
)
Void

Given an HTML element and a string, returns a list containing all child elements of the given element with a tag equivalent to the given string

Parameters:

  • theNode HTML Element

    The HTML element whose children are to be searched

  • tag String

    The string to be used when searching for element children

Returns:

Void:

part_grab

(
  • theTree
  • theMember
)
JQuery Object

Given a jQuery object and a string, returns the first child of the given element with a tag equivalent to the given string.

Parameters:

  • theTree JQuery Object

    The jQuery object whose child is to be returned

  • theMember String

    The name of the tag being searched

Returns:

JQuery Object:

The first child with the given tag. If such a child does not exist, null is returned.

part_grabInd

(
  • theTree
  • theMember
  • theIndex
)
JQuery Object

Given a jQuery object and an integer "N", returns the Nth child of the given element with the given tag.

Parameters:

  • theTree JQuery Object

    The jQuery object whose child is to be returned

  • theMember String

    The name of the tag being searched

  • theIndex String

    The ordinal of the matching child to be returned

Returns:

JQuery Object:

The child meeting the tag and ordinal requirement. If such a child does not exist, null is returned.

part_insertDensityInput

(
  • theButton
)
Void

A function automatically called by button elements associated with the density option in an entry's mass section when pressed. Changes the parent mass section to contain a text input element and a button allowing the user to switch over to mass input.

Parameters:

  • theButton HTML Element

    The button that calls this function

Returns:

Void:

part_insertHollowInput

(
  • theButton
)
Void

A function automatically called by button elements associated with the hollow option in an entry's volume section when pressed. Changes the parent volume section to contain a text input element and a button allowing the user to indicate the part is not hollow.

Parameters:

  • theButton HTML Element

    The button that calls this function

Returns:

Void:

part_insertMassDisplay

(
  • theBox
)
Void

A function automatically called by text input elements associated with the density option in an entry's mass section when changed. Changes the currently displayed mass to match the given density

Parameters:

  • theBox HTML Element

    The text input element that calls this function

Returns:

Void:

part_insertMassInput

(
  • theButton
)
Void

A function automatically called by button elements associated with the mass option in an entry's mass section when pressed. Changes the parent mass section to contain a text input element and a button allowing the user to switch over to density input.

Parameters:

  • theButton HTML Element

    The button that calls this function

Returns:

Void:

part_insertVolumeDisplay

(
  • theBox
)
Void

A function automatically called by text input elements associated with the hollow option in an entry's volume section when changed. Changes the currently displayed volume to match the given thickness

Parameters:

  • theBox HTML Element

    The text input element that calls this function

Returns:

Void:

part_makeDensityDiv

() HTML element

Returns a standard sample density dropdown menu

Returns:

HTML element:

a sample density dropdown menu

part_makeDropButton

() HTML element

Returns a standard button for a density dropdown menu

Returns:

HTML element:

a standard density dropdown button

part_makeMassElem

() HTML element

Returns a blank mass input element for use in the table

Returns:

HTML element:

a blank mass input element

part_makeUndropButton

() HTML element

Returns a standard button to remove a density dropdown element

Returns:

HTML element:

a standard density dropdown removal button

part_makeVolElem

() HTML element

Returns a blank volume input element for use in the table

Returns:

HTML element:

a blank volume input element

part_recieveData

(
  • theXMLText
)
Void

Given the contents of a part table XML file (as a string), fills out the table in the web page.

Parameters:

  • theXMLText String

    The contents of a part table

Returns:

Void:

part_registerDown

(
  • e
)
Void

Accepts a key press event and, if the key press corresponds to one of the keys used for manipulating the view, sets the proper components of "inputState" to true.

Parameters:

  • e Event

    The key down event to be supplied to the function by a key down event listener on the web page

Returns:

Void:

part_registerUp

(
  • e
)
Void

Accepts a key press release and, if the key release corresponds to one of the keys used for manipulating the view, sets the proper components of "inputState" to false

Parameters:

  • e Event

    The key up event to be supplied to the function by a key up event listener on the web page

Returns:

Void:

part_renderEntry

(
  • theCells
)
String

Given an html row element containing data regarding a part, converts the information into an xml formatted string and returns it

Parameters:

  • theCells HTML Element

    An html row element containing information about a part

Returns:

String:

XML representation of the table entry

part_renderXML

() Void

Parses through each entry in the table and, if all entries are fully filled out, converts the table into an XML file and adds a download link for that file to the webpage

Returns:

Void:

part_sendData

(
  • theXMLText
)
Void

Is called whenever the user submits the part table and every entry has been properly filled out.

Parameters:

  • theXMLText String

    The contents of the part table in the webpage, as a string in XML formatting

Returns:

Void:

part_setupClickFocus

() Void

Sets up every table entry HTML element with the focus function as its "onclick" attribute

Returns:

Void:

part_setupHighlighting

() Void

Sets up every table entry HTML element with color highlighting

Returns:

Void:

removeHollowInput

(
  • theButton
)
Void

A function automatically called by button elements associated with the hollow option in an entry's volume section when pressed. Changes the parent volume section to contain only a mass value and a button allowing the user to indicate the part is hollow.

Parameters:

  • theButton HTML Element

    The button that calls this function

Returns:

Void:

unpart_doDensityDrop

(
  • theButton
)
Void

A function automatically called by button elements associated with accessing sample densities. Removes the sample density option div element.

Parameters:

  • theButton HTML Element

    The button element that called this function

Returns:

Void: