UploadImageButton

(esrith/amos/form/UploadImageButton)

Define image for use as upload button.

Description
new UploadImageButton(params?srcNodeRef?)

Create a new UploadImageButton widget.

Type Description
_styleAttr Object

when you want to set style for other node. you can do this by example... _styleAttr:{ style-property:effected-node } this property was effected where this class was inherited and your widget was called by... var widget = new YourWidget({ style:{ style-property:style-value } }); now effected-node in you widget will have style-property = style-value

active Boolean

If active is true ,force the image button to enter the active state and classname 'amos-form-active' will be added.

activeOverUrl String

A path to an image displayed when the mouse is over the active button.

activeUrl String

A path to an image displayed when the button is active.

busy Boolean

If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added.

disabled Boolean

If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted.

disabledUrl String

A path to an image displayed when the button is disabled.

enabledToggle Boolean

If true, the button works as a toggle button. Toggle button is a button that enters active state after it is clicked and remains in active state until it is clicked again to return to normal state.

error Boolean

If true, this forces the control to enter the error state and classname 'amos-form-error' will be added.

filled Boolean

A flag that shows whether a form element is filled in (true) or empty (false).

height Number | String

Height of image.

id String

An unique id for an element. (The specified value must be unique within the document.)

label String

Text that appears on button.

name String

Name of upload button. When use a control for request to server, this property is parameter's name.

overUrl String

A path to an image displayed when the mouse is over the button.

readOnly Boolean

If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission.

title String

A tooltip text of an image button.

url String

A path to an image displayed as the normal state of the button.

valid Boolean

If valid is true, check the validity of upload file.

validSize Number

Maximum allowed size for uploaded files. Default is ‘0’, which means infinite size.

validType String[]

Type of file for upload.

value File

Value of a upload control.

viewMode Boolean

If true, the control will show only the displayedValue.

width Number | String

Width of image.

Return type Description
__baseClassInherit(constructor) None

get className from superclass.

activate() None

Force the button to enter the activate state.

deactivate() None

Force the button to enter the normal state.

hide(elem?) None

Hide a specified element. The hidden element will not be displayed at all.

isValid() Boolean

Returns true when value validation succeeded; otherwise, false.

isVisible(elem?) Boolean

Return true if the element is visible, otherwise false.

reset() None

Use the reset() method to reset all state and value to default.

show(elem?) None

Display a specified element.

toggle(elem?) None

Toggle visibility of a specified element.

Description
blur

Fires when an object loses focus.

change

The event fires when the value of an element has been changed.

click

Fires when the user clicks on a button.

dblclick

Fires when the user double-clicks on a button.

focus

Fires when an element gets focus.

keydown

Fires when the user is pressing a key (on the keyboard).

keypress

Fires when the user presses a key (on the keyboard).

keyup

Fires when the user releases a key (on the keyboard).

mousedown

Fires when a user presses a mouse button over an element.

mouseout

Fires when the mouse pointer is moved out of an element.

mouseover

Fires when the mouse pointer is moved onto an element.

mouseup

Fires when a user releases a mouse button over an element.

Constructors Detail
new UploadImageButton(params?srcNodeRef?)

Create a new UploadImageButton widget.

Parameters:
Properties Detail
<Object>
_styleAttr

when you want to set style for other node. you can do this by example... _styleAttr:{ style-property:effected-node } this property was effected where this class was inherited and your widget was called by... var widget = new YourWidget({ style:{ style-property:style-value } }); now effected-node in you widget will have style-property = style-value

Default value: {}

<Boolean>
active

Inherited from _StateMixin but overwritten in esrith/amos/form/ImageButton.js:171

If active is true ,force the image button to enter the active state and classname 'amos-form-active' will be added.

Default value: false

<String>
activeOverUrl

A path to an image displayed when the mouse is over the active button.

<String>
activeUrl

A path to an image displayed when the button is active.

<Boolean>
busy

If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added.

Default value: false

<Boolean>
disabled

If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted.

Default value: false

<String>
disabledUrl

A path to an image displayed when the button is disabled.

<Boolean>
enabledToggle

