Sha256: 239f91f1a90c063badac665dc071865508d46184791e8e01d82698b5c912e31a

Contents?: true

Size: 456 Bytes

Versions: 38

Compression:

Stored size: 456 Bytes

Contents

class Tenon.features.AssetDetachment
  constructor: ->
    $(document).on('click', '.remove-asset', @_removeAsset)

  _removeAsset: (e) =>
    e.preventDefault()
    e.stopPropagation()
    @$assetField = $(e.currentTarget).closest('.asset-field')
    @$assetField.find('.asset-id-field').removeAttr('value')
    @$assetField.find('.thumbnail img').attr('src', '/assets/tenon/thumb-doc.png')
    @$assetField.find('.asset-info').html('No asset selected.')

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
tenon-1.0.46 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.45 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.44 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.43 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.42 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.41 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.40 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.39 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.38 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.37 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.36 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.35 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.33 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.32 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.31 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.30 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.29 app/assets/javascripts/tenon/features/asset_detachment.js.coffee
tenon-1.0.28 app/assets/javascripts/tenon/features/asset_detachment.js.coffee