Sha256: 747dab847281f615812e3548fd963ae877176063aaeffa797c8c82d5a946807a

Contents?: true

Size: 682 Bytes

Versions: 5

Compression:

Stored size: 682 Bytes

Contents

- if called_from_index_page? # Completing from pending tasks view -- fade out task partial and update sidebar.

  $('##{dom_id(@task, :tools)}').hide();
  $('##{dom_id(@task)}').fadeOut({ duration:500 });
  - if @empty_bucket
    $('#list_#{@empty_bucket}').fadeOut({ duration:500 });
  = refresh_sidebar(:index)

- else # Completing from the Asset page -- replace task partial with completed one.

  $('##{dom_id(@task)}').hide();
  $('##{dom_id(@task)}').html('#{ j render(partial: "tasks/completed", collection: [ @task ], locals: { bucket: nil }) }');
  $('##{dom_id(@task)}').fadeIn({ duration:500 });
  $('#recently').replaceWith('#{ j render(partial: "shared/recently") }');

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 app/views/tasks/complete.js.haml
fat_free_crm-0.22.0 app/views/tasks/complete.js.haml
fat_free_crm-0.21.0 app/views/tasks/complete.js.haml
fat_free_crm-0.20.1 app/views/tasks/complete.js.haml
fat_free_crm-0.20.0 app/views/tasks/complete.js.haml