fat_free_crm 0.11.0 → 0.11.1

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.

Files changed (212) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +2 -2
  3. data/Gemfile +15 -2
  4. data/Gemfile.lock +34 -14
  5. data/README.md +37 -124
  6. data/app/assets/javascripts/application.js.erb +1 -1
  7. data/app/assets/javascripts/crm.js +22 -1
  8. data/app/assets/javascripts/crm_fields.js +2 -3
  9. data/app/assets/javascripts/jquery-noconflict.js +17 -0
  10. data/app/assets/stylesheets/application.css.erb +1 -0
  11. data/app/assets/stylesheets/common.scss +26 -0
  12. data/app/assets/stylesheets/ffcrm_chosen.scss +1 -1
  13. data/app/controllers/admin/application_controller.rb +1 -1
  14. data/app/controllers/application_controller.rb +0 -8
  15. data/app/controllers/{accounts_controller.rb → entities/accounts_controller.rb} +1 -13
  16. data/app/controllers/{campaigns_controller.rb → entities/campaigns_controller.rb} +1 -13
  17. data/app/controllers/{contacts_controller.rb → entities/contacts_controller.rb} +1 -7
  18. data/app/controllers/{leads_controller.rb → entities/leads_controller.rb} +1 -1
  19. data/app/controllers/{opportunities_controller.rb → entities/opportunities_controller.rb} +1 -7
  20. data/app/controllers/{tasks_controller.rb → entities/tasks_controller.rb} +1 -1
  21. data/app/controllers/{base_controller.rb → entities_controller.rb} +32 -1
  22. data/app/controllers/home_controller.rb +9 -9
  23. data/app/controllers/lists_controller.rb +17 -0
  24. data/app/helpers/admin/tags_helper.rb +1 -1
  25. data/app/helpers/application_helper.rb +14 -14
  26. data/app/helpers/crm_tags_helper.rb +1 -1
  27. data/app/helpers/home_helper.rb +13 -15
  28. data/app/helpers/lists_helper.rb +17 -0
  29. data/app/inputs/date_time_input.rb +17 -0
  30. data/app/inputs/text_input.rb +17 -1
  31. data/app/models/{base → entities}/account.rb +0 -1
  32. data/app/models/{base → entities}/account_contact.rb +0 -0
  33. data/app/models/{base → entities}/account_opportunity.rb +0 -0
  34. data/app/models/{base → entities}/campaign.rb +0 -1
  35. data/app/models/{base → entities}/contact.rb +0 -1
  36. data/app/models/{base → entities}/contact_opportunity.rb +0 -0
  37. data/app/models/{base → entities}/lead.rb +0 -1
  38. data/app/models/{base → entities}/opportunity.rb +0 -1
  39. data/app/models/{base → entities}/task.rb +5 -6
  40. data/app/models/list.rb +17 -0
  41. data/app/models/observers/lead_observer.rb +39 -0
  42. data/app/models/observers/opportunity_observer.rb +54 -0
  43. data/app/models/observers/task_observer.rb +41 -0
  44. data/app/models/polymorphic/address.rb +1 -3
  45. data/app/models/polymorphic/avatar.rb +0 -5
  46. data/app/models/polymorphic/comment.rb +2 -11
  47. data/app/models/polymorphic/email.rb +2 -9
  48. data/app/models/polymorphic/tag.rb +17 -0
  49. data/app/models/polymorphic/tagging.rb +17 -0
  50. data/app/models/users/ability.rb +13 -0
  51. data/app/models/users/user.rb +1 -4
  52. data/app/views/accounts/_account.html.haml +10 -6
  53. data/app/views/accounts/index.html.haml +1 -1
  54. data/app/views/accounts/show.html.haml +6 -24
  55. data/app/views/admin/fields/_field.html.haml +6 -6
  56. data/app/views/admin/tags/_tag.html.haml +2 -2
  57. data/app/views/admin/tags/index.html.haml +1 -1
  58. data/app/views/admin/users/_user.html.haml +3 -3
  59. data/app/views/admin/users/index.html.haml +1 -1
  60. data/app/views/campaigns/_campaign.html.haml +9 -5
  61. data/app/views/campaigns/index.html.haml +1 -1
  62. data/app/views/campaigns/show.html.haml +4 -24
  63. data/app/views/comments/_comment.html.haml +17 -14
  64. data/app/views/comments/_edit.html.haml +1 -1
  65. data/app/views/comments/_new.html.haml +3 -3
  66. data/app/views/contacts/_contact.html.haml +33 -15
  67. data/app/views/contacts/_contacts.html.haml +6 -0
  68. data/app/views/contacts/_sidebar_show.html.haml +1 -1
  69. data/app/views/contacts/index.html.haml +1 -1
  70. data/app/views/contacts/show.html.haml +3 -19
  71. data/app/views/emails/_email.html.haml +24 -21
  72. data/app/views/{base → entities}/_advanced_search.html.haml +0 -0
  73. data/app/views/{base → entities}/_condition_fields.html.haml +0 -0
  74. data/app/views/{base → entities}/_grouping_fields.html.haml +0 -0
  75. data/app/views/{base → entities}/_sort_fields.html.haml +0 -0
  76. data/app/views/{base → entities}/advanced_search.js.rjs +0 -0
  77. data/app/views/entities/contacts.js.rjs +3 -0
  78. data/app/views/entities/leads.js.rjs +3 -0
  79. data/app/views/entities/opportunities.js.rjs +3 -0
  80. data/app/views/entities/versions.js.rjs +3 -0
  81. data/app/views/home/_activity.html.haml +19 -18
  82. data/app/views/home/_events_menu.html.haml +8 -0
  83. data/app/views/home/_options.html.haml +2 -3
  84. data/app/views/home/index.html.haml +1 -1
  85. data/app/views/leads/_lead.html.haml +42 -23
  86. data/app/views/leads/_leads.html.haml +6 -0
  87. data/app/views/leads/_sidebar_show.html.haml +1 -1
  88. data/app/views/leads/index.html.haml +1 -1
  89. data/app/views/leads/show.html.haml +3 -13
  90. data/app/views/opportunities/_opportunities.html.haml +6 -0
  91. data/app/views/opportunities/_opportunity.html.haml +23 -11
  92. data/app/views/opportunities/index.html.haml +1 -1
  93. data/app/views/opportunities/show.html.haml +4 -18
  94. data/app/views/shared/_comment.html.haml +3 -3
  95. data/app/views/shared/_edit_comment.html.haml +1 -1
  96. data/app/views/shared/_recent.html.haml +4 -4
  97. data/app/views/shared/_recently.html.haml +3 -3
  98. data/app/views/shared/_timeline.html.haml +2 -3
  99. data/app/views/tasks/_assigned.html.haml +4 -4
  100. data/app/views/tasks/_completed.html.haml +2 -2
  101. data/app/views/tasks/_pending.html.haml +2 -2
  102. data/app/views/tasks/_related.html.haml +4 -5
  103. data/app/views/tasks/_tasks.html.haml +3 -0
  104. data/app/views/tasks/_title.html.haml +1 -1
  105. data/app/views/tasks/index.html.haml +1 -1
  106. data/app/views/users/_avatar.html.haml +2 -2
  107. data/app/views/versions/_version.html.haml +9 -12
  108. data/app/views/versions/_versions.html.haml +11 -0
  109. data/config/application.rb +3 -2
  110. data/config/environments/development.rb +2 -2
  111. data/config/environments/production.rb +0 -4
  112. data/config/environments/staging.rb +1 -1
  113. data/config/initializers/action_mailer.rb +9 -0
  114. data/config/initializers/paper_trail.rb +80 -0
  115. data/config/initializers/relative_url_root.rb +23 -0
  116. data/config/locales/cz_fat_free_crm.yml +1 -1
  117. data/config/locales/en-US_fat_free_crm.yml +22 -17
  118. data/config/locales/fr_fat_free_crm.yml +349 -134
  119. data/config/routes.rb +144 -140
  120. data/config/settings.default.yml +14 -2
  121. data/db/demo/addresses.yml +2 -2
  122. data/db/demo/emails.yml +2 -2
  123. data/db/migrate/20120216042541_is_paranoid_to_paper_trail.rb +1 -2
  124. data/db/migrate/20120309070209_add_versions_related.rb +6 -0
  125. data/db/migrate/20120316045804_activities_to_versions.rb +35 -0
  126. data/db/schema.rb +79 -53
  127. data/fat_free_crm.gemspec +8 -4
  128. data/lib/development_tasks/gem.rake +18 -1
  129. data/lib/development_tasks/license.rake +2 -4
  130. data/lib/development_tasks/rdoc.rake +17 -0
  131. data/lib/development_tasks/rspec.rake +17 -0
  132. data/lib/fat_free_crm.rb +20 -14
  133. data/lib/fat_free_crm/core_ext/array.rb +0 -27
  134. data/lib/fat_free_crm/dropbox.rb +11 -1
  135. data/lib/fat_free_crm/engine.rb +21 -3
  136. data/lib/fat_free_crm/gem_dependencies.rb +26 -0
  137. data/lib/fat_free_crm/gem_ext.rb +18 -1
  138. data/lib/fat_free_crm/gem_ext/active_record/schema_dumper.rb +18 -1
  139. data/lib/fat_free_crm/gem_ext/authlogic/session/cookies.rb +17 -0
  140. data/lib/fat_free_crm/gem_ext/rails/engine.rb +17 -0
  141. data/lib/fat_free_crm/gem_ext/rails/text_helper.rb +17 -0
  142. data/lib/fat_free_crm/gem_ext/rake/task.rb +17 -0
  143. data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +18 -1
  144. data/lib/fat_free_crm/plugin_dependencies.rb +23 -5
  145. data/lib/fat_free_crm/renderers.rb +17 -0
  146. data/lib/fat_free_crm/syck_yaml.rb +17 -0
  147. data/lib/fat_free_crm/version.rb +1 -1
  148. data/lib/{country_select → plugins/country_select}/MIT-LICENSE +0 -0
  149. data/lib/{country_select → plugins/country_select}/README +0 -0
  150. data/lib/{country_select → plugins/country_select}/init.rb +0 -0
  151. data/lib/{country_select → plugins/country_select}/install.rb +0 -0
  152. data/lib/{country_select → plugins/country_select}/lib/country_select.rb +0 -0
  153. data/lib/{country_select → plugins/country_select}/uninstall.rb +0 -0
  154. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/Gemfile +0 -0
  155. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/README.textile +0 -0
  156. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/ROADMAP.textile +0 -0
  157. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/Rakefile +0 -0
  158. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/VERSION +0 -0
  159. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/gravatar_image_tag.gemspec +0 -0
  160. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/init.rb +0 -0
  161. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/lib/gravatar_image_tag.rb +0 -0
  162. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/spec/gravatar_image_tag_spec.rb +0 -0
  163. data/lib/{gravatar_image_tag → plugins/gravatar_image_tag}/spec/test_helper.rb +0 -0
  164. data/lib/tasks/demo.rake +32 -29
  165. data/lib/tasks/dropbox.rake +1 -1
  166. data/lib/tasks/fat_free_crm.rake +3 -2
  167. data/lib/tasks/plugins.rake +1 -0
  168. data/spec/controllers/accounts_controller_spec.rb +7 -5
  169. data/spec/controllers/campaigns_controller_spec.rb +11 -9
  170. data/spec/controllers/contacts_controller_spec.rb +7 -5
  171. data/spec/controllers/home_controller_spec.rb +2 -2
  172. data/spec/controllers/leads_controller_spec.rb +7 -5
  173. data/spec/controllers/opportunities_controller_spec.rb +7 -5
  174. data/spec/factories/shared_factories.rb +8 -11
  175. data/spec/lib/dropbox_spec.rb +1 -0
  176. data/spec/models/polymorphic/version_spec.rb +247 -0
  177. data/spec/models/users/user_spec.rb +0 -9
  178. data/spec/spec_helper.rb +4 -0
  179. data/spec/views/home/index.haml_spec.rb +1 -1
  180. data/spec/views/home/index.rjs_spec.rb +4 -4
  181. data/spec/views/tasks/new.rjs_spec.rb +2 -2
  182. data/vendor/assets/javascripts/calendar_date_select/format_french.js +24 -0
  183. metadata +167 -126
  184. data/app/models/observers/activity_observer.rb +0 -84
  185. data/app/models/polymorphic/activity.rb +0 -106
  186. data/app/views/accounts/contacts.js.rjs +0 -3
  187. data/app/views/accounts/opportunities.js.rjs +0 -3
  188. data/app/views/campaigns/leads.js.rjs +0 -3
  189. data/app/views/campaigns/opportunities.js.rjs +0 -3
  190. data/app/views/contacts/opportunities.js.rjs +0 -3
  191. data/app/views/home/_actions_menu.html.haml +0 -8
  192. data/lib/dynamic_form/MIT-LICENSE +0 -20
  193. data/lib/dynamic_form/README +0 -13
  194. data/lib/dynamic_form/Rakefile +0 -10
  195. data/lib/dynamic_form/dynamic_form.gemspec +0 -12
  196. data/lib/dynamic_form/init.rb +0 -2
  197. data/lib/dynamic_form/lib/action_view/helpers/dynamic_form.rb +0 -301
  198. data/lib/dynamic_form/lib/action_view/locale/en-US.yml +0 -8
  199. data/lib/dynamic_form/lib/dynamic_form.rb +0 -6
  200. data/lib/dynamic_form/test/dynamic_form_i18n_test.rb +0 -42
  201. data/lib/dynamic_form/test/dynamic_form_test.rb +0 -370
  202. data/lib/dynamic_form/test/test_helper.rb +0 -10
  203. data/lib/responds_to_parent/MIT-LICENSE +0 -20
  204. data/lib/responds_to_parent/README +0 -47
  205. data/lib/responds_to_parent/Rakefile +0 -22
  206. data/lib/responds_to_parent/init.rb +0 -2
  207. data/lib/responds_to_parent/install.rb +0 -2
  208. data/lib/responds_to_parent/lib/responds_to_parent.rb +0 -70
  209. data/lib/responds_to_parent/test/responds_to_parent_test.rb +0 -11
  210. data/lib/responds_to_parent/test/test_helper.rb +0 -7
  211. data/lib/responds_to_parent/uninstall.rb +0 -2
  212. data/spec/models/polymorphic/activity_spec.rb +0 -303
