Sha256: decab9dd0e9c29c7e89cfb6301cadf08e32b95aedcd0ce8f19cf018d416c093b

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

#= require 'mixins/storable'
#= require 'mixins/hideable'

class OverlayMe.Overlays.ImagesContainer extends Backbone.View

  id: 'overlay_me_images_container'
  css_attributes_to_save: ['display']

  initialize: ->
    container = $o('#overlay_me_images_container')
    if container.length < 1 # happen only if the container div doesn't already exist
      container = @make 'div', { id: 'overlay_me_images_container' }
      $o('body').append container
      @el = container
    @loadCss()
    $o(window).bind 'overlay_me:toggle_all_display', =>
      @toggleDisplay()

# extending few mixins - thx Derick - http://stackoverflow.com/questions/7853731/proper-way-of-doing-view-mixins-in-backbone
_.extend OverlayMe.Overlays.ImagesContainer.prototype, OverlayMe.Mixin.Storable
_.extend OverlayMe.Overlays.ImagesContainer.prototype, OverlayMe.Mixin.Hideable

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
overlay_me-0.12.1 javascripts/overlays/images_container.js.coffee