Sha256: f96a3606987918ea95927ca81b18e90c0b8236660bd5703bda733b630e3bf2ac

Contents?: true

Size: 846 Bytes

Versions: 9

Compression:

Stored size: 846 Bytes

Contents

id = dom_id(@user)

if params[:cancel].true?     # <----------------- Hide [Edit User]
  page[id].replace :partial => "user", :collection => [ @user ]

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

  if @previous                                    # Hide open [Edit User] form if any.
    if @previous.is_a?(User)                      # Previous user still exists?
      page[dom_id(@previous)].replace :partial => "user", :collection => [ @previous ]
    else
      page.call "crm.flick", "user_#{@previous}", :remove
    end
  end

  page.call "crm.highlight_off", id               # Disable onMouseOver for the list item.
  page.call "crm.hide_form", :create_user         # Hide [Create User] form if any.
  page[id].replace_html :partial => "edit"        # Show [Edit User] form.
  page[:user_username].focus

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fat_free_crm-0.12.3 app/views/admin/users/edit.js.rjs
fat_free_crm-0.12.2 app/views/admin/users/edit.js.rjs
fat_free_crm-0.12.1 app/views/admin/users/edit.js.rjs
fat_free_crm-0.12.0 app/views/admin/users/edit.js.rjs
fat_free_crm-0.11.4 app/views/admin/users/edit.js.rjs
fat_free_crm-0.11.3 app/views/admin/users/edit.js.rjs
fat_free_crm-0.11.2 app/views/admin/users/edit.js.rjs
fat_free_crm-0.11.1 app/views/admin/users/edit.js.rjs
fat_free_crm-0.11.0 app/views/admin/users/edit.js.rjs