data/.gitignore CHANGED
@@ -29,4 +29,5 @@ Design
29
29
  .sass-cache
30
30
  *~
31
31
  *.swp
32
+ *.gem
32
33
 
@@ -18,7 +18,7 @@ matrix:
18
18
  env: DB=postgres
19
19
  gemfile: Gemfile.ci
20
20
  - rvm: 1.8.7
21
- env: DB=mysql
21
+ env: DB=sqlite
22
22
  gemfile: Gemfile.ci
23
23
  - rvm: 1.9.2
24
24
  env: DB=sqlite
@@ -29,7 +29,7 @@ matrix:
29
29
  - rvm: 1.9.3
30
30
  env: DB=mysql
31
31
  gemfile: Gemfile.ci
32
-
32
+
33
33
  bundler_args: --path=vendor/bundle --without heroku
34
34
 
35
35
  before_script:
data/Gemfile CHANGED
@@ -22,12 +22,14 @@ spec.runtime_dependencies.each do |dep|
22
22
  gem dep.name, *(dep.requirement.as_list)
23
23
  end
24
24
 
25
- gem 'ransack', :git => "git://github.com/ndbroadbent/ransack.git"
25
+ gem 'ransack', :git => "https://github.com/fatfreecrm/ransack.git"
26
+ gem 'chosen-rails', :git => "https://github.com/fatfreecrm/chosen-rails.git"
27
+ gem 'responds_to_parent', :git => "https://github.com/LessonPlanet/responds_to_parent.git"
26
28
 
