Class: module:argos/Fields//SignatureField

module:argos/Fields//SignatureField()

The SignatureField uses an HTML5 canvas element to render previews of the signature vector provided by it's editor view SignatureView.

Constructor

new module:argos/Fields//SignatureField()

Extends:
Source:
Example
{
   name: 'Signature',
   property: 'Signature',
   label: this.signatureText,
   type: 'signature'
}

Extends

Members

alwaysUseValue

Properties:
Name Type Description
alwaysUseValue Boolean

Signifies that the field should always be included when the form calls getValues.

Inherited From:
Source:

applyTo

Properties:
Name Type Description
applyTo String

If defined it will use the applyTo string when getting and setting properties from the SData object instead of the property property.

Inherited From:
Source:

attributeMap

Properties:
Name Type Description
Creates Object

a setter map to html nodes, namely:

  • inputValue => inputNode's value attribute
Inherited From:
Source:

autoFocus

Properties:
Name Type Description
autoFocus Boolean

Flag to indicate if this field should be focused when the form is shown.

Inherited From:
Source:

containerNode

Properties:
Name Type Description
The HTMLElement

parent container element of the field.

Inherited From:
Source:

currentValue

Properties:
Name Type Description
Value Object/String/Date/Number

storage for current value, as it must be formatted for display this is the full value.

Inherited From:
Source:

default

This applies a default value when inserting a new record, the default value is applied after the template entry but before the context and changes are applied.

Note the word default must be in quotes as default is a reserved word in javascript.

Inherited From:
Source:

disabled

Properties:
Name Type Description
disabled Boolean

Indicates the disabled state

Inherited From:
Source:

hidden

Properties:
Name Type Description
hidden Boolean

Indicates the visibility state

Inherited From:
Source:

label

Properties:
Name Type Description
label String

The text that will, by default, show to the left of a field.

Inherited From:
Source:

name

Properties:
Name Type Description
name String

The unique (within the current form) name of the field

Inherited From:
Source:

originalValue

Properties:
Name Type Description
Value String

storage for keeping track of modified/unmodified values. Used in isDirty.

Inherited From:
Source:

owner

Properties:
Name Type Description
owner View

View that controls the field.

Inherited From:
Source:

property

Properties:
Name Type Description
property String

The SData property that the field will be bound to.

Inherited From:
Source:

required :Boolean

required should be true if the field requires input. Defaults to false.

Type:
  • Boolean
Inherited From:
Source:

type

Properties:
Name Type Description
type String

The registered name of the field that gets mapped in FieldManager when the field is constructed

Inherited From:
Source:

validationValue

Properties:
Name Type Description
Value Object/String/Date/Number

storage for the value to use in validation, when gathering values from the editor view the validationValue is set using getValues(true) which returns all values even non-modified ones.

Inherited From:
Source:

view

Inherited From:
Source:

widgetTemplate

Properties:
Name Type Description
Simplate Simplate

that defines the fields HTML Markup

  • $ => Field instance
  • $$ => Owner View instance
Inherited From:
Source:

Methods

_disableTextElement()

Sets the input nodes' disabled attribute to true

Inherited From:
Source:

_enableTextElement()

Sets the input nodes' disabled attribute to false

Inherited From:
Source:

_onClick(evt)

Handler for the onclick event of the fields container.

Invokes navigateToEditView.

Parameters:
Name Type Description
evt Event
Inherited From:
Source:

_onComplete()

Handler for _onComplete which is fired after the user has completed the form in the editor view

Fires onChange.

Inherited From:
Source:

buildRendering()

Processes this.widgetTemplate or this.contentTemplate

Inherited From:
Source:

clearValue()

Clears the value by passing null to setValue

Inherited From:
Source:

complete()

Handler for the toolbar item that is passed to the editor view. When this function fires the view shown is the editor view but the function is fired in scope of the field.

It gets a handler of the current active view and validates the form, if it passes it gathers the value, sets the fields text, calls ReUI.back and fires _onComplete.

Inherited From:
Source:

createNavigationOptions()

Creates the navigation options to be passed to the editor view. The important part of this code is that it passes tools that overrides the editors view toolbar with an item that operates within this fields scope.

Inherited From:
Source:
Returns:

Navigation options

disable()

Extends the parent implementation to also call _disableTextElement.

Inherited From:
Source:

enable()

Extends the parent implementation to also call _enableTextElement.

Inherited From:
Source:

focus()

Focuses the input for the field

Inherited From:
Source:

formatValue(val)

Returns the formatted value. This should be overwritten to provide proper formatting

Parameters:
Name Type Description
val
Inherited From:
Source:

getValue() → {Object/String/Date/Number}

Returns the current value

Inherited From:
Source:
Returns:
Type
Object/String/Date/Number

getValuesFromView()

Gets the values from the editor view and applies it to the this fields this.currentValue and this.validationValue.

Inherited From:
Source:

hide()

Sets hidden to true and fires onHide.

Inherited From:
Source:

init()

Extends the parent implementation to connect the onclick event of the fields container to _onClick.

Inherited From:
Source:

isDirty() → {Boolean}

Determines if the value has been modified from the default/original state

Inherited From:
Source:
Returns:
Type
Boolean

isDisabled() → {Boolean}

Returns the disabled state

Inherited From:
Source:
Returns:
Type
Boolean

isHidden() → {Boolean}

Returns the hidden state

Inherited From:
Source:
Returns:
Type
Boolean

Navigates to the given this.view using the options from createNavigationOptions.

Inherited From:
Source:

onChange(field)

Event that fires when the field is changed

Parameters:
Name Type Description
field _Field

The field itself

Inherited From:
Source:

onDisable(field)

Event that fires when the field is disabled

Parameters:
Name Type Description
field _Field

The field itself

Inherited From:
Source:

onEnable(field)

Event that fires when the field is enabled

Parameters:
Name Type Description
field _Field

The field itself

Inherited From:
Source:

onHide(field)

Event that fires when the field is hidden

Parameters:
Name Type Description
field _Field

The field itself

Inherited From:
Source:

onShow(field)

Event that fires when the field is shown

Parameters:
Name Type Description
field _Field

The field itself

Inherited From:
Source:

renderTo(node)

Inserts the field into the given DOM node using dijit Widget placeAt(node) and saves a reference to it to this.containerNode.

Parameters:
Name Type Description
node HTMLElement

Target node to insert the field into

Inherited From:
Source:

setText(text)

Sets the displayed text to the input.

Parameters:
Name Type Description
text String
Inherited From:
Source:

setValue(val, initial)

Sets the current value to the item passed, as the default if initial is true. Then it sets the displayed text using setText with the formatted value.

If null/false is passed all is cleared and this.emptyText is set as the displayed text.

Parameters:
Name Type Description
val Object/String/Date/Number

Value to be set

initial Boolean

True if the value is the default/clean value, false if it is a meant as a dirty value

Inherited From:
Source:

show()

Sets hidden to false and fires onShow.

Inherited From:
Source:

validate(value)

Extends the parent implementation to use the this.validationValue instead of this.getValue().

Parameters:
Name Type Description
value
Inherited From:
Source: