Sha256: 51cdc60f6bf2fe77cfb33963752fdc833bd73b6f225086c52ad28bde498db786

Contents?: true

Size: 819 Bytes

Versions: 8

Compression:

Stored size: 819 Bytes

Contents

- partial = params[:assets].singularize

- if @attached
  - if partial == "task"
    - if @attachment.completed?
      - view = "completed"
    - elsif @attachment.my?(current_user)
      - view = "pending"
    - else
      - view = "assigned"
    $('#tasks').prepend('#{ j render(partial: "tasks/#{view}", collection: [ @attachment ], locals: { bucket: @attachment.computed_bucket }) }');


  - else
    $('##{h params[:assets]}').prepend('#{ j render(partial: "#{params[:assets]}/#{partial}", collection: [ @attachment ]) }');
    - if called_from_landing_page?(:accounts)
      = refresh_sidebar_for(:accounts, :show, :summary)
    - elsif called_from_landing_page?(:campaigns)
      = refresh_sidebar_for(:campaigns, :show, :summary)

$('##{partial}_#{h params[:asset_id]}').effect("highlight", { duration:1500 });

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fat_free_crm-0.19.2 app/views/entities/attach.js.haml
fat_free_crm-0.19.0 app/views/entities/attach.js.haml
fat_free_crm-0.18.2 app/views/entities/attach.js.haml
fat_free_crm-0.17.3 app/views/entities/attach.js.haml
fat_free_crm-0.18.1 app/views/entities/attach.js.haml
fat_free_crm-0.18.0 app/views/entities/attach.js.haml
fat_free_crm-0.17.2 app/views/entities/attach.js.haml
fat_free_crm-0.17.1 app/views/entities/attach.js.haml