27
29
  # Remove fat_free_crm from dependencies, to stop it from being auto-required.
28
30
  remove 'fat_free_crm'
29
31
 
30
- gem 'pg', '~> 0.12.2'
32
+ gem 'pg', '~> 0.13.2'
31
33
 
32
34
  group :development, :test do
33
35
  gem 'rspec-rails'
@@ -38,3 +40,14 @@ group :development, :test do
38
40
  gem 'ruby-debug19', :platform => :mri_19
39
41
  end
40
42
  end
43
+
44
+
45
+ # Gems used only for assets and not required
46
+ # in production environments by default.
47
+ group :assets do
48
+ gem 'sass-rails', '~> 3.2.3'
49
+ gem 'coffee-rails', '~> 3.2.1'
50
+ gem 'therubyracer', :platform => :ruby # C Ruby (MRI) or Rubinius, but NOT Windows
51
+ gem 'uglifier', '>= 1.0.3'
52
+ end
53
+
@@ -1,5 +1,19 @@
1
1
  GIT
2
- remote: git://github.com/ndbroadbent/ransack.git
2
+ remote: https://github.com/LessonPlanet/responds_to_parent.git
3
+ revision: 1f0c6d82eda5e7f331a30fc029e7ead2a7dbdebf
4
+ specs:
5
+ responds_to_parent (1.0.20091013)
6
+
7
+ GIT
8
+ remote: https://github.com/fatfreecrm/chosen-rails.git
9
+ revision: 33c92a8554ee14d11b7293eb531371a05c0a0b67
10
+ specs:
11
+ chosen-rails (0.9.5)
12
+ railties (~> 3.0)
13
+ thor (~> 0.14)
14
+
15
+ GIT
16
+ remote: https://github.com/fatfreecrm/ransack.git
3
17
  revision: 92f5812d4320e5f1959f844d19d0386bb5654a08
