Sha256: b2b8103ac6b22c82a73171356b2e5952755c16935fe95ca41ba0425844dac8ae

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

Luca.concerns.DevelopmentToolHelpers = 
  refreshCode: ()->
    view = @

    _( @eventHandlerProperties() ).each (prop)->
      view[ prop ] = view.definitionClass()[prop]

    if @autoBindEventHandlers is true
      @bindAllEventHandlers()

    @delegateEvents()

  eventHandlerProperties: ()->
    handlerIds = _( @events ).values()
    _( handlerIds ).select (v)->
      _.isString(v)

  eventHandlerFunctions: ()->
    handlerIds = _( @events ).values()
    _( handlerIds ).map (handlerId)=>
      if _.isFunction(handlerId) then handlerId else @[handlerId]  

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
luca-0.9.8 app/assets/javascripts/luca/concerns/development_tool_helpers.coffee