Sha256: e601dec256de451f719d084391a9c8feabc4e14eb710fd82f53fec254eaf1e29

Contents?: true

Size: 1.03 KB

Versions: 19

Compression:

Stored size: 1.03 KB

Contents

- id = dom_id(@task)

- if params[:cancel].true?     # <----------------- Hide [Edit Task]

  - partial = (@task.assigned_to && @task.assigned_to != current_user.id) ? "assigned" : "pending"
  $('##{id}').html('#{ j render(:partial => partial, :collection => [ @task ], :locals => { :bucket => @task.bucket }) }');

- else # <----------------------------------------  Show [Edit Task] form.

  -# Hide [Create Task] form if it's open.
  crm.hide_form('create_task');

  -# Hide open [Edit Lead] form if any.
  - if @previous
    - if @previous.is_a?(Task)
      - partial = (@previous.assigned_to && @previous.assigned_to != current_user.id) ? "assigned" : "pending"
      $('##{dom_id(@previous)}').replaceWith('#{ j render(:partial => partial, :collection => [ @previous ], :locals => { :bucket => nil }) }');
    - else
      crm.flick('task_#{@previous}', 'remove');

  -# Disable onMouseOver for the list item.
  crm.highlight_off('#{id}');

  -# Show [Edit Task] form.
  $('##{id}').html('#{ j render(:partial => "edit") }');
  $('#task_name').focus();

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 app/views/tasks/edit.js.haml
fat_free_crm-0.15.2 app/views/tasks/edit.js.haml
fat_free_crm-0.16.4 app/views/tasks/edit.js.haml
fat_free_crm-0.14.1 app/views/tasks/edit.js.haml
fat_free_crm-0.15.1 app/views/tasks/edit.js.haml
fat_free_crm-0.16.3 app/views/tasks/edit.js.haml
fat_free_crm-0.16.2 app/views/tasks/edit.js.haml
fat_free_crm-0.16.1 app/views/tasks/edit.js.haml
fat_free_crm-0.16.0 app/views/tasks/edit.js.haml
fat_free_crm-0.15.0 app/views/tasks/edit.js.haml
fat_free_crm-0.15.0.beta.2 app/views/tasks/edit.js.haml
fat_free_crm-0.15.0.beta app/views/tasks/edit.js.haml
fat_free_crm-0.14.0 app/views/tasks/edit.js.haml
reduced_fat_crm-0.15.0.beta app/views/tasks/edit.js.haml
reduced_fat_crm-0.14.0 app/views/tasks/edit.js.haml
fat_free_crm-0.13.6 app/views/tasks/edit.js.haml
fat_free_crm-0.13.5 app/views/tasks/edit.js.haml
fat_free_crm-0.13.4 app/views/tasks/edit.js.haml
fat_free_crm-0.13.3 app/views/tasks/edit.js.haml