4
18
  specs:
5
19
  ransack (0.6.0)
@@ -56,6 +70,7 @@ GEM
56
70
  activerecord (>= 3.0.7)
57
71
  activerecord (>= 3.0.7)
58
72
  builder (3.0.0)
73
+ cancan (1.6.7)
59
74
  capybara (1.1.2)
60
75
  mime-types (>= 1.16)
61
76
  nokogiri (>= 1.3.3)
@@ -65,9 +80,6 @@ GEM
65
80
  xpath (~> 0.1.4)
66
81
  childprocess (0.3.1)
67
82
  ffi (~> 1.0.6)
68
- chosen-rails (0.9.7.1)
69
- railties (~> 3.0)
70
- thor (~> 0.14)
71
83
  chronic (0.6.7)
72
84
  cocaine (0.2.1)
73
85
  coffee-rails (3.2.2)
@@ -80,11 +92,15 @@ GEM
80
92
  columnize (0.3.6)
81
93
  database_cleaner (0.7.1)
82
94
  diff-lcs (1.1.3)
95
+ dynamic_form (1.1.4)
83
96
  erubis (2.7.0)
84
97
  execjs (1.3.0)
85
98
  multi_json (~> 1.0)
86
99
  factory_girl (2.6.1)
87
100
  activesupport (>= 2.3.9)
