Sha256: 45eff977254b152677f9bc69ad680026a1ddae4a3a9009f57b106a80ca8cc0e0

Contents?: true

Size: 465 Bytes

Versions: 4

Compression:

Stored size: 465 Bytes

Contents

# A single block on the blocks index page.
class @Block extends modularity.Module

  constructor: ->
    super

    # The 'active' switch.
    @active_switch = @$('.switch')


  # Returns the id of this block.
  id: ->
    @container.data('block-id')


  # Returns whether this block is activated.
  active: ->
    @active_switch.bootstrapSwitch('status')


  # Returns the data for this block.
  get_data: ->
    {
      id: @id(),
      active: @active()
    }


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flms-0.9.0 app/assets/javascripts/flms/admin/pages/edit/block.coffee
flms-0.1.0 app/assets/javascripts/flms/admin/pages/edit/block.coffee
flms-0.0.3 app/assets/javascripts/flms/blocks/index/block.coffee
flms-0.0.2 app/assets/javascripts/flms/blocks/index/block.coffee