Home Reference Source
public class | source

ToolbarAction

Extends:

TypedObject → ToolbarAction

A class that represents a custom toolbar action.

Static Method Summary

Static Public Methods
public static

create(name: *, callback: *, closeDialog: *): *

Constructor Summary

Public Constructor
public

constructor(name: *, level: *, code: *, tooltip: *, iconUrl: *, seperatorBefore: *, seperatorAfter: *, requiresSelection: *, requiresSingleSelection: *)

Member Summary

Public Members
public

code: *

Code of the action, if not specified, defaults to the name

public

Icon for the image button.

public

This means the action itself is only a container for subactions, clicking on it does nothing.

public

To support runtime enable/disable of toolbar actions.

public

iconUrl: *

Icon for the image button.

public

level: *

Level at which the action is to be applied.

public

Name of the action

public

This action will be disabled if a selection is required and there is nothing selected in the grid.

public

This action will be disabled if a more than one item or no items are selected in the grid.

public

Flag to control whether or not to draw a seperator after the action icon Deperecated.

public

Flag to control whether or not to draw a seperator before the action icon.

public

subActions: *[]

A list of ToolbarAction objects that get converted into dropdown menu buttons.

public

tooltip: *

Tooltip for the icon.

public

trigger: *

The actual button associated with the toolbar action.

Method Summary

Public Methods
public

For hierarchical menu support

public
public

Returns true if type!=seperator and has subActions

public

Returns true if type!=seperator and does not have subActions

public

Returns true if type==seperator

public

getLabel(): *

Inherited Summary

From class TypedObject
public

typeCache: {}

public
public

Returns a list of strings that represent the object hierarchy for this object.

public

Returns true if the class name to check is in the list of class names defined for this class.

Static Public Methods

public static create(name: *, callback: *, closeDialog: *): * source

Params:

NameTypeAttributeDescription
name *
callback *
closeDialog *

Return:

*

Public Constructors

public constructor(name: *, level: *, code: *, tooltip: *, iconUrl: *, seperatorBefore: *, seperatorAfter: *, requiresSelection: *, requiresSingleSelection: *) source

Override:

TypedObject#constructor

Params:

NameTypeAttributeDescription
name *
level *
code *
tooltip *
iconUrl *
seperatorBefore *
seperatorAfter *
requiresSelection *
requiresSingleSelection *

Public Members

public code: * source

Code of the action, if not specified, defaults to the name

public disabledIconUrl: * source

Icon for the image button. If not specified, defaults to the custom action icon.

public dropdownOnly: boolean source

This means the action itself is only a container for subactions, clicking on it does nothing.

public enabled: boolean source

To support runtime enable/disable of toolbar actions.

public iconUrl: * source

Icon for the image button. If not specified, defaults to the custom action icon.

public level: * source

Level at which the action is to be applied. If not specified, defaults to 1. If you set this to -1, the action will appear in the tool bar at all levels. Defaults to -1

public name: string source

Name of the action

public requiresSelection: * source

This action will be disabled if a selection is required and there is nothing selected in the grid.

public requiresSingleSelection: * source

This action will be disabled if a more than one item or no items are selected in the grid.

public seperatorAfter: boolean source

Flag to control whether or not to draw a seperator after the action icon Deperecated. Please use the code='separator' instead

public seperatorBefore: boolean source

Flag to control whether or not to draw a seperator before the action icon. Deperecated. Please use the code='separator' instead

public subActions: *[] source

A list of ToolbarAction objects that get converted into dropdown menu buttons.

public tooltip: * source

Tooltip for the icon. If not specified, defaults to the name

public trigger: * source

The actual button associated with the toolbar action.

Public Methods

public getChildren(): * source

For hierarchical menu support

Return:

*

public getClassNames(): string source

Returns a list of strings that represent the object hierarchy for this object.

Override:

TypedObject#getClassNames

Return:

string

public getIsDropdownAction(): * source

Returns true if type!=seperator and has subActions

Return:

*

public getIsRegularAction(): * source

Returns true if type!=seperator and does not have subActions

Return:

*

public getIsSeparator(): * source

Returns true if type==seperator

Return:

*

public getLabel(): * source

Return:

*