APIs

Show:
Module: ember-flexberry

Methods

getProjectionByName

(
  • projectionName
  • modelName
  • store
)
Object

Used for getting projection object by projection name.

Parameters:

Returns:

Object:

Projection by name.

getSizeInUnits

(
  • fileSize
  • fileSizeUnits
)
Number

Used for convert file size value depending on units.

Parameters:

  • fileSize Number

    file size in bytes.

  • fileSizeUnits String

    wanted file size units as 'Bt' 'Kb' 'Mb' 'Gb'.

Returns:

Number:

File size in bytes.

Usage: controllers/my-form.js

  import { getRecord } from 'ember-flexberry/utils/file-size-units-converter'
                      let layer = getSizeInUnits(file.size, 'Mb')
                    
                    

predicateForFilter

(
  • filter
)
BasePredicate | Null

Builds predicate for filter

Parameters:

  • filter Object

    Object ({ name, condition, pattern }) with parameters for filter.

Returns:

BasePredicate | Null:

Predicate to filter through.

Example:

import { predicateForFilter } from 'ember-flexberry/utils/filter'
                    predicateForFilter(filter)
                    

runAfter

(
  • context
  • condition
  • handler
)
private

Runs handler after condition is met.

Parameters:

  • context Any

    The context with which handler and condition functions will be called.

  • condition Function

    The function that must return true for handler to be called.

  • handler Function

    The function to be called when condition returns true.