Sha256: 73608245a91dd621b6abd608e4ef2ddeeef9657bbe5028f768a182065992f8d1

Contents?: true

Size: 829 Bytes

Versions: 13

Compression:

Stored size: 829 Bytes

Contents

- id = dom_id(@tag)

- if params[:cancel].true?     # <----------------- Hide [Edit Tag]
  $('##{id}').replaceWith('#{ j render(partial: "tag", collection: [ @tag ]) }');

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

  - if @previous                                    # Hide open [Edit Tag] form if any.
    - if @previous.is_a?(Tag)                       # Previous tag still exists?
      $('##{dom_id(@previous)}').replaceWith('#{ j render(partial: "tag", collection: [ @previous ]) }');
    - else
      crm.flick('tag_#{@previous}', 'remove');

  -# Disable onMouseOver for the list item.
  -# Hide [Create Tag] form if any.
  -# Show [Edit Tag] form.
  crm.highlight_off('#{id}');
  crm.hide_form('create_tag');
  $('##{id}').html('#{ j render(partial: "edit") }');
  $('#tag_name').focus();

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 app/views/admin/tags/edit.js.haml
fat_free_crm-0.22.0 app/views/admin/tags/edit.js.haml
fat_free_crm-0.21.0 app/views/admin/tags/edit.js.haml
fat_free_crm-0.20.1 app/views/admin/tags/edit.js.haml
fat_free_crm-0.20.0 app/views/admin/tags/edit.js.haml
fat_free_crm-0.19.2 app/views/admin/tags/edit.js.haml
fat_free_crm-0.19.0 app/views/admin/tags/edit.js.haml
fat_free_crm-0.18.2 app/views/admin/tags/edit.js.haml
fat_free_crm-0.17.3 app/views/admin/tags/edit.js.haml
fat_free_crm-0.18.1 app/views/admin/tags/edit.js.haml
fat_free_crm-0.18.0 app/views/admin/tags/edit.js.haml
fat_free_crm-0.17.2 app/views/admin/tags/edit.js.haml
fat_free_crm-0.17.1 app/views/admin/tags/edit.js.haml