APIs

Show:

Flexberry dialog component with Semantic UI modal style.

Methods

_actionHandlerIsDefined

(
  • options
)
Boolean private
Returns flag, indicating whether action handler is defined, for action with the specified name, or not.

Parameters:

  • options Object
    Method options
    • actionName String

      Name of component's action for which handler's existence this method should check.

Returns:

Boolean: Flag, indicating whether action handler is defined, for action with the specified name, or not.

_addDynamicProperty

(
  • propertyName
)
private
Adds component's new dynamic property. Gets related value from {{#crossLink "DynamicPropertiesMixin:dynamicProperties:property"}}dynamic properties{{/crossLink}}, and assignes it to related component's property, then attaches observer.

Parameters:

  • propertyName String
    Name of dynamic property that must be added.

_dynamicPropertiesDidChange

() private
Observes & handles any changes in {{#crossLink "DynamicPropertiesMixin/dynamicProperties:property"}}'dynamicProperties'{{/crossLink}}, assigns actual values to a component's related properties (including initialization moment).

_removeDynamicProperties

() private
Removes component's all previously added dynamic properties. Removes related component's properties & observers.

_removeDynamicProperty

(
  • propertyName
)
private
Removes component's previously added dynamic property. Removes related component's property & observer.

Parameters:

  • propertyName String
    Name of dynamic property that must be removed.

_visibleDidChange

() private

Observes 'visible' property. Shows dialog if property is true, otherwise hides dialog.

attachEventHandler

(
  • options
)
Attaches event handler for a given event-target. Also remembers attached handlers and related event-targets for clean up logic which will be executed before component will be destroyed, so use this method instead of explicit calls to [jQuery.on method](http://api.jquery.com/on/) to avoid possible memory leaks.

Parameters:

closeModalDialog

()
Close current modal window if it exists.

createdModalDialog

(
  • modalDialog
)
Handles create modal window action. It saves created window to have opportunity to close it later.

Parameters:

  • modalDialog JQuery
    Created modal window.

detachAllEventHandlers

()
Detaches all event-handlers remembered in metadata when event-handlers were attached through {{#crossLink "DomActionsMixin/attachEventHandler:method"}}'attachEventHandler' method {{/crossLink}}.

detachEventHandler

(
  • options
)
Detaches event-handler from a given event-target. Also cleans up metadata remembered when event-handler was attached through {{#crossLink "DomActionsMixin/attachEventHandler:method"}}'attachEventHandler' method {{/crossLink}}.

Parameters:

send

(
  • actionName
  • args
)
Any
Overridden ['send' method](https://github.com/emberjs/ember.js/blob/v2.7.0/packages/ember-runtime/lib/mixins/action_handler.js#L145). Method logic still the same, but method now returns value returned by the action handler. `

Parameters:

  • actionName String
    Name of the action that must be triggered.
  • args
    Arguments that must be passed to action.

Returns:

Any: Returns value returned by action handler.

sendingActions.approve

()

Component's action invoking when dialog is approved.

sendingActions.beforeHide

()

Component's action invoking when dialog starts to hide.

sendingActions.beforeShow

()

Component's action invoking when dialog starts to show.

sendingActions.deny

()

Component's action invoking when dialog is denied.

sendingActions.hide

()

Component's action invoking when dialog is hidden.

sendingActions.show

()

Component's action invoking when dialog is shown.

Properties

_availableDomEvents

Object private
Dictionary containing names of DOM-events available for component's wrapping DOM-element and component's actions names related to them.

_componentWrapperIsAvailable

Boolean private
Flag: indicates whether component's wrapper DOM-element is available for select now.

_dialog

jQuery-object private

Selected from DOM dialog block.

_dynamicActions

Object private
Component's dynamic actions from {{#crossLink "DynamicActionsMixin:dynamicActions:property"}}'dynamicActions' property{{/crossLink}}, mapped from array into flat [JSON-object](http://www.json.org/).

_dynamicPropertiesMetadata

Object[] private
Array with objects containing names of already assigned {{#crossLink "DynamicPropertiesMixin:dynamicProperties:property"}}dynamic properties{{/crossLink}} and observer handlers related to them. Each object in array has following structure: { propertyName: '...', propertyObserverHandler: function() { ... } }.

Default: null

_eventsMetadata

Object[] private
Array with objects containing selected event targets & handlers attached to them. Each object in array has following structure: { eventTarget: ..., attachedEventHandlers: { click: [function() {}, function() {}, ...], dblclick: [function() {}, function() {}, ...], ... } }.

Default: null

_openedModalDialog

JQuery
Current opened modal window.

Default: undefined

_requiredActions

String[]
Component's required actions names. For actions enumerated in this array an assertion exceptions will be thrown, if actions handlers are not defined for them.

Default: null

allowMultiple

Boolean

Flag: indicates whether multiple dialogs are allowed at the same time.

Default: false

allowMultiple

Boolean

Flag: indicates whether dialog is closable (can be closed on it's dimmer click).

Default: false

approveButtonCaption

String

Component's approve button caption.

Default: t('components.flexberry-dialog.approve-button.caption')

caption

String

Component's caption.

Default: null

classNames

String[]

Component's wrapping

CSS-classes names.

Any other CSS-classes can be added through component's 'class' property.

{{flexberry-dialog class="large" approve=(action "onDialogApprove")}}
                    

Default: ['flexberry-dialog', 'ui', 'modal']

content

String

Component's content.

Default: null

contentClass

String

Component's content CSS-class.

Default: null

denyButtonCaption

String

Component's deny button caption.

Default: t('components.flexberry-dialog.deny-button.caption')

duration

String

Component's transition animation name.

Default: 'scale'

duration

Number

Component's animation duration (in milliseconds).

Default: 200

dynamicActions

DynamicActionObject[]
Component's dynamic actions. If component consumes it's inner structure as [JSON-object](http://www.json.org/) or [Ember-object](https://emberjs.com/api/ember/release/classes/EmberObject) and there is no way to attach action handlers explicitly in hbs-markup, then you can define {{#crossLink "DynamicActionObject"}}dynamic actions{{/crossLink}} somewhere in code & pass defined array into this component's property.

Default: null

dynamicProperties

Object
Object containing dynamic properties that must be assigned to component using {{#crossLink "DynamicPropertiesMixin"}}dynamic-properties mixin{{/crossLink}}.

Default: null

flexberryClassNames

Object static

Component's CSS-classes names. JSON-object containing string constants with CSS-classes names related to component's .hbs markup elements.

Sub-properties:

  • prefix String

    Component's CSS-class names prefix ('flexberry-dialog').

  • wrapper String

    Component's wrapping

    CSS-class name ('flexberry-dialog').

  • header String

    Component's header block CSS-class name ('flexberry-dialog-header').

  • content String

    Component's content block CSS-class name ('flexberry-dialog-content').

  • toolbar String

    Component's toolbar block CSS-class name ('flexberry-dialog-toolbar').

  • approveButton String

    Component's approve button CSS-class name ('flexberry-dialog-approve-button').

  • cancelButton String

    Component's cancel button CSS-class name ('flexberry-dialog-cancel-button').

  • closeButton String

    Component's close button CSS-class name ('flexberry-dialog-close-button').

isTagless

Boolean
Flag: indicates whether component is tagless or not (has empty [tagName](https://emberjs.com/api/ember/release/classes/Component#property_tagName) or not).

offset

Number

Component's vertical offset to allow for content outside of dialog, for example a close button, to be centered.

Default: 0

visible

Boolean

Flag: indicates whether dialog is visible or not. If true, then dialog will be shown, otherwise dialog will be closed.

Default: false