101
+ factory_girl_rails (1.7.0)
102
+ factory_girl (~> 2.6.0)
103
+ railties (>= 3.0.0)
88
104
  ffaker (1.13.0)
89
105
  ffi (1.0.11)
90
106
  fuubar (1.0.0)
@@ -114,12 +130,12 @@ GEM
114
130
  nokogiri (1.5.0)
115
131
  paper_trail (2.6.0)
116
132
  rails (~> 3)
117
- paperclip (2.5.2)
133
+ paperclip (2.7.0)
118
134
  activerecord (>= 2.3.0)
119
135
  activesupport (>= 2.3.2)
120
136
  cocaine (>= 0.0.2)
121
137
  mime-types
122
- pg (0.12.2)
138
+ pg (0.13.2)
123
139
  polyamorous (0.5.0)
124
140
  activerecord (~> 3.0)
125
141
  polyglot (0.3.3)
@@ -192,7 +208,7 @@ GEM
192
208
  ffi (~> 1.0)
193
209
  multi_json (~> 1.0)
194
210
  rubyzip
195
- simple_form (1.5.2)
211
+ simple_form (2.0.1)
196
212
  actionpack (~> 3.0)
197
213
  activemodel (~> 3.0)
198
214
  spork (0.9.0)
@@ -227,30 +243,34 @@ DEPENDENCIES
227
243
  acts_as_list (~> 0.1.4)
228
244
  ajax-chosen-rails (>= 0.1.5)
229
245
  authlogic (~> 3.1.0)
246
+ cancan
230
247
  capybara
231
- chosen-rails
232
- coffee-rails
248
+ chosen-rails!
249
+ coffee-rails (~> 3.2.1)
233
250
  database_cleaner
251
+ dynamic_form
234
252
  factory_girl (~> 2.6.1)
253
+ factory_girl_rails (~> 1.7.0)
235
254
  ffaker (>= 1.12.0)
236
255
  fuubar
237
256
  haml (~> 3.1.3)
238
257
  headless
239
258
  jquery-rails
240
259
  paper_trail
241
- paperclip (~> 2.5.2)
242
- pg (~> 0.12.2)
260
+ paperclip (~> 2.7.0)
261
+ pg (~> 0.13.2)
243
262
  prototype-rails
244
263
  rails (~> 3.2.2)
245
264
  ransack!
265
+ responds_to_parent!
246
266
  rspec-rails
247
267
  ruby-debug
248
268
  ruby-debug19