If true, the button works as a toggle button. Toggle button is a button that enters active state after it is clicked and remains in active state until it is clicked again to return to normal state.

Default value: false

<Boolean>
error

If true, this forces the control to enter the error state and classname 'amos-form-error' will be added.

Default value: false

<Boolean>
filled

A flag that shows whether a form element is filled in (true) or empty (false).

Default value: false

<Number | String>
height

Height of image.

Default value: ""

<String>
id

An unique id for an element. (The specified value must be unique within the document.)

<String>
label

Inherited from _FormMixin but overwritten in esrith/amos/core/_UploadBase.js:55

Text that appears on button.

Default value: Browse...

<String>
name

Inherited from _FormConstruct but overwritten in esrith/amos/core/_UploadBase.js:64

Name of upload button. When use a control for request to server, this property is parameter's name.

<String>
overUrl

A path to an image displayed when the mouse is over the button.

<Boolean>
readOnly

If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission.

Default value: false

<String>
title

A tooltip text of an image button.

<String>
url

A path to an image displayed as the normal state of the button.

<Boolean>
valid

Inherited from _FormConstruct but overwritten in esrith/amos/core/_UploadBase.js:132

If valid is true, check the validity of upload file.

<Number>
validSize

Maximum allowed size for uploaded files. Default is ‘0’, which means infinite size.

Default value: 0

<String[]>
validType

Type of file for upload.

<File>
value

Inherited from _FormConstruct but overwritten in esrith/amos/core/_UploadBase.js:78

Value of a upload control.

<Boolean>
viewMode

If true, the control will show only the displayedValue.

Default value: false

<Number | String>
width

Width of image.

Default value: ""

Methods Detail
__baseClassInherit
(
  • constructor
)

get className from superclass.

Parameters
  • <Object> constructor Required
activate
()

Force the button to enter the activate state.

deactivate
()

Force the button to enter the normal state.

hide
(
  • elem?
)

Hide a specified element. The hidden element will not be displayed at all.

Parameters
  • <Node> elem Optional

    Specified element to be hidden.

<Boolean>
isValid
()

Returns true when value validation succeeded; otherwise, false.

<Boolean>
isVisible
(
  • elem?
)

Return true if the element is visible, otherwise false.

Parameters
  • <Node> elem Optional

    Specified element to be checked. If not specified, domNode of the widget is used instead.

reset
()

Inherited from _FormConstruct but overwritten in esrith/amos/core/_UploadBase.js:162

Use the reset() method to reset all state and value to default.

show
(
  • elem?
)

Display a specified element.

Parameters
  • <Node> elem Optional

    Specified element to be displayed.

toggle
(
  • elem?
)

Toggle visibility of a specified element.

Parameters
  • <Node> elem Optional

    Specified element to toggle visibility.

Events Detail
blur

Fires when an object loses focus.

Event Payload:
  • <Object> evt

    -javascript event object

change

The event fires when the value of an element has been changed.

Event Payload:
  • <Object> evt

    -javascript event object

click

Fires when the user clicks on a button.

Event Payload:
  • <Object> evt

    -javascript event object

dblclick

Fires when the user double-clicks on a button.

Event Payload:
  • <Object> evt

    -javascript event object

focus

Fires when an element gets focus.

Event Payload:
  • <Object> evt

    -javascript event object

keydown

Fires when the user is pressing a key (on the keyboard).

Event Payload:
  • <Object> evt

    -javascript event object

keypress

Fires when the user presses a key (on the keyboard).

Event Payload:
  • <Object> evt

    -javascript event object

keyup

Fires when the user releases a key (on the keyboard).

Event Payload:
  • <Object> evt

    -javascript event object

mousedown

Fires when a user presses a mouse button over an element.

Event Payload:
  • <Object> evt

    -javascript event object

mouseout

Fires when the mouse pointer is moved out of an element.

Event Payload:
  • <Object> evt

    -javascript event object

mouseover

Fires when the mouse pointer is moved onto an element.

Event Payload:
  • <Object> evt

    -javascript event object

mouseup

Fires when a user releases a mouse button over an element.

Event Payload:
  • <Object> evt

    -javascript event object