fat_free_crm 0.13.2 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fat_free_crm might be problematic. Click here for more details.
- checksums.yaml +5 -13
- data/.travis.yml +3 -3
- data/Gemfile +5 -2
- data/Gemfile.lock +137 -119
- data/MIT-LICENSE +1 -1
- data/README.md +5 -3
- data/app/assets/javascripts/admin/fields.js.coffee +31 -8
- data/app/assets/javascripts/application.js.erb +6 -10
- data/app/assets/javascripts/crm.js.coffee +426 -0
- data/app/assets/javascripts/crm_chosen.js.coffee +19 -38
- data/app/assets/javascripts/crm_classes.js.coffee +215 -0
- data/app/assets/javascripts/crm_comments.js.coffee +20 -58
- data/app/assets/javascripts/crm_loginout.js.coffee +27 -0
- data/app/assets/javascripts/crm_select2.js.coffee +29 -0
- data/app/assets/javascripts/crm_sortable.js.coffee +32 -0
- data/app/assets/javascripts/crm_tags.js.coffee +22 -0
- data/app/assets/javascripts/crm_textarea_autocomplete.js.coffee +33 -0
- data/app/assets/javascripts/datepicker.js.coffee +2 -2
- data/app/assets/javascripts/format_buttons.js.coffee +23 -24
- data/app/assets/javascripts/lists.js.coffee +45 -76
- data/app/assets/javascripts/pagination.js.coffee +16 -0
- data/app/assets/javascripts/search.js.coffee +6 -22
- data/app/assets/javascripts/timeago.js.coffee +21 -0
- data/app/assets/stylesheets/application.css.erb +0 -1
- data/app/assets/stylesheets/common.scss +36 -29
- data/app/assets/stylesheets/lists.css.scss +17 -3
- data/app/controllers/admin/groups_controller.rb +2 -1
- data/app/controllers/application_controller.rb +5 -5
- data/app/controllers/entities/accounts_controller.rb +1 -1
- data/app/controllers/entities/campaigns_controller.rb +1 -1
- data/app/controllers/entities/contacts_controller.rb +1 -1
- data/app/controllers/entities/leads_controller.rb +1 -1
- data/app/controllers/entities/opportunities_controller.rb +1 -1
- data/app/controllers/home_controller.rb +10 -7
- data/app/controllers/tasks_controller.rb +15 -0
- data/app/controllers/users_controller.rb +6 -4
- data/app/helpers/accounts_helper.rb +8 -5
- data/app/helpers/application_helper.rb +53 -39
- data/app/helpers/campaigns_helper.rb +1 -0
- data/app/helpers/leads_helper.rb +3 -3
- data/app/helpers/opportunities_helper.rb +15 -0
- data/app/helpers/remote_link_pagination_helper.rb +8 -0
- data/app/helpers/tags_helper.rb +2 -2
- data/app/helpers/tasks_helper.rb +22 -15
- data/app/helpers/users_helper.rb +3 -2
- data/app/mailers/user_mailer.rb +9 -3
- data/app/models/entities/account_contact.rb +1 -1
- data/app/models/fields/custom_field.rb +1 -1
- data/app/models/list.rb +1 -0
- data/app/models/observers/entity_observer.rb +10 -1
- data/app/models/observers/lead_observer.rb +2 -0
- data/app/models/observers/opportunity_observer.rb +2 -0
- data/app/models/observers/task_observer.rb +2 -0
- data/app/models/polymorphic/avatar.rb +2 -0
- data/app/models/polymorphic/comment.rb +0 -1
- data/app/models/polymorphic/task.rb +41 -9
- data/app/models/users/ability.rb +1 -0
- data/app/models/users/group.rb +0 -5
- data/app/models/users/user.rb +0 -7
- data/app/views/accounts/_edit.html.haml +1 -0
- data/app/views/accounts/_index_brief.html.haml +2 -2
- data/app/views/accounts/_index_long.html.haml +2 -2
- data/app/views/accounts/_new.html.haml +1 -0
- data/app/views/accounts/_sidebar_index.html.haml +1 -1
- data/app/views/accounts/_sidebar_show.html.haml +1 -1
- data/app/views/accounts/_top_section.html.haml +1 -1
- data/app/views/accounts/create.js.haml +9 -9
- data/app/views/accounts/destroy.js.haml +2 -2
- data/app/views/accounts/edit.js.haml +5 -5
- data/app/views/accounts/index.js.haml +5 -5
- data/app/views/accounts/new.js.haml +1 -1
- data/app/views/accounts/show.html.haml +1 -1
- data/app/views/accounts/show.js.haml +1 -1
- data/app/views/accounts/update.js.haml +7 -5
- data/app/views/admin/field_groups/_field_group.html.haml +4 -5
- data/app/views/admin/field_groups/confirm.js.haml +2 -2
- data/app/views/admin/field_groups/create.js.haml +6 -12
- data/app/views/admin/field_groups/destroy.js.haml +3 -3
- data/app/views/admin/field_groups/edit.js.haml +1 -1
- data/app/views/admin/field_groups/new.js.haml +1 -1
- data/app/views/admin/field_groups/update.js.haml +2 -2
- data/app/views/admin/fields/_field.html.haml +1 -1
- data/app/views/admin/fields/_sort_by.html.haml +3 -3
- data/app/views/admin/fields/create.js.haml +9 -9
- data/app/views/admin/fields/destroy.js.haml +4 -4
- data/app/views/admin/fields/edit.js.haml +2 -2
- data/app/views/admin/fields/index.html.haml +1 -8
- data/app/views/admin/fields/show.html.haml +1 -1
- data/app/views/admin/fields/update.js.haml +8 -8
- data/app/views/admin/groups/_form.html.haml +1 -3
- data/app/views/admin/groups/create.js.haml +8 -8
- data/app/views/admin/groups/destroy.js.haml +3 -3
- data/app/views/admin/groups/edit.js.haml +3 -3
- data/app/views/admin/groups/index.js.haml +2 -2
- data/app/views/admin/groups/new.js.haml +2 -2
- data/app/views/admin/groups/update.js.haml +5 -5
- data/app/views/admin/tags/confirm.js.haml +2 -2
- data/app/views/admin/tags/create.js.haml +8 -8
- data/app/views/admin/tags/destroy.js.haml +3 -3
- data/app/views/admin/tags/edit.js.haml +4 -4
- data/app/views/admin/tags/new.js.haml +1 -1
- data/app/views/admin/tags/update.js.haml +5 -5
- data/app/views/admin/users/_profile.html.haml +3 -4
- data/app/views/admin/users/confirm.js.haml +2 -2
- data/app/views/admin/users/create.js.haml +8 -8
- data/app/views/admin/users/destroy.js.haml +3 -3
- data/app/views/admin/users/edit.js.haml +4 -4
- data/app/views/admin/users/index.js.haml +2 -2
- data/app/views/admin/users/new.js.haml +2 -2
- data/app/views/admin/users/reactivate.js.haml +2 -2
- data/app/views/admin/users/suspend.js.haml +2 -2
- data/app/views/admin/users/update.js.haml +5 -5
- data/app/views/campaigns/_edit.html.haml +1 -0
- data/app/views/campaigns/_index_brief.html.haml +1 -1
- data/app/views/campaigns/_index_long.html.haml +1 -1
- data/app/views/campaigns/_new.html.haml +1 -0
- data/app/views/campaigns/_sidebar_index.html.haml +1 -1
- data/app/views/campaigns/_sidebar_show.html.haml +1 -1
- data/app/views/campaigns/_status.html.haml +1 -1
- data/app/views/campaigns/_top_section.html.haml +1 -1
- data/app/views/campaigns/create.js.haml +10 -10
- data/app/views/campaigns/destroy.js.haml +2 -2
- data/app/views/campaigns/edit.js.haml +6 -6
- data/app/views/campaigns/index.js.haml +5 -5
- data/app/views/campaigns/new.js.haml +1 -1
- data/app/views/campaigns/show.html.haml +1 -1
- data/app/views/campaigns/show.js.haml +1 -1
- data/app/views/campaigns/update.js.haml +8 -6
- data/app/views/comments/_edit.html.haml +1 -1
- data/app/views/comments/_new.html.haml +1 -1
- data/app/views/comments/create.js.haml +9 -9
- data/app/views/comments/destroy.js.haml +2 -2
- data/app/views/comments/edit.js.haml +3 -3
- data/app/views/comments/update.js.haml +5 -5
- data/app/views/contacts/_contacts.html.haml +1 -1
- data/app/views/contacts/_edit.html.haml +1 -0
- data/app/views/contacts/_index_brief.html.haml +2 -2
- data/app/views/contacts/_index_full.html.haml +2 -2
- data/app/views/contacts/_index_long.html.haml +2 -2
- data/app/views/contacts/_new.html.haml +1 -0
- data/app/views/contacts/_section_general.html.haml +4 -3
- data/app/views/contacts/_sidebar_show.html.haml +1 -1
- data/app/views/contacts/_top_section.html.haml +1 -1
- data/app/views/contacts/create.js.haml +10 -10
- data/app/views/contacts/destroy.js.haml +3 -3
- data/app/views/contacts/edit.js.haml +5 -5
- data/app/views/contacts/index.js.haml +5 -5
- data/app/views/contacts/new.js.haml +1 -1
- data/app/views/contacts/show.html.haml +1 -1
- data/app/views/contacts/show.js.haml +1 -1
- data/app/views/contacts/update.js.haml +8 -6
- data/app/views/emails/destroy.js.haml +2 -2
- data/app/views/entities/_basic_search.html.haml +15 -12
- data/app/views/entities/_permissions.html.haml +6 -11
- data/app/views/entities/attach.js.haml +3 -3
- data/app/views/entities/contacts.js.haml +2 -2
- data/app/views/entities/discard.js.haml +1 -1
- data/app/views/entities/leads.js.haml +2 -2
- data/app/views/entities/opportunities.js.haml +2 -2
- data/app/views/entities/subscription_update.js.haml +1 -1
- data/app/views/entities/versions.js.haml +2 -2
- data/app/views/fields/group.js.erb +1 -1
- data/app/views/home/_account.html.haml +2 -2
- data/app/views/home/_assets_menu.html.haml +3 -3
- data/app/views/home/_duration_menu.html.haml +3 -3
- data/app/views/home/_events_menu.html.haml +3 -3
- data/app/views/home/_opportunity.html.haml +2 -2
- data/app/views/home/_options.html.haml +0 -1
- data/app/views/home/_users_menu.html.haml +3 -3
- data/app/views/home/index.js.haml +4 -4
- data/app/views/home/options.js.haml +1 -1
- data/app/views/layouts/_about.html.haml +3 -3
- data/app/views/layouts/_footer.html.haml +1 -1
- data/app/views/layouts/_header.html.haml +1 -1
- data/app/views/layouts/_jumpbox.html.haml +23 -21
- data/app/views/layouts/_sidebar.html.haml +1 -2
- data/app/views/layouts/admin/application.html.haml +1 -1
- data/app/views/layouts/application.html.haml +3 -3
- data/app/views/leads/_convert.html.haml +1 -11
- data/app/views/leads/_convert_permissions.html.haml +4 -9
- data/app/views/leads/_edit.html.haml +1 -0
- data/app/views/leads/_index_brief.html.haml +1 -1
- data/app/views/leads/_index_long.html.haml +1 -1
- data/app/views/leads/_leads.html.haml +1 -1
- data/app/views/leads/_new.html.haml +1 -0
- data/app/views/leads/_sidebar_index.html.haml +1 -1
- data/app/views/leads/_sidebar_show.html.haml +1 -1
- data/app/views/leads/_top_section.html.haml +1 -1
- data/app/views/leads/convert.js.haml +5 -5
- data/app/views/leads/create.js.haml +9 -9
- data/app/views/leads/destroy.js.haml +2 -2
- data/app/views/leads/edit.js.haml +5 -5
- data/app/views/leads/index.js.haml +5 -5
- data/app/views/leads/new.js.haml +1 -1
- data/app/views/leads/promote.js.haml +7 -7
- data/app/views/leads/reject.js.haml +2 -2
- data/app/views/leads/show.html.haml +1 -1
- data/app/views/leads/show.js.haml +1 -1
- data/app/views/leads/update.js.haml +9 -7
- data/app/views/lists/_lists.html.haml +6 -0
- data/app/views/lists/_sidebar.html.haml +18 -17
- data/app/views/lists/create.js.haml +6 -7
- data/app/views/lists/destroy.js.haml +1 -1
- data/app/views/opportunities/_edit.html.haml +2 -1
- data/app/views/opportunities/_index_brief.html.haml +1 -1
- data/app/views/opportunities/_index_long.html.haml +1 -1
- data/app/views/opportunities/_new.html.haml +2 -1
- data/app/views/opportunities/_opportunities.html.haml +1 -1
- data/app/views/opportunities/_sidebar_index.html.haml +1 -1
- data/app/views/opportunities/_sidebar_show.html.haml +1 -1
- data/app/views/opportunities/_top_section.html.haml +2 -2
- data/app/views/opportunities/contacts.js.haml +2 -2
- data/app/views/opportunities/create.js.haml +10 -10
- data/app/views/opportunities/destroy.js.haml +3 -3
- data/app/views/opportunities/edit.js.haml +5 -5
- data/app/views/opportunities/index.html.haml +1 -1
- data/app/views/opportunities/index.js.haml +5 -5
- data/app/views/opportunities/new.js.haml +1 -1
- data/app/views/opportunities/show.html.haml +1 -1
- data/app/views/opportunities/show.js.haml +1 -1
- data/app/views/opportunities/update.js.haml +8 -6
- data/app/views/shared/_address.html.haml +1 -1
- data/app/views/shared/_inline_styles.html.haml +1 -1
- data/app/views/shared/_naming.html.haml +3 -3
- data/app/views/shared/_paginate.haml +2 -1
- data/app/views/shared/_paginate_with_per_page.html.haml +10 -12
- data/app/views/shared/_search.html.haml +7 -3
- data/app/views/shared/_select_popup.html.haml +9 -11
- data/app/views/shared/_tags.html.haml +5 -4
- data/app/views/tasks/_completed.html.haml +3 -1
- data/app/views/tasks/_selector.html.haml +1 -1
- data/app/views/tasks/_top_section.html.haml +1 -1
- data/app/views/tasks/complete.js.haml +7 -7
- data/app/views/tasks/create.js.haml +17 -17
- data/app/views/tasks/destroy.js.haml +2 -2
- data/app/views/tasks/discard.js.haml +1 -1
- data/app/views/tasks/edit.js.haml +4 -4
- data/app/views/tasks/filter.js.haml +2 -2
- data/app/views/tasks/new.js.haml +1 -1
- data/app/views/tasks/uncomplete.js.haml +12 -0
- data/app/views/tasks/update.js.haml +4 -4
- data/app/views/users/_avatar.html.haml +1 -1
- data/app/views/users/_languages.html.haml +3 -3
- data/app/views/users/_profile.html.haml +1 -1
- data/app/views/users/avatar.js.haml +1 -1
- data/app/views/users/change_password.js.haml +5 -5
- data/app/views/users/edit.js.haml +1 -1
- data/app/views/users/password.js.haml +2 -2
- data/app/views/users/show.html.haml +1 -1
- data/app/views/users/update.js.haml +5 -5
- data/app/views/users/upload_avatar.js.haml +3 -3
- data/app/views/versions/_versions.html.haml +1 -1
- data/config/application.rb +3 -0
- data/config/environments/production.rb +1 -1
- data/config/environments/staging.rb +58 -13
- data/config/initializers/locale.rb +2 -0
- data/config/locales/cz_fat_free_crm.yml +1 -0
- data/config/locales/de_fat_free_crm.yml +1 -0
- data/config/locales/en-GB_fat_free_crm.yml +1 -0
- data/config/locales/en-US_fat_free_crm.yml +2 -0
- data/config/locales/es_fat_free_crm.yml +1 -0
- data/config/locales/fr-CA_fat_free_crm.yml +1 -0
- data/config/locales/fr_fat_free_crm.yml +1 -0
- data/config/locales/it_fat_free_crm.yml +1 -0
- data/config/locales/ja_fat_free_crm.yml +1 -0
- data/config/locales/pl_fat_free_crm.yml +1 -0
- data/config/locales/pt-BR_fat_free_crm.yml +1 -0
- data/config/locales/ru_fat_free_crm.yml +444 -61
- data/config/locales/sv-SE_fat_free_crm.yml +1 -0
- data/config/locales/th_fat_free_crm.yml +1 -0
- data/config/locales/zh-CN_fat_free_crm.yml +1 -0
- data/config/routes.rb +20 -19
- data/config/settings.default.yml +11 -10
- data/fat_free_crm.gemspec +5 -4
- data/lib/{plugins/country_select/lib/country_select.rb → country_select.rb} +0 -0
- data/lib/fat_free_crm.rb +3 -1
- data/lib/fat_free_crm/engine.rb +2 -4
- data/lib/fat_free_crm/gem_dependencies.rb +1 -1
- data/lib/fat_free_crm/gem_ext.rb +0 -2
- data/lib/fat_free_crm/permissions.rb +2 -3
- data/lib/fat_free_crm/version.rb +1 -1
- data/lib/{plugins/gravatar_image_tag/lib/gravatar_image_tag.rb → gravatar_image_tag.rb} +0 -0
- data/lib/tasks/ffcrm/settings.rake +4 -16
- data/public/favicon.ico +0 -0
- data/spec/controllers/entities/accounts_controller_spec.rb +5 -5
- data/spec/controllers/entities/campaigns_controller_spec.rb +5 -5
- data/spec/controllers/entities/contacts_controller_spec.rb +42 -5
- data/spec/controllers/entities/leads_controller_spec.rb +7 -7
- data/spec/controllers/entities/opportunities_controller_spec.rb +5 -5
- data/spec/controllers/home_controller_spec.rb +3 -3
- data/spec/controllers/tasks_controller_spec.rb +29 -0
- data/spec/factories/shared_factories.rb +1 -3
- data/spec/features/support/selector_helpers.rb +4 -4
- data/spec/helpers/tasks_helper_spec.rb +10 -5
- data/spec/lib/permissions_spec.rb +10 -22
- data/spec/mailers/user_mailer_spec.rb +5 -4
- data/spec/models/observers/entity_observer_spec.rb +13 -8
- data/spec/models/polymorphic/task_spec.rb +111 -32
- data/spec/routing/accounts_routing_spec.rb +1 -1
- data/spec/routing/campaigns_routing_spec.rb +1 -1
- data/spec/routing/contacts_routing_spec.rb +1 -1
- data/spec/routing/leads_routing_spec.rb +1 -1
- data/spec/routing/opportunities_routing_spec.rb +1 -1
- data/spec/shared/controllers.rb +2 -2
- data/spec/spec_helper.rb +1 -0
- data/spec/views/accounts/create.js.haml_spec.rb +3 -3
- data/spec/views/accounts/index.js.haml_spec.rb +4 -4
- data/spec/views/accounts/update.js.haml_spec.rb +5 -5
- data/spec/views/admin/field_groups/create.js.haml_spec.rb +2 -2
- data/spec/views/admin/field_groups/edit.js.haml_spec.rb +1 -1
- data/spec/views/admin/field_groups/new.js.haml_spec.rb +1 -1
- data/spec/views/admin/field_groups/update.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/create.js.haml_spec.rb +2 -2
- data/spec/views/admin/users/destroy.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/edit.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/index.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/new.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/reactivate.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/suspend.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/update.js.haml_spec.rb +3 -3
- data/spec/views/campaigns/create.js.haml_spec.rb +4 -4
- data/spec/views/campaigns/destroy.js.haml_spec.rb +1 -1
- data/spec/views/campaigns/edit.js.haml_spec.rb +4 -4
- data/spec/views/campaigns/index.js.haml_spec.rb +2 -2
- data/spec/views/campaigns/new.js.haml_spec.rb +1 -1
- data/spec/views/campaigns/update.js.haml_spec.rb +7 -7
- data/spec/views/contacts/create.js.haml_spec.rb +4 -4
- data/spec/views/contacts/edit.js.haml_spec.rb +4 -4
- data/spec/views/contacts/index.js.html_spec.rb +2 -2
- data/spec/views/contacts/new.js.haml_spec.rb +2 -2
- data/spec/views/contacts/update.js.haml_spec.rb +11 -11
- data/spec/views/home/index.js.haml_spec.rb +1 -1
- data/spec/views/home/options.js.haml_spec.rb +3 -3
- data/spec/views/leads/convert.js.haml_spec.rb +3 -3
- data/spec/views/leads/create.js.haml_spec.rb +5 -5
- data/spec/views/leads/destroy.js.haml_spec.rb +1 -1
- data/spec/views/leads/edit.js.haml_spec.rb +4 -4
- data/spec/views/leads/index.js.haml_spec.rb +2 -2
- data/spec/views/leads/new.js.haml_spec.rb +1 -1
- data/spec/views/leads/promote.js.haml_spec.rb +13 -13
- data/spec/views/leads/reject.js.haml_spec.rb +6 -6
- data/spec/views/leads/update.js.haml_spec.rb +11 -11
- data/spec/views/opportunities/create.js.haml_spec.rb +4 -4
- data/spec/views/opportunities/destroy.js.haml_spec.rb +1 -1
- data/spec/views/opportunities/edit.js.haml_spec.rb +4 -4
- data/spec/views/opportunities/index.js.haml_spec.rb +2 -2
- data/spec/views/opportunities/update.js.haml_spec.rb +11 -11
- data/spec/views/tasks/complete.js.haml_spec.rb +5 -5
- data/spec/views/tasks/create.js.haml_spec.rb +13 -13
- data/spec/views/tasks/destroy.js.haml_spec.rb +3 -3
- data/spec/views/tasks/edit.js.haml_spec.rb +4 -4
- data/spec/views/tasks/new.js.haml_spec.rb +2 -2
- data/spec/views/tasks/uncomplete.js.haml_spec.rb +44 -0
- data/spec/views/tasks/update.js.haml_spec.rb +17 -17
- data/spec/views/users/avatar.js.haml_spec.rb +1 -1
- data/spec/views/users/change_password.js.haml_spec.rb +4 -4
- data/spec/views/users/edit.js.haml_spec.rb +1 -1
- data/spec/views/users/password.js.haml_spec.rb +2 -2
- data/spec/views/users/update.js.haml_spec.rb +5 -5
- data/spec/views/users/upload_avatar.js.haml_spec.rb +2 -2
- data/vendor/assets/javascripts/ajax-chosen.jquery.coffee +166 -76
- data/vendor/assets/javascripts/chosen.jquery.coffee +2 -2
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery-ui-timepicker-pt-BR.js +22 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/{jquery-ui-timepicker-sv.js → jquery-ui-timepicker-sv-SE.js} +0 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery-ui-timepicker-th.js +19 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery.ui.datepicker-fr-CA.js +21 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery.ui.datepicker-pt.js +21 -0
- data/vendor/assets/javascripts/rating.js +2 -2
- metadata +101 -122
- data/app/assets/images/facebook-close.gif +0 -0
- data/app/assets/javascripts/crm.js +0 -495
- data/app/assets/javascripts/crm_classes.js +0 -218
- data/app/assets/javascripts/crm_fields.js +0 -34
- data/app/assets/javascripts/crm_loginout.js +0 -29
- data/app/assets/javascripts/crm_textarea_autocomplete.js +0 -32
- data/app/assets/javascripts/groups.js.coffee +0 -8
- data/app/assets/javascripts/jquery-noconflict.js +0 -6
- data/app/assets/javascripts/timeago.js +0 -17
- data/app/views/lists/_personal_sidebar.html.haml +0 -28
- data/lib/fat_free_crm/gem_ext/active_model/serializers/xml/serializer/attribute.rb +0 -17
- data/lib/fat_free_crm/gem_ext/authlogic/session/cookies.rb +0 -16
- data/lib/fat_free_crm/plugin_dependencies.rb +0 -12
- data/lib/plugins/country_select/MIT-LICENSE +0 -20
- data/lib/plugins/country_select/README +0 -14
- data/lib/plugins/country_select/init.rb +0 -1
- data/lib/plugins/country_select/install.rb +0 -2
- data/lib/plugins/country_select/uninstall.rb +0 -2
- data/lib/plugins/gravatar_image_tag/Gemfile +0 -8
- data/lib/plugins/gravatar_image_tag/README.textile +0 -108
- data/lib/plugins/gravatar_image_tag/ROADMAP.textile +0 -33
- data/lib/plugins/gravatar_image_tag/Rakefile +0 -50
- data/lib/plugins/gravatar_image_tag/VERSION +0 -1
- data/lib/plugins/gravatar_image_tag/gravatar_image_tag.gemspec +0 -45
- data/lib/plugins/gravatar_image_tag/init.rb +0 -2
- data/lib/plugins/gravatar_image_tag/spec/gravatar_image_tag_spec.rb +0 -83
- data/lib/plugins/gravatar_image_tag/spec/test_helper.rb +0 -12
- data/lib/tasks/db/migrate.rake +0 -66
- data/lib/tasks/db/schema.rake +0 -20
- data/vendor/assets/javascripts/ajax-chosen-prototype.js +0 -2
- data/vendor/assets/javascripts/ajax-chosen.proto.coffee +0 -98
- data/vendor/assets/javascripts/chosen-prototype.js +0 -3
- data/vendor/assets/javascripts/chosen.proto.coffee +0 -580
- data/vendor/assets/javascripts/event.simulate.js +0 -64
- data/vendor/assets/javascripts/facebooklist.js +0 -548
- data/vendor/assets/javascripts/facebooklist.simulate.js +0 -28
- data/vendor/assets/javascripts/modalbox.js +0 -506
- data/vendor/assets/stylesheets/facebooklist.css +0 -47
Binary file
|
@@ -1,495 +0,0 @@
|
|
1
|
-
// Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
2
|
-
//
|
3
|
-
// Fat Free CRM is freely distributable under the terms of MIT license.
|
4
|
-
// See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
5
|
-
//------------------------------------------------------------------------------
|
6
|
-
var crm = {
|
7
|
-
|
8
|
-
EXPANDED : "▼",
|
9
|
-
COLLAPSED : "►",
|
10
|
-
searchRequest : null,
|
11
|
-
autocompleter : null,
|
12
|
-
base_url : "",
|
13
|
-
language : 'en-US',
|
14
|
-
|
15
|
-
//----------------------------------------------------------------------------
|
16
|
-
find_form: function(class_name) {
|
17
|
-
var forms = $$('form.' + class_name);
|
18
|
-
return (forms.length > 0 ? forms[0].id : null);
|
19
|
-
},
|
20
|
-
|
21
|
-
//----------------------------------------------------------------------------
|
22
|
-
search_tagged: function(query, controller) {
|
23
|
-
if ($('query')) {
|
24
|
-
$('query').value = query;
|
25
|
-
}
|
26
|
-
crm.search(query, controller);
|
27
|
-
},
|
28
|
-
|
29
|
-
/*
|
30
|
-
* remove any duplicate 'facebook-list' elements before running the 'BlindUp' effect.
|
31
|
-
* (The disappearing facebook-list takes precedence over the newly created facebook-list
|
32
|
-
* that is being AJAX loaded, and messes up the initialization.. )
|
33
|
-
*/
|
34
|
-
hide_form: function(id) {
|
35
|
-
if($('facebook-list')) $('facebook-list').remove();
|
36
|
-
var arrow = $(id + "_arrow") || $("arrow");
|
37
|
-
if (arrow) arrow.update(this.COLLAPSED);
|
38
|
-
$(id).hide().update("").setStyle({height: 'auto'});
|
39
|
-
},
|
40
|
-
|
41
|
-
//----------------------------------------------------------------------------
|
42
|
-
show_form: function(id) {
|
43
|
-
var arrow = $(id + "_arrow") || $("arrow");
|
44
|
-
if (arrow) arrow.update(this.EXPANDED);
|
45
|
-
Effect.BlindDown(id, { duration: 0.25, afterFinish: function() {
|
46
|
-
var input = $(id).down("input[type=text]");
|
47
|
-
if (input) input.focus();
|
48
|
-
}
|
49
|
-
});
|
50
|
-
},
|
51
|
-
|
52
|
-
//----------------------------------------------------------------------------
|
53
|
-
flip_form: function(id) {
|
54
|
-
if ($(id)) {
|
55
|
-
if (Element.visible(id)) {
|
56
|
-
this.hide_form(id);
|
57
|
-
} else {
|
58
|
-
this.show_form(id);
|
59
|
-
}
|
60
|
-
}
|
61
|
-
},
|
62
|
-
|
63
|
-
//----------------------------------------------------------------------------
|
64
|
-
set_title: function(id, caption) {
|
65
|
-
var title = $(id + "_title") || $("title");
|
66
|
-
if (typeof(caption) == "undefined") {
|
67
|
-
var words = id.split("_");
|
68
|
-
if (words.length == 1) {
|
69
|
-
caption = id.capitalize();
|
70
|
-
} else {
|
71
|
-
caption = words[0].capitalize() + " " + words[1].capitalize();
|
72
|
-
}
|
73
|
-
}
|
74
|
-
title.update(caption);
|
75
|
-
},
|
76
|
-
|
77
|
-
//----------------------------------------------------------------------------
|
78
|
-
highlight_off: function(id) {
|
79
|
-
$(id).onmouseover = $(id).onmouseout = null;
|
80
|
-
$(id).style.background = "white";
|
81
|
-
},
|
82
|
-
|
83
|
-
//----------------------------------------------------------------------------
|
84
|
-
focus_on_first_field: function() {
|
85
|
-
if ($$("form") != "") {
|
86
|
-
var first_element = $$("form")[0].findFirstElement();
|
87
|
-
if (first_element) {
|
88
|
-
first_element.focus();
|
89
|
-
first_element.value = first_element.value;
|
90
|
-
}
|
91
|
-
} else if ($("query")) {
|
92
|
-
$("query").focus();
|
93
|
-
}
|
94
|
-
},
|
95
|
-
|
96
|
-
// Hide accounts dropdown and show create new account edit field instead.
|
97
|
-
//----------------------------------------------------------------------------
|
98
|
-
create_account: function(and_focus) {
|
99
|
-
crm.ensure_chosen_account();
|
100
|
-
$("account_disabled_title").hide();
|
101
|
-
$("account_select_title").hide();
|
102
|
-
$("account_create_title").show();
|
103
|
-
$("account_id_chzn").hide();
|
104
|
-
$("account_id").disable();
|
105
|
-
$("account_name").enable();
|
106
|
-
$("account_name").clear();
|
107
|
-
$("account_name").show();
|
108
|
-
if (and_focus) {
|
109
|
-
$("account_name").focus();
|
110
|
-
}
|
111
|
-
},
|
112
|
-
|
113
|
-
// Hide create account edit field and show accounts dropdown instead.
|
114
|
-
//----------------------------------------------------------------------------
|
115
|
-
select_account: function(and_focus) {
|
116
|
-
crm.ensure_chosen_account();
|
117
|
-
$("account_disabled_title").hide();
|
118
|
-
$("account_create_title").hide();
|
119
|
-
$("account_select_title").show();
|
120
|
-
$("account_name").hide();
|
121
|
-
$("account_name").disable();
|
122
|
-
$("account_id").enable();
|
123
|
-
$("account_id_chzn").show();
|
124
|
-
},
|
125
|
-
|
126
|
-
// Show accounts dropdown and disable it to prevent changing the account.
|
127
|
-
//----------------------------------------------------------------------------
|
128
|
-
select_existing_account: function() {
|
129
|
-
crm.ensure_chosen_account();
|
130
|
-
$("account_create_title").hide();
|
131
|
-
$("account_select_title").hide();
|
132
|
-
$("account_disabled_title").show();
|
133
|
-
$("account_name").hide();
|
134
|
-
$("account_name").disable();
|
135
|
-
// Disable chosen account select
|
136
|
-
$("account_id").disable();
|
137
|
-
Event.fire($("account_id"), "liszt:updated");
|
138
|
-
$("account_id_chzn").show();
|
139
|
-
// Enable hidden account id select so that value is POSTed
|
140
|
-
$("account_id").enable();
|
141
|
-
},
|
142
|
-
|
143
|
-
//----------------------------------------------------------------------------
|
144
|
-
create_or_select_account: function(selector) {
|
145
|
-
if (selector !== true && selector > 0) {
|
146
|
-
this.select_existing_account(); // disabled accounts dropdown
|
147
|
-
} else if (selector) {
|
148
|
-
this.create_account(); // create account edit field
|
149
|
-
} else {
|
150
|
-
this.select_account(); // accounts dropdown
|
151
|
-
}
|
152
|
-
},
|
153
|
-
|
154
|
-
//----------------------------------------------------------------------------
|
155
|
-
create_contact: function() {
|
156
|
-
if ($("contact_business_address_attributes_country")) {
|
157
|
-
this.clear_all_hints();
|
158
|
-
}
|
159
|
-
$("account_assigned_to").value = $F("contact_assigned_to");
|
160
|
-
if ($("account_id").visible()) {
|
161
|
-
$("account_id").enable();
|
162
|
-
}
|
163
|
-
},
|
164
|
-
|
165
|
-
//----------------------------------------------------------------------------
|
166
|
-
save_contact: function() {
|
167
|
-
if ($("contact_business_address_attributes_country")) {
|
168
|
-
this.clear_all_hints();
|
169
|
-
}
|
170
|
-
$("account_assigned_to").value = $F("contact_assigned_to");
|
171
|
-
},
|
172
|
-
|
173
|
-
//----------------------------------------------------------------------------
|
174
|
-
flip_calendar: function(value) {
|
175
|
-
if (value == "specific_time") {
|
176
|
-
$("task_bucket").toggle(); // Hide dropdown.
|
177
|
-
$("task_calendar").toggle(); // Show editable date field.
|
178
|
-
$("task_calendar").focus(); // Focus to invoke calendar popup.
|
179
|
-
}
|
180
|
-
},
|
181
|
-
|
182
|
-
//----------------------------------------------------------------------------
|
183
|
-
flip_campaign_permissions: function(value) {
|
184
|
-
if (value) {
|
185
|
-
$("lead_access_campaign").enable();
|
186
|
-
$("lead_access_campaign").checked = 1;
|
187
|
-
$("copy_permissions").style.color = "#3f3f3f";
|
188
|
-
} else {
|
189
|
-
$("lead_access_campaign").disable();
|
190
|
-
$("copy_permissions").style.color = "grey";
|
191
|
-
$("lead_access_private").checked = 1;
|
192
|
-
}
|
193
|
-
},
|
194
|
-
|
195
|
-
//----------------------------------------------------------------------------
|
196
|
-
flip_subtitle: function(el) {
|
197
|
-
var arrow = Element.down(el, "small");
|
198
|
-
var intro = Element.down(Element.next(Element.up(el)), "small");
|
199
|
-
// Optionally, the intro might be next to the link.
|
200
|
-
if(!intro){ intro = Element.next(el, "small");};
|
201
|
-
var section = Element.down(Element.next(Element.up(el)), "div");
|
202
|
-
|
203
|
-
if (Element.visible(section)) {
|
204
|
-
arrow.update(this.COLLAPSED);
|
205
|
-
Effect.toggle(section, 'slide', { duration: 0.25, afterFinish: function() { intro.toggle(); } });
|
206
|
-
} else {
|
207
|
-
arrow.update(this.EXPANDED);
|
208
|
-
Effect.toggle(section, 'slide', { duration: 0.25, beforeStart: function() { intro.toggle(); } });
|
209
|
-
}
|
210
|
-
},
|
211
|
-
|
212
|
-
//----------------------------------------------------------------------------
|
213
|
-
flip_note_or_email: function(link, more, less) {
|
214
|
-
var body, state;
|
215
|
-
|
216
|
-
if (link.innerHTML == more) {
|
217
|
-
body = Element.next(Element.up(link));
|
218
|
-
body.hide();
|
219
|
-
$(body.id.replace('truncated', 'formatted')).show(); // expand
|
220
|
-
link.innerHTML = less;
|
221
|
-
state = "Expanded";
|
222
|
-
} else {
|
223
|
-
body = Element.next(Element.next(Element.up(link)));
|
224
|
-
body.hide();
|
225
|
-
$(body.id.replace('formatted', 'truncated')).show(); // collapse
|
226
|
-
link.innerHTML = more;
|
227
|
-
state = "Collapsed";
|
228
|
-
}
|
229
|
-
// Ex: "formatted_email_42" => [ "formatted", "email", "42" ]
|
230
|
-
var arr = body.id.split("_");
|
231
|
-
|
232
|
-
new Ajax.Request(this.base_url + "/home/timeline", {
|
233
|
-
method : "get",
|
234
|
-
parameters : { type : arr[1], id : arr[2], state : state }
|
235
|
-
});
|
236
|
-
},
|
237
|
-
|
238
|
-
//----------------------------------------------------------------------------
|
239
|
-
flip_notes_and_emails: function(state, more, less, el_prefix) {
|
240
|
-
if(!el_prefix){
|
241
|
-
var notes_field = "shown_notes";
|
242
|
-
var emails_field = "shown_emails";
|
243
|
-
var comment_new_field = "comment_new";
|
244
|
-
} else {
|
245
|
-
var notes_field = el_prefix + "_shown_notes";
|
246
|
-
var emails_field = el_prefix + "_shown_emails";
|
247
|
-
var comment_new_field = el_prefix + "_comment_new";
|
248
|
-
};
|
249
|
-
|
250
|
-
var notes = $(notes_field).value;
|
251
|
-
var emails = $(emails_field).value;
|
252
|
-
|
253
|
-
if (notes != "" || emails != "") {
|
254
|
-
new Ajax.Request(this.base_url + "/home/timeline", {
|
255
|
-
method : "get",
|
256
|
-
parameters : { type : "", id : notes + "+" + emails, state : state },
|
257
|
-
onComplete : function() {
|
258
|
-
$(comment_new_field).adjacent("li").each( function(li) {
|
259
|
-
var a = li.select("tt a.toggle")[0];
|
260
|
-
var dt = li.select("dt");
|
261
|
-
if (typeof(a) != "undefined") {
|
262
|
-
if (state == "Expanded") {
|
263
|
-
dt[0].hide(); dt[1].show();
|
264
|
-
if (a.innerHTML != less) {
|
265
|
-
a.innerHTML = less;
|
266
|
-
}
|
267
|
-
} else {
|
268
|
-
dt[1].hide(); dt[0].show();
|
269
|
-
if (a.innerHTML != more) {
|
270
|
-
a.innerHTML = more;
|
271
|
-
}
|
272
|
-
}
|
273
|
-
}
|
274
|
-
}) // each(li)
|
275
|
-
}.bind(this) // onComplete
|
276
|
-
});
|
277
|
-
}
|
278
|
-
},
|
279
|
-
|
280
|
-
//----------------------------------------------------------------------------
|
281
|
-
reschedule_task: function(id, bucket) {
|
282
|
-
$("task_bucket").value = bucket;
|
283
|
-
$$('#edit_task_' + id + ' input[type="submit"]')[0].click();
|
284
|
-
},
|
285
|
-
|
286
|
-
//----------------------------------------------------------------------------
|
287
|
-
flick: function(element, action) {
|
288
|
-
if ($(element)) {
|
289
|
-
switch(action) {
|
290
|
-
case "show": $(element).show(); break;
|
291
|
-
case "hide": $(element).hide(); break;
|
292
|
-
case "clear": $(element).update(""); break;
|
293
|
-
case "remove": $(element).remove(); break;
|
294
|
-
case "toggle": $(element).toggle(); break;
|
295
|
-
}
|
296
|
-
}
|
297
|
-
},
|
298
|
-
|
299
|
-
//----------------------------------------------------------------------------
|
300
|
-
flash: function(type, sticky) {
|
301
|
-
$("flash").hide();
|
302
|
-
if (type == "warning" || type == "error") {
|
303
|
-
$("flash").className = "flash_warning";
|
304
|
-
} else {
|
305
|
-
$("flash").className = "flash_notice";
|
306
|
-
}
|
307
|
-
Effect.Appear("flash", { duration: 0.5 });
|
308
|
-
if (!sticky) {
|
309
|
-
setTimeout("Effect.Fade('flash')", 3000);
|
310
|
-
}
|
311
|
-
},
|
312
|
-
|
313
|
-
//----------------------------------------------------------------------------
|
314
|
-
// Will be deprecated soon: html5 placeholder replaced it on address fields
|
315
|
-
show_hint: function(el, hint) {
|
316
|
-
if (el.value == '') {
|
317
|
-
el.value = hint;
|
318
|
-
el.style.color = 'silver'
|
319
|
-
el.setAttribute('hint', true);
|
320
|
-
}
|
321
|
-
},
|
322
|
-
|
323
|
-
//----------------------------------------------------------------------------
|
324
|
-
// Will be deprecated soon: html5 placeholder replaced it on address fields
|
325
|
-
hide_hint: function(el, value) {
|
326
|
-
if (arguments.length == 2) {
|
327
|
-
el.value = value;
|
328
|
-
} else {
|
329
|
-
if (el.getAttribute('hint') == "true") {
|
330
|
-
el.value = '';
|
331
|
-
}
|
332
|
-
}
|
333
|
-
el.style.color = 'black'
|
334
|
-
el.setAttribute('hint', false);
|
335
|
-
},
|
336
|
-
|
337
|
-
//----------------------------------------------------------------------------
|
338
|
-
// Will be deprecated soon: html5 placeholder replaced it on address fields
|
339
|
-
clear_all_hints: function() {
|
340
|
-
$$("input[hint=true]").each( function(field) {
|
341
|
-
field.value = '';
|
342
|
-
}.bind(this));
|
343
|
-
},
|
344
|
-
|
345
|
-
//----------------------------------------------------------------------------
|
346
|
-
copy_address: function(from, to) {
|
347
|
-
$(from + "_attributes_full_address").value = $(to + "_attributes_full_address").value;
|
348
|
-
},
|
349
|
-
|
350
|
-
//----------------------------------------------------------------------------
|
351
|
-
copy_compound_address: function(from, to) {
|
352
|
-
$w("street1 street2 city state zipcode").each( function(field) {
|
353
|
-
var source = $(from + "_attributes_" + field);
|
354
|
-
var destination = $(to + "_attributes_" + field);
|
355
|
-
if (source.getAttribute('hint') != "true") {
|
356
|
-
this.hide_hint(destination, source.value);
|
357
|
-
}
|
358
|
-
}.bind(this));
|
359
|
-
|
360
|
-
// Country dropdown needs special treatment ;-)
|
361
|
-
$(to + "_attributes_country").selectedIndex = $(from + "_attributes_country").selectedIndex;
|
362
|
-
// Update Chosen select
|
363
|
-
Event.fire($(to + "_attributes_country"), "liszt:updated");
|
364
|
-
},
|
365
|
-
|
366
|
-
//----------------------------------------------------------------------------
|
367
|
-
|
368
|
-
search: function(query, controller) {
|
369
|
-
var list = controller; // ex. "users"
|
370
|
-
if (list.indexOf("/") >= 0) { // ex. "admin/users"
|
371
|
-
list = list.split("/")[1];
|
372
|
-
}
|
373
|
-
$("loading").show();
|
374
|
-
$(list).setStyle({ opacity: 0.4 });
|
375
|
-
if (this.searchRequest && this.searchRequest.readyState != -4) { this.searchRequest.abort(); }
|
376
|
-
this.searchRequest = jQuery.ajax({
|
377
|
-
url: this.base_url + "/" + controller + '.js',
|
378
|
-
type: 'GET',
|
379
|
-
data: { query : query },
|
380
|
-
success : function() {
|
381
|
-
$("loading").hide();
|
382
|
-
$(list).setStyle({ opacity: 1 });
|
383
|
-
this.searchRequest = null;
|
384
|
-
}
|
385
|
-
});
|
386
|
-
},
|
387
|
-
|
388
|
-
//----------------------------------------------------------------------------
|
389
|
-
jumper: function(controller) {
|
390
|
-
var name = controller.capitalize();
|
391
|
-
$$("#jumpbox_menu a").each(function(link) {
|
392
|
-
if (link.innerHTML == name) {
|
393
|
-
link.addClassName("selected");
|
394
|
-
} else {
|
395
|
-
link.removeClassName("selected");
|
396
|
-
}
|
397
|
-
});
|
398
|
-
this.auto_complete(controller, null, true);
|
399
|
-
},
|
400
|
-
|
401
|
-
//----------------------------------------------------------------------------
|
402
|
-
auto_complete: function(controller, related, focus) {
|
403
|
-
if (this.autocompleter) {
|
404
|
-
Event.stopObserving(this.autocompleter.element);
|
405
|
-
delete this.autocompleter;
|
406
|
-
}
|
407
|
-
this.autocompleter = new Ajax.Autocompleter("auto_complete_query", "auto_complete_dropdown", this.base_url + "/" + controller + "/auto_complete", {
|
408
|
-
frequency: 0.25,
|
409
|
-
parameters: (related) ? ('related=' + related) : null,
|
410
|
-
onShow: function(element, update) {
|
411
|
-
// overridding onShow to include a fix for IE browsers
|
412
|
-
// see https://prototype.lighthouseapp.com/projects/8887/tickets/263-displayinline-fixes-positioning-of-autocomplete-results-div-in-ie8
|
413
|
-
update.style.display = (Prototype.Browser.IE) ? 'inline':'absolute';
|
414
|
-
// below is default onShow from controls.js
|
415
|
-
if(!update.style.position || update.style.position=='absolute') {
|
416
|
-
update.style.position = 'absolute';
|
417
|
-
Position.clone(element, update, {
|
418
|
-
setHeight: false,
|
419
|
-
offsetTop: element.offsetHeight
|
420
|
-
});
|
421
|
-
}
|
422
|
-
Effect.Appear(update,{duration:0.15});
|
423
|
-
},
|
424
|
-
afterUpdateElement: function(text, el) {
|
425
|
-
if (el.id) { // Autocomplete entry found.
|
426
|
-
if (related) { // Attach to related asset.
|
427
|
-
new Ajax.Request(this.base_url + "/" + related + "/attach", {
|
428
|
-
method : "put",
|
429
|
-
parameters : { assets : controller, asset_id : escape(el.id) },
|
430
|
-
onComplete : function() { $("jumpbox").hide(); }
|
431
|
-
});
|
432
|
-
} else { // Quick Find: redirect to asset#show.
|
433
|
-
window.location.href = this.base_url + "/" + controller + "/" + escape(el.id);
|
434
|
-
}
|
435
|
-
} else { // Autocomplete entry not found: refresh current page.
|
436
|
-
$("auto_complete_query").value = "";
|
437
|
-
window.location.href = window.location.href;
|
438
|
-
}
|
439
|
-
}.bind(this) // Binding for this.base_url.
|
440
|
-
});
|
441
|
-
$("auto_complete_dropdown").update("");
|
442
|
-
$("auto_complete_query").value = "";
|
443
|
-
if (focus) {
|
444
|
-
$("auto_complete_query").focus();
|
445
|
-
}
|
446
|
-
}
|
447
|
-
}
|
448
|
-
|
449
|
-
document.observe("dom:loaded", function() {
|
450
|
-
// the element in which we will observe all clicks and capture
|
451
|
-
// ones originating from pagination links
|
452
|
-
var container = $(document.body)
|
453
|
-
|
454
|
-
if (container) {
|
455
|
-
var img = new Image;
|
456
|
-
img.src = crm.base_url + '/assets/loading.gif';
|
457
|
-
|
458
|
-
function createSpinner() {
|
459
|
-
return new Element('img', { src: img.src, 'class': 'spinner' })
|
460
|
-
}
|
461
|
-
|
462
|
-
container.observe('click', function(e) {
|
463
|
-
var el = e.element();
|
464
|
-
if (el.match('.pagination a')) {
|
465
|
-
el.up('.pagination').update(createSpinner());
|
466
|
-
new Ajax.Request(el.href, { method: 'get' });
|
467
|
-
e.stop();
|
468
|
-
}
|
469
|
-
if (el.match('.per_page_options a')) {
|
470
|
-
el.up('.per_page_options').update(createSpinner());
|
471
|
-
new Ajax.Request(el.href, { method: 'post' });
|
472
|
-
e.stop();
|
473
|
-
}
|
474
|
-
});
|
475
|
-
}
|
476
|
-
});
|
477
|
-
|
478
|
-
// Note: observing "dom:loaded" is supposedly faster that "window.onload" since
|
479
|
-
// it will fire immediately after the HTML document is fully loaded, but before
|
480
|
-
// images on the page are fully loaded.
|
481
|
-
|
482
|
-
// Event.observe(window, "load", function() { crm.focus_on_first_field() })
|
483
|
-
document.observe("dom:loaded", function() { crm.focus_on_first_field() });
|
484
|
-
|
485
|
-
// Admin Field Tabs
|
486
|
-
document.on("click", "*[data-tab-class]", function(event, element) {
|
487
|
-
event.stop();
|
488
|
-
|
489
|
-
var klass = element.readAttribute('data-tab-class');
|
490
|
-
$$(".fields").each(function(el){ el.hide(); });
|
491
|
-
$$(".inline_tabs ul li").each(function(el){ el.removeClassName('selected'); });
|
492
|
-
|
493
|
-
$(klass + "_section").show();
|
494
|
-
element.addClassName('selected');
|
495
|
-
});
|