249
269
  sass (~> 3.1.15)
250
- sass-rails
251
- simple_form (~> 1.5.2)
270
+ sass-rails (~> 3.2.3)
271
+ simple_form (~> 2.0.1)
252
272
  spork
253
273
  steak
254
274
  therubyracer
255
- uglifier
275
+ uglifier (>= 1.0.3)
256
276
  will_paginate (~> 3.0.2)
data/README.md CHANGED
@@ -58,159 +58,72 @@ Pull requests and bug reports are always welcome!
58
58
  * MySQL v4.1.1 or later (v5+ is recommended), SQLite v3.4 or later, or Postgres 8.4.8 or later.
59
59
  * ImageMagick (optional, only needed if you would like to use avatars)
60
60
 
61
- (Ruby on Rails v3 and other gem dependencies will be installed automatically by Bundler.)
61
+ (Ruby on Rails and other gem dependencies will be installed automatically by Bundler.)
62
62
 
63
63
 
64
64
  ### Downloads
65
65
 
66
- * Git source code repository: git://github.com/fatfreecrm/fat_free_crm.git
67
- * .zip or .tgz archives: http://github.com/fatfreecrm/fat_free_crm/downloads
66
+ * Git source code repository: `git clone git://github.com/fatfreecrm/fat_free_crm.git`
67
+ * **.zip** or **.tgz** archives: http://github.com/fatfreecrm/fat_free_crm/downloads
68
68
 
69
69
 
70
- ### Upgrading from previous versions of Fat Free CRM
70
+ ## Installation
71
71
 
72
- If you are upgrading from version 0.10.1 or below to the latest Rails 3.x version, your database schema
73
- needs to be updated.
74
-
75
- Please run the following commands in this order:
76
-
77
- ```bash
78
- bundle install --without heroku # Installs gem dependencies
79
- rake ffcrm:upgrade:schema # Updates your schema to use the new timestamped migrations
80
- rake db:migrate # Runs any new database migrations.
81
- ```
72
+ Please view one of the following installation guides:
82
73
 
83
- ## Install on Heroku
74
+ ### [Setup Linux or Mac OS](http://guides.fatfreecrm.com/Setup-Linux-or-Mac-OS.html)
84
75
 
85
- You will need the heroku gem on your system.
76
+ Installing Fat Free CRM on Linux or Mac OS X
86
77
 
87
- ```bash
88
- gem install heroku
89
- ```
78
+ ### [Setup Heroku](http://guides.fatfreecrm.com/Setup-Heroku.html)
90
79
 
91
- To set up Fat Free CRM on Heroku, run the following commands:
80
+ Setting up a Heroku instance for Fat Free CRM
92
81
 
93
- ```bash
94
- app_name="{{organization-crm}}" # <- Replace with your desired application name
95
- cp config/settings.yml.example config/settings.yml
96
- git add -f config/settings.yml
97
- git commit -m "Added default settings.yml"
98
- heroku create $app_name --stack cedar
99
- git push heroku master
100
- heroku run rake ffcrm:setup USERNAME=admin PASSWORD=admin EMAIL=admin@example.com
101
- heroku config:add HEROKU=true
102
- ```
82
+ ### [Setup Microsoft Windows](http://guides.fatfreecrm.com/Setup-Microsoft-Windows.html)
103
83
 
104
- ## Install locally, or on a server
84
+ Installing Fat Free CRM on Microsoft Windows
105
85
 
106
- #### Set Up Configuration (Database & Settings)
86
+ ### [Ubuntu Server Setup Script](http://guides.fatfreecrm.com/Ubuntu-Server-Setup-Script.html)
107
87
 
108
- Fat Free CRM supports PostGreSQL, MySQL and SQLite databases. The source code comes with
109
- sample database configuration files, such as: <tt>config/database.mysql.yml</tt>
110
- for MySQL and <tt>config/database.sqlite.yml</tt> for SQLite.
88
+ Run this bash script to quickly setup a Ubuntu server
111
89
 
112
- Based on your choice of database, create <tt>config/database.yml</tt>:
90
+ ### [Running Fat Free CRM as a Rails Engine](http://guides.fatfreecrm.com/Running-as-a-Rails-Engine.html)
113
91
 
114
- ```bash
115
- cp config/database.mysql.yml config/database.yml
116
- ```
92
+ Run the Fat Free CRM gem within a separate Rails application.
93
+ This is the best way to deploy Fat Free CRM if you need to add plugins or make any customizations.
117
94
 
