Sha256: fdedc56f0113ac0fe818b3186d1ad9e3899328a4935868befe5093ca03e53328

Contents?: true

Size: 521 Bytes

Versions: 3

Compression:

Stored size: 521 Bytes

Contents

Dust.gallery.PhotoView = Backbone.View.extend({

  className: 'index-item photo-teaser'

  initialize: (options)->
    @model = options.model
    @model.bind('destroy', @remove, @)
    @model.bind('change', @spinnerInit, @)

  render: (template='#photo-template')->
    self = @
    template = Handlebars.compile($(template).html())
    @.$el.html template(self.model.attributes)
    @.$el.attr('data-id', @model.get('id'))
    $('.photos').append @el
    @el

  spinnerInit: ()->
    Dust.spinner.spin($('body')[0])

})

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dust-cms-0.0.07 app/assets/javascripts/cms/dust/gallery/photo_view.js.coffee
dust-cms-0.0.06 app/assets/javascripts/cms/dust/gallery/photo_view.js.coffee
dust-cms-0.0.05 app/assets/javascripts/cms/dust/gallery/photo_view.js.coffee