118
- * Edit <tt>config/database.yml</tt> and specify database names and authentication details.
119
95
 
120
- * Then, edit your <tt>Gemfile</tt> and uncomment only your chosen database.
96
+ ## Upgrading from previous versions of Fat Free CRM
121
97
 
98
+ If you are upgrading from version 0.10.1 or below to the latest Rails 3.x version, your database schema
99
+ needs to be updated.
122
100
 
123
- #### Install Gem Dependencies
124
-
125
- After you have uncommented the right database adapter in your <tt>Gemfile</tt>,
126
- run the following command from the application's root directory:
127
-
128
- ```bash
129
- bundle install --without heroku
130
- ```
131
-
132
- #### Create Database
133
-
134
- Now you are ready to create the database:
135
-
136
- ```bash
137
- rake db:create
138
- ```
139
-
140
- #### Set Up Application
141
-
142
- The next step is to load default Fat Free CRM settings, such as menu structures,
143
- default colors, etc. and create the Admin user.
144
-
145
- Using the provided sample, create your <tt>config/settings.yml</tt>:
146
-
147
- ```bash
148
- cp config/settings.yml.example config/settings.yml
149
- ```
150
-
151
- * Edit <tt>config/settings.yml</tt> and configure any required settings, such as your host, base URL and language (locale).
152
-
153
-
154
- Next, run the following rake task:
155
-
156
- ```bash
157
- rake ffcrm:setup
158
- ```
159
-
160
- The previous command will prompt you for an admin user, password and email.
161
- If you want to run this task without any user input, you can set the following variables:
162
-
163
- ```bash
164
- rake ffcrm:setup USERNAME=admin PASSWORD=password EMAIL=admin@example.com
165
- ```
166
-
167
- #### Load Demo Data (Optional)
168
-
169
- You can test drive Fat Free CRM by loading sample records that are generated
170
- on the fly mimic the actual use.
171
-
172
- **IMPORTANT**: Loading demo will delete all existing data from your database.
173
-
174
- ```bash
175
- rake ffcrm:demo:load
176
- ```
177
-
178
- Among other things the demo generator creates 8 sample user records with the
179
- following usernames: <tt>aaron</tt>, <tt>ben</tt>, <tt>cindy</tt>, <tt>dan</tt>,
180
- <tt>elizabeth</tt>, <tt>frank</tt>, <tt>george</tt>, and <tt>heather</tt>.
181
- You can log in with any of these names using the name as password.
182
- The demo site at http://demo.fatfreecrm.com provides access as a sample user as well.
183
-
184
- You can reset the database and reload demo data at any time by using:
101
+ Please run the following commands in this order:
185
102
 
186
103
  ```bash
187
- rake ffcrm:demo:reload
104
+ bundle install --without heroku # Installs gem dependencies
105
+ rake ffcrm:upgrade:schema # Updates your schema to use the new timestamped migrations
106
+ rake db:migrate # Runs any new database migrations.
188
107
  ```
189
108
 
190
- #### Run the App
191
-
192
- Now you should be able to launch the Rails server and point your web browser
193
- to http://localhost:3000
194
109
 
195
- ```bash
196
- rails server
197
- ```
198
-
199
- # Resources
110
+ ## Resources
200
111
 
201
112
  |||
202
113
  |-----------------------------------:|:--------------------------|
203
- | **Home page**: | http://www.fatfreecrm.com |
204
- | **Online demo**: | http://demo.fatfreecrm.com |
205
- | **Project page**: | http://github.com/michaeldv/fat_free_crm/tree/master |
206
- | **Features and bugs**: | http://fatfreecrm.lighthouseapp.com |
207
- | **Twitter commit updates**: | http://twitter.com/fatfreecrm |
208
- | **User's Google group**: | http://groups.google.com/group/fat-free-crm-users |
209
- | **Developer's Google group**: | http://groups.google.com/group/fat-free-crm-dev |
210
- | **IRC channel**: | [#fatfreecrm](http://webchat.freenode.net/) on irc.freenode.net |
211
-
212
-
213
- # For Developers
114
+ | **Home Page**: | http://www.fatfreecrm.com |
115
+ | **Guides**: | http://guides.fatfreecrm.com |
116
+ | **Online Demo**: | http://demo.fatfreecrm.com |
117
+ | **Github Project Page**: | http://github.com/fatfreecrm/fat_free_crm |
118
+ | **Feature Requests and Bugs**: | http://support.fatfreecrm.com/ |
119
+ | **RDoc API**: | http://api.fatfreecrm.com |
120
+ | **Twitter Commit Updates**: | http://twitter.com/fatfreecrm |
121
+ | **User's Google Group**: | http://groups.google.com/group/fat-free-crm-users |
122
+ | **Developer's Google Group**: | http://groups.google.com/group/fat-free-crm-dev |
123
+ | **IRC Channel**: | [#fatfreecrm](http://webchat.freenode.net/) on irc.freenode.net |
124
+
125
+
126
+ ## For Developers
214
127
 
215
128
  Fat Free CRM can be customized by implementing callback hooks and extended by
216
129
  creating Rails Engines plugins. Check out these sample repositories demonstrating
@@ -33,7 +33,7 @@
33
33
  //= require crm_chosen
34
34
  //= require search
35
35
  //= require lists
36
-
36
+ //= require_self
37
37
 
38
38
  <%
39
39
  Gem.loaded_specs.keys.grep(/^ffcrm_/).each do |plugin|
@@ -1,3 +1,20 @@
1
+ // Fat Free CRM
2
+ // Copyright (C) 2008-2011 by Michael Dvorkin
3
+ //
4
+ // This program is free software: you can redistribute it and/or modify
5
+ // it under the terms of the GNU Affero General Public License as published by
6
+ // the Free Software Foundation, either version 3 of the License, or
7
+ // (at your option) any later version.
8
+ //
9
+ // This program is distributed in the hope that it will be useful,
10
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ // GNU Affero General Public License for more details.
13
+ //
14
+ // You should have received a copy of the GNU Affero General Public License
15
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+ //------------------------------------------------------------------------------
17
+
1
18
  var crm = {
2
19
 
3
20
  EXPANDED : "&#9660;",
@@ -152,8 +169,12 @@ var crm = {
152
169
  $("account_disabled_title").show();
153
170
  $("account_name").hide();
154
171
  $("account_name").disable();
172
+ // Disable chosen account select
155
173
  $("account_id").disable();
174
+ Event.fire($("account_id"), "liszt:updated");
156
175
  $("account_id_chzn").show();
176
+ // Enable hidden account id select so that value is POSTed
177
+ $("account_id").enable();
157
178
  },
158
179
 
159
180
  //----------------------------------------------------------------------------
@@ -450,7 +471,7 @@ document.observe("dom:loaded", function() {
450
471
 
451
472
  if (container) {
452
473
  var img = new Image;
453
- img.src = '/assets/loading.gif';
474
+ img.src = crm.base_url + '/assets/loading.gif';
454
475
 
455
476
  function createSpinner() {
456
477
  return new Element('img', { src: img.src, 'class': 'spinner' })
@@ -15,11 +15,10 @@
15
15
  // along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  //------------------------------------------------------------------------------
17
17
 
18
-
19
18
  //----------------------------------------------------------------------------
20
19
  // AJAX loads the form fields for each field group
21
20
  crm.load_field_group = function(controller, tag, asset_id) {
22
- new Ajax.Request('/'+ controller +'/field_group', {
21
+ new Ajax.Request(crm.base_url + '/' + controller +'/field_group', {
23
22
  asynchronous: true,
24
23
  evalScripts: true,
25
24
  method: 'get',
@@ -44,4 +43,4 @@ crm.close_all_forms = function() {
44
43
  $$('.close').each(function(el){
45
44
  new Ajax.Request(el.href, {asynchronous: true, method: "get"})
46
45
  });
47
- };
46
+ };
@@ -1 +1,18 @@
1
+ // Fat Free CRM
2
+ // Copyright (C) 2008-2011 by Michael Dvorkin
3
+ //
4
+ // This program is free software: you can redistribute it and/or modify
5
+ // it under the terms of the GNU Affero General Public License as published by
6
+ // the Free Software Foundation, either version 3 of the License, or
7
+ // (at your option) any later version.
8
+ //
9
+ // This program is distributed in the hope that it will be useful,
10
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ // GNU Affero General Public License for more details.
13
+ //
14
+ // You should have received a copy of the GNU Affero General Public License
15
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+ //------------------------------------------------------------------------------
17
+
1
18
  jQuery.noConflict();