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.

Files changed (407) hide show
  1. checksums.yaml +5 -13
  2. data/.travis.yml +3 -3
  3. data/Gemfile +5 -2
  4. data/Gemfile.lock +137 -119
  5. data/MIT-LICENSE +1 -1
  6. data/README.md +5 -3
  7. data/app/assets/javascripts/admin/fields.js.coffee +31 -8
  8. data/app/assets/javascripts/application.js.erb +6 -10
  9. data/app/assets/javascripts/crm.js.coffee +426 -0
  10. data/app/assets/javascripts/crm_chosen.js.coffee +19 -38
  11. data/app/assets/javascripts/crm_classes.js.coffee +215 -0
  12. data/app/assets/javascripts/crm_comments.js.coffee +20 -58
  13. data/app/assets/javascripts/crm_loginout.js.coffee +27 -0
  14. data/app/assets/javascripts/crm_select2.js.coffee +29 -0
  15. data/app/assets/javascripts/crm_sortable.js.coffee +32 -0
  16. data/app/assets/javascripts/crm_tags.js.coffee +22 -0
  17. data/app/assets/javascripts/crm_textarea_autocomplete.js.coffee +33 -0
  18. data/app/assets/javascripts/datepicker.js.coffee +2 -2
  19. data/app/assets/javascripts/format_buttons.js.coffee +23 -24
  20. data/app/assets/javascripts/lists.js.coffee +45 -76
  21. data/app/assets/javascripts/pagination.js.coffee +16 -0
  22. data/app/assets/javascripts/search.js.coffee +6 -22
  23. data/app/assets/javascripts/timeago.js.coffee +21 -0
  24. data/app/assets/stylesheets/application.css.erb +0 -1
  25. data/app/assets/stylesheets/common.scss +36 -29
  26. data/app/assets/stylesheets/lists.css.scss +17 -3
  27. data/app/controllers/admin/groups_controller.rb +2 -1
  28. data/app/controllers/application_controller.rb +5 -5
  29. data/app/controllers/entities/accounts_controller.rb +1 -1
  30. data/app/controllers/entities/campaigns_controller.rb +1 -1
  31. data/app/controllers/entities/contacts_controller.rb +1 -1
  32. data/app/controllers/entities/leads_controller.rb +1 -1
  33. data/app/controllers/entities/opportunities_controller.rb +1 -1
  34. data/app/controllers/home_controller.rb +10 -7
  35. data/app/controllers/tasks_controller.rb +15 -0
  36. data/app/controllers/users_controller.rb +6 -4
  37. data/app/helpers/accounts_helper.rb +8 -5
  38. data/app/helpers/application_helper.rb +53 -39
  39. data/app/helpers/campaigns_helper.rb +1 -0
  40. data/app/helpers/leads_helper.rb +3 -3
  41. data/app/helpers/opportunities_helper.rb +15 -0
  42. data/app/helpers/remote_link_pagination_helper.rb +8 -0
  43. data/app/helpers/tags_helper.rb +2 -2
  44. data/app/helpers/tasks_helper.rb +22 -15
  45. data/app/helpers/users_helper.rb +3 -2
  46. data/app/mailers/user_mailer.rb +9 -3
  47. data/app/models/entities/account_contact.rb +1 -1
  48. data/app/models/fields/custom_field.rb +1 -1
  49. data/app/models/list.rb +1 -0
  50. data/app/models/observers/entity_observer.rb +10 -1
  51. data/app/models/observers/lead_observer.rb +2 -0
  52. data/app/models/observers/opportunity_observer.rb +2 -0
  53. data/app/models/observers/task_observer.rb +2 -0
  54. data/app/models/polymorphic/avatar.rb +2 -0
  55. data/app/models/polymorphic/comment.rb +0 -1
  56. data/app/models/polymorphic/task.rb +41 -9
  57. data/app/models/users/ability.rb +1 -0
  58. data/app/models/users/group.rb +0 -5
  59. data/app/models/users/user.rb +0 -7
  60. data/app/views/accounts/_edit.html.haml +1 -0
  61. data/app/views/accounts/_index_brief.html.haml +2 -2
  62. data/app/views/accounts/_index_long.html.haml +2 -2
  63. data/app/views/accounts/_new.html.haml +1 -0
  64. data/app/views/accounts/_sidebar_index.html.haml +1 -1
  65. data/app/views/accounts/_sidebar_show.html.haml +1 -1
  66. data/app/views/accounts/_top_section.html.haml +1 -1
  67. data/app/views/accounts/create.js.haml +9 -9
  68. data/app/views/accounts/destroy.js.haml +2 -2
  69. data/app/views/accounts/edit.js.haml +5 -5
  70. data/app/views/accounts/index.js.haml +5 -5
  71. data/app/views/accounts/new.js.haml +1 -1
  72. data/app/views/accounts/show.html.haml +1 -1
  73. data/app/views/accounts/show.js.haml +1 -1
  74. data/app/views/accounts/update.js.haml +7 -5
  75. data/app/views/admin/field_groups/_field_group.html.haml +4 -5
  76. data/app/views/admin/field_groups/confirm.js.haml +2 -2
  77. data/app/views/admin/field_groups/create.js.haml +6 -12
  78. data/app/views/admin/field_groups/destroy.js.haml +3 -3
  79. data/app/views/admin/field_groups/edit.js.haml +1 -1
  80. data/app/views/admin/field_groups/new.js.haml +1 -1
  81. data/app/views/admin/field_groups/update.js.haml +2 -2
  82. data/app/views/admin/fields/_field.html.haml +1 -1
  83. data/app/views/admin/fields/_sort_by.html.haml +3 -3
  84. data/app/views/admin/fields/create.js.haml +9 -9
  85. data/app/views/admin/fields/destroy.js.haml +4 -4
  86. data/app/views/admin/fields/edit.js.haml +2 -2
  87. data/app/views/admin/fields/index.html.haml +1 -8
  88. data/app/views/admin/fields/show.html.haml +1 -1
  89. data/app/views/admin/fields/update.js.haml +8 -8
  90. data/app/views/admin/groups/_form.html.haml +1 -3
  91. data/app/views/admin/groups/create.js.haml +8 -8
  92. data/app/views/admin/groups/destroy.js.haml +3 -3
  93. data/app/views/admin/groups/edit.js.haml +3 -3
  94. data/app/views/admin/groups/index.js.haml +2 -2
  95. data/app/views/admin/groups/new.js.haml +2 -2
  96. data/app/views/admin/groups/update.js.haml +5 -5
  97. data/app/views/admin/tags/confirm.js.haml +2 -2
  98. data/app/views/admin/tags/create.js.haml +8 -8
  99. data/app/views/admin/tags/destroy.js.haml +3 -3
  100. data/app/views/admin/tags/edit.js.haml +4 -4
  101. data/app/views/admin/tags/new.js.haml +1 -1
  102. data/app/views/admin/tags/update.js.haml +5 -5
  103. data/app/views/admin/users/_profile.html.haml +3 -4
  104. data/app/views/admin/users/confirm.js.haml +2 -2
  105. data/app/views/admin/users/create.js.haml +8 -8
  106. data/app/views/admin/users/destroy.js.haml +3 -3
  107. data/app/views/admin/users/edit.js.haml +4 -4
  108. data/app/views/admin/users/index.js.haml +2 -2
  109. data/app/views/admin/users/new.js.haml +2 -2
  110. data/app/views/admin/users/reactivate.js.haml +2 -2
  111. data/app/views/admin/users/suspend.js.haml +2 -2
  112. data/app/views/admin/users/update.js.haml +5 -5
  113. data/app/views/campaigns/_edit.html.haml +1 -0
  114. data/app/views/campaigns/_index_brief.html.haml +1 -1
  115. data/app/views/campaigns/_index_long.html.haml +1 -1
  116. data/app/views/campaigns/_new.html.haml +1 -0
  117. data/app/views/campaigns/_sidebar_index.html.haml +1 -1
  118. data/app/views/campaigns/_sidebar_show.html.haml +1 -1
  119. data/app/views/campaigns/_status.html.haml +1 -1
  120. data/app/views/campaigns/_top_section.html.haml +1 -1
  121. data/app/views/campaigns/create.js.haml +10 -10
  122. data/app/views/campaigns/destroy.js.haml +2 -2
  123. data/app/views/campaigns/edit.js.haml +6 -6
  124. data/app/views/campaigns/index.js.haml +5 -5
  125. data/app/views/campaigns/new.js.haml +1 -1
  126. data/app/views/campaigns/show.html.haml +1 -1
  127. data/app/views/campaigns/show.js.haml +1 -1
  128. data/app/views/campaigns/update.js.haml +8 -6
  129. data/app/views/comments/_edit.html.haml +1 -1
  130. data/app/views/comments/_new.html.haml +1 -1
  131. data/app/views/comments/create.js.haml +9 -9
  132. data/app/views/comments/destroy.js.haml +2 -2
  133. data/app/views/comments/edit.js.haml +3 -3
  134. data/app/views/comments/update.js.haml +5 -5
  135. data/app/views/contacts/_contacts.html.haml +1 -1
  136. data/app/views/contacts/_edit.html.haml +1 -0
  137. data/app/views/contacts/_index_brief.html.haml +2 -2
  138. data/app/views/contacts/_index_full.html.haml +2 -2
  139. data/app/views/contacts/_index_long.html.haml +2 -2
  140. data/app/views/contacts/_new.html.haml +1 -0
  141. data/app/views/contacts/_section_general.html.haml +4 -3
  142. data/app/views/contacts/_sidebar_show.html.haml +1 -1
  143. data/app/views/contacts/_top_section.html.haml +1 -1
  144. data/app/views/contacts/create.js.haml +10 -10
  145. data/app/views/contacts/destroy.js.haml +3 -3
  146. data/app/views/contacts/edit.js.haml +5 -5
  147. data/app/views/contacts/index.js.haml +5 -5
  148. data/app/views/contacts/new.js.haml +1 -1
  149. data/app/views/contacts/show.html.haml +1 -1
  150. data/app/views/contacts/show.js.haml +1 -1
  151. data/app/views/contacts/update.js.haml +8 -6
  152. data/app/views/emails/destroy.js.haml +2 -2
  153. data/app/views/entities/_basic_search.html.haml +15 -12
  154. data/app/views/entities/_permissions.html.haml +6 -11
  155. data/app/views/entities/attach.js.haml +3 -3
  156. data/app/views/entities/contacts.js.haml +2 -2
  157. data/app/views/entities/discard.js.haml +1 -1
  158. data/app/views/entities/leads.js.haml +2 -2
  159. data/app/views/entities/opportunities.js.haml +2 -2
  160. data/app/views/entities/subscription_update.js.haml +1 -1
  161. data/app/views/entities/versions.js.haml +2 -2
  162. data/app/views/fields/group.js.erb +1 -1
  163. data/app/views/home/_account.html.haml +2 -2
  164. data/app/views/home/_assets_menu.html.haml +3 -3
  165. data/app/views/home/_duration_menu.html.haml +3 -3
  166. data/app/views/home/_events_menu.html.haml +3 -3
  167. data/app/views/home/_opportunity.html.haml +2 -2
  168. data/app/views/home/_options.html.haml +0 -1
  169. data/app/views/home/_users_menu.html.haml +3 -3
  170. data/app/views/home/index.js.haml +4 -4
  171. data/app/views/home/options.js.haml +1 -1
  172. data/app/views/layouts/_about.html.haml +3 -3
  173. data/app/views/layouts/_footer.html.haml +1 -1
  174. data/app/views/layouts/_header.html.haml +1 -1
  175. data/app/views/layouts/_jumpbox.html.haml +23 -21
  176. data/app/views/layouts/_sidebar.html.haml +1 -2
  177. data/app/views/layouts/admin/application.html.haml +1 -1
  178. data/app/views/layouts/application.html.haml +3 -3
  179. data/app/views/leads/_convert.html.haml +1 -11
  180. data/app/views/leads/_convert_permissions.html.haml +4 -9
  181. data/app/views/leads/_edit.html.haml +1 -0
  182. data/app/views/leads/_index_brief.html.haml +1 -1
  183. data/app/views/leads/_index_long.html.haml +1 -1
  184. data/app/views/leads/_leads.html.haml +1 -1
  185. data/app/views/leads/_new.html.haml +1 -0
  186. data/app/views/leads/_sidebar_index.html.haml +1 -1
  187. data/app/views/leads/_sidebar_show.html.haml +1 -1
  188. data/app/views/leads/_top_section.html.haml +1 -1
  189. data/app/views/leads/convert.js.haml +5 -5
  190. data/app/views/leads/create.js.haml +9 -9
  191. data/app/views/leads/destroy.js.haml +2 -2
  192. data/app/views/leads/edit.js.haml +5 -5
  193. data/app/views/leads/index.js.haml +5 -5
  194. data/app/views/leads/new.js.haml +1 -1
  195. data/app/views/leads/promote.js.haml +7 -7
  196. data/app/views/leads/reject.js.haml +2 -2
  197. data/app/views/leads/show.html.haml +1 -1
  198. data/app/views/leads/show.js.haml +1 -1
  199. data/app/views/leads/update.js.haml +9 -7
  200. data/app/views/lists/_lists.html.haml +6 -0
  201. data/app/views/lists/_sidebar.html.haml +18 -17
  202. data/app/views/lists/create.js.haml +6 -7
  203. data/app/views/lists/destroy.js.haml +1 -1
  204. data/app/views/opportunities/_edit.html.haml +2 -1
  205. data/app/views/opportunities/_index_brief.html.haml +1 -1
  206. data/app/views/opportunities/_index_long.html.haml +1 -1
  207. data/app/views/opportunities/_new.html.haml +2 -1
  208. data/app/views/opportunities/_opportunities.html.haml +1 -1
  209. data/app/views/opportunities/_sidebar_index.html.haml +1 -1
  210. data/app/views/opportunities/_sidebar_show.html.haml +1 -1
  211. data/app/views/opportunities/_top_section.html.haml +2 -2
  212. data/app/views/opportunities/contacts.js.haml +2 -2
  213. data/app/views/opportunities/create.js.haml +10 -10
  214. data/app/views/opportunities/destroy.js.haml +3 -3
  215. data/app/views/opportunities/edit.js.haml +5 -5
  216. data/app/views/opportunities/index.html.haml +1 -1
  217. data/app/views/opportunities/index.js.haml +5 -5
  218. data/app/views/opportunities/new.js.haml +1 -1
  219. data/app/views/opportunities/show.html.haml +1 -1
  220. data/app/views/opportunities/show.js.haml +1 -1
  221. data/app/views/opportunities/update.js.haml +8 -6
  222. data/app/views/shared/_address.html.haml +1 -1
  223. data/app/views/shared/_inline_styles.html.haml +1 -1
  224. data/app/views/shared/_naming.html.haml +3 -3
  225. data/app/views/shared/_paginate.haml +2 -1
  226. data/app/views/shared/_paginate_with_per_page.html.haml +10 -12
  227. data/app/views/shared/_search.html.haml +7 -3
  228. data/app/views/shared/_select_popup.html.haml +9 -11
  229. data/app/views/shared/_tags.html.haml +5 -4
  230. data/app/views/tasks/_completed.html.haml +3 -1
  231. data/app/views/tasks/_selector.html.haml +1 -1
  232. data/app/views/tasks/_top_section.html.haml +1 -1
  233. data/app/views/tasks/complete.js.haml +7 -7
  234. data/app/views/tasks/create.js.haml +17 -17
  235. data/app/views/tasks/destroy.js.haml +2 -2
  236. data/app/views/tasks/discard.js.haml +1 -1
  237. data/app/views/tasks/edit.js.haml +4 -4
  238. data/app/views/tasks/filter.js.haml +2 -2
  239. data/app/views/tasks/new.js.haml +1 -1
  240. data/app/views/tasks/uncomplete.js.haml +12 -0
  241. data/app/views/tasks/update.js.haml +4 -4
  242. data/app/views/users/_avatar.html.haml +1 -1
  243. data/app/views/users/_languages.html.haml +3 -3
  244. data/app/views/users/_profile.html.haml +1 -1
  245. data/app/views/users/avatar.js.haml +1 -1
  246. data/app/views/users/change_password.js.haml +5 -5
  247. data/app/views/users/edit.js.haml +1 -1
  248. data/app/views/users/password.js.haml +2 -2
  249. data/app/views/users/show.html.haml +1 -1
  250. data/app/views/users/update.js.haml +5 -5
  251. data/app/views/users/upload_avatar.js.haml +3 -3
  252. data/app/views/versions/_versions.html.haml +1 -1
  253. data/config/application.rb +3 -0
  254. data/config/environments/production.rb +1 -1
  255. data/config/environments/staging.rb +58 -13
  256. data/config/initializers/locale.rb +2 -0
  257. data/config/locales/cz_fat_free_crm.yml +1 -0
  258. data/config/locales/de_fat_free_crm.yml +1 -0
  259. data/config/locales/en-GB_fat_free_crm.yml +1 -0
  260. data/config/locales/en-US_fat_free_crm.yml +2 -0
  261. data/config/locales/es_fat_free_crm.yml +1 -0
  262. data/config/locales/fr-CA_fat_free_crm.yml +1 -0
  263. data/config/locales/fr_fat_free_crm.yml +1 -0
  264. data/config/locales/it_fat_free_crm.yml +1 -0
  265. data/config/locales/ja_fat_free_crm.yml +1 -0
  266. data/config/locales/pl_fat_free_crm.yml +1 -0
  267. data/config/locales/pt-BR_fat_free_crm.yml +1 -0
  268. data/config/locales/ru_fat_free_crm.yml +444 -61
  269. data/config/locales/sv-SE_fat_free_crm.yml +1 -0
  270. data/config/locales/th_fat_free_crm.yml +1 -0
  271. data/config/locales/zh-CN_fat_free_crm.yml +1 -0
  272. data/config/routes.rb +20 -19
  273. data/config/settings.default.yml +11 -10
  274. data/fat_free_crm.gemspec +5 -4
  275. data/lib/{plugins/country_select/lib/country_select.rb → country_select.rb} +0 -0
  276. data/lib/fat_free_crm.rb +3 -1
  277. data/lib/fat_free_crm/engine.rb +2 -4
  278. data/lib/fat_free_crm/gem_dependencies.rb +1 -1
  279. data/lib/fat_free_crm/gem_ext.rb +0 -2
  280. data/lib/fat_free_crm/permissions.rb +2 -3
  281. data/lib/fat_free_crm/version.rb +1 -1
  282. data/lib/{plugins/gravatar_image_tag/lib/gravatar_image_tag.rb → gravatar_image_tag.rb} +0 -0
  283. data/lib/tasks/ffcrm/settings.rake +4 -16
  284. data/public/favicon.ico +0 -0
  285. data/spec/controllers/entities/accounts_controller_spec.rb +5 -5
  286. data/spec/controllers/entities/campaigns_controller_spec.rb +5 -5
  287. data/spec/controllers/entities/contacts_controller_spec.rb +42 -5
  288. data/spec/controllers/entities/leads_controller_spec.rb +7 -7
  289. data/spec/controllers/entities/opportunities_controller_spec.rb +5 -5
  290. data/spec/controllers/home_controller_spec.rb +3 -3
  291. data/spec/controllers/tasks_controller_spec.rb +29 -0
  292. data/spec/factories/shared_factories.rb +1 -3
  293. data/spec/features/support/selector_helpers.rb +4 -4
  294. data/spec/helpers/tasks_helper_spec.rb +10 -5
  295. data/spec/lib/permissions_spec.rb +10 -22
  296. data/spec/mailers/user_mailer_spec.rb +5 -4
  297. data/spec/models/observers/entity_observer_spec.rb +13 -8
  298. data/spec/models/polymorphic/task_spec.rb +111 -32
  299. data/spec/routing/accounts_routing_spec.rb +1 -1
  300. data/spec/routing/campaigns_routing_spec.rb +1 -1
  301. data/spec/routing/contacts_routing_spec.rb +1 -1
  302. data/spec/routing/leads_routing_spec.rb +1 -1
  303. data/spec/routing/opportunities_routing_spec.rb +1 -1
  304. data/spec/shared/controllers.rb +2 -2
  305. data/spec/spec_helper.rb +1 -0
  306. data/spec/views/accounts/create.js.haml_spec.rb +3 -3
  307. data/spec/views/accounts/index.js.haml_spec.rb +4 -4
  308. data/spec/views/accounts/update.js.haml_spec.rb +5 -5
  309. data/spec/views/admin/field_groups/create.js.haml_spec.rb +2 -2
  310. data/spec/views/admin/field_groups/edit.js.haml_spec.rb +1 -1
  311. data/spec/views/admin/field_groups/new.js.haml_spec.rb +1 -1
  312. data/spec/views/admin/field_groups/update.js.haml_spec.rb +1 -1
  313. data/spec/views/admin/users/create.js.haml_spec.rb +2 -2
  314. data/spec/views/admin/users/destroy.js.haml_spec.rb +1 -1
  315. data/spec/views/admin/users/edit.js.haml_spec.rb +1 -1
  316. data/spec/views/admin/users/index.js.haml_spec.rb +1 -1
  317. data/spec/views/admin/users/new.js.haml_spec.rb +1 -1
  318. data/spec/views/admin/users/reactivate.js.haml_spec.rb +1 -1
  319. data/spec/views/admin/users/suspend.js.haml_spec.rb +1 -1
  320. data/spec/views/admin/users/update.js.haml_spec.rb +3 -3
  321. data/spec/views/campaigns/create.js.haml_spec.rb +4 -4
  322. data/spec/views/campaigns/destroy.js.haml_spec.rb +1 -1
  323. data/spec/views/campaigns/edit.js.haml_spec.rb +4 -4
  324. data/spec/views/campaigns/index.js.haml_spec.rb +2 -2
  325. data/spec/views/campaigns/new.js.haml_spec.rb +1 -1
  326. data/spec/views/campaigns/update.js.haml_spec.rb +7 -7
  327. data/spec/views/contacts/create.js.haml_spec.rb +4 -4
  328. data/spec/views/contacts/edit.js.haml_spec.rb +4 -4
  329. data/spec/views/contacts/index.js.html_spec.rb +2 -2
  330. data/spec/views/contacts/new.js.haml_spec.rb +2 -2
  331. data/spec/views/contacts/update.js.haml_spec.rb +11 -11
  332. data/spec/views/home/index.js.haml_spec.rb +1 -1
  333. data/spec/views/home/options.js.haml_spec.rb +3 -3
  334. data/spec/views/leads/convert.js.haml_spec.rb +3 -3
  335. data/spec/views/leads/create.js.haml_spec.rb +5 -5
  336. data/spec/views/leads/destroy.js.haml_spec.rb +1 -1
  337. data/spec/views/leads/edit.js.haml_spec.rb +4 -4
  338. data/spec/views/leads/index.js.haml_spec.rb +2 -2
  339. data/spec/views/leads/new.js.haml_spec.rb +1 -1
  340. data/spec/views/leads/promote.js.haml_spec.rb +13 -13
  341. data/spec/views/leads/reject.js.haml_spec.rb +6 -6
  342. data/spec/views/leads/update.js.haml_spec.rb +11 -11
  343. data/spec/views/opportunities/create.js.haml_spec.rb +4 -4
  344. data/spec/views/opportunities/destroy.js.haml_spec.rb +1 -1
  345. data/spec/views/opportunities/edit.js.haml_spec.rb +4 -4
  346. data/spec/views/opportunities/index.js.haml_spec.rb +2 -2
  347. data/spec/views/opportunities/update.js.haml_spec.rb +11 -11
  348. data/spec/views/tasks/complete.js.haml_spec.rb +5 -5
  349. data/spec/views/tasks/create.js.haml_spec.rb +13 -13
  350. data/spec/views/tasks/destroy.js.haml_spec.rb +3 -3
  351. data/spec/views/tasks/edit.js.haml_spec.rb +4 -4
  352. data/spec/views/tasks/new.js.haml_spec.rb +2 -2
  353. data/spec/views/tasks/uncomplete.js.haml_spec.rb +44 -0
  354. data/spec/views/tasks/update.js.haml_spec.rb +17 -17
  355. data/spec/views/users/avatar.js.haml_spec.rb +1 -1
  356. data/spec/views/users/change_password.js.haml_spec.rb +4 -4
  357. data/spec/views/users/edit.js.haml_spec.rb +1 -1
  358. data/spec/views/users/password.js.haml_spec.rb +2 -2
  359. data/spec/views/users/update.js.haml_spec.rb +5 -5
  360. data/spec/views/users/upload_avatar.js.haml_spec.rb +2 -2
  361. data/vendor/assets/javascripts/ajax-chosen.jquery.coffee +166 -76
  362. data/vendor/assets/javascripts/chosen.jquery.coffee +2 -2
  363. data/vendor/assets/javascripts/jquery_ui_datepicker/jquery-ui-timepicker-pt-BR.js +22 -0
  364. data/vendor/assets/javascripts/jquery_ui_datepicker/{jquery-ui-timepicker-sv.js → jquery-ui-timepicker-sv-SE.js} +0 -0
  365. data/vendor/assets/javascripts/jquery_ui_datepicker/jquery-ui-timepicker-th.js +19 -0
  366. data/vendor/assets/javascripts/jquery_ui_datepicker/jquery.ui.datepicker-fr-CA.js +21 -0
  367. data/vendor/assets/javascripts/jquery_ui_datepicker/jquery.ui.datepicker-pt.js +21 -0
  368. data/vendor/assets/javascripts/rating.js +2 -2
  369. metadata +101 -122
  370. data/app/assets/images/facebook-close.gif +0 -0
  371. data/app/assets/javascripts/crm.js +0 -495
  372. data/app/assets/javascripts/crm_classes.js +0 -218
  373. data/app/assets/javascripts/crm_fields.js +0 -34
  374. data/app/assets/javascripts/crm_loginout.js +0 -29
  375. data/app/assets/javascripts/crm_textarea_autocomplete.js +0 -32
  376. data/app/assets/javascripts/groups.js.coffee +0 -8
  377. data/app/assets/javascripts/jquery-noconflict.js +0 -6
  378. data/app/assets/javascripts/timeago.js +0 -17
  379. data/app/views/lists/_personal_sidebar.html.haml +0 -28
  380. data/lib/fat_free_crm/gem_ext/active_model/serializers/xml/serializer/attribute.rb +0 -17
  381. data/lib/fat_free_crm/gem_ext/authlogic/session/cookies.rb +0 -16
  382. data/lib/fat_free_crm/plugin_dependencies.rb +0 -12
  383. data/lib/plugins/country_select/MIT-LICENSE +0 -20
  384. data/lib/plugins/country_select/README +0 -14
  385. data/lib/plugins/country_select/init.rb +0 -1
  386. data/lib/plugins/country_select/install.rb +0 -2
  387. data/lib/plugins/country_select/uninstall.rb +0 -2
  388. data/lib/plugins/gravatar_image_tag/Gemfile +0 -8
  389. data/lib/plugins/gravatar_image_tag/README.textile +0 -108
  390. data/lib/plugins/gravatar_image_tag/ROADMAP.textile +0 -33
  391. data/lib/plugins/gravatar_image_tag/Rakefile +0 -50
  392. data/lib/plugins/gravatar_image_tag/VERSION +0 -1
  393. data/lib/plugins/gravatar_image_tag/gravatar_image_tag.gemspec +0 -45
  394. data/lib/plugins/gravatar_image_tag/init.rb +0 -2
  395. data/lib/plugins/gravatar_image_tag/spec/gravatar_image_tag_spec.rb +0 -83
  396. data/lib/plugins/gravatar_image_tag/spec/test_helper.rb +0 -12
  397. data/lib/tasks/db/migrate.rake +0 -66
  398. data/lib/tasks/db/schema.rake +0 -20
  399. data/vendor/assets/javascripts/ajax-chosen-prototype.js +0 -2
  400. data/vendor/assets/javascripts/ajax-chosen.proto.coffee +0 -98
  401. data/vendor/assets/javascripts/chosen-prototype.js +0 -3
  402. data/vendor/assets/javascripts/chosen.proto.coffee +0 -580
  403. data/vendor/assets/javascripts/event.simulate.js +0 -64
  404. data/vendor/assets/javascripts/facebooklist.js +0 -548
  405. data/vendor/assets/javascripts/facebooklist.simulate.js +0 -28
  406. data/vendor/assets/javascripts/modalbox.js +0 -506
  407. data/vendor/assets/stylesheets/facebooklist.css +0 -47
@@ -30,4 +30,19 @@ module OpportunitiesHelper
30
30
  end
31
31
  summary.compact.join(', ')
32
32
  end
33
+
34
+ # Generates a select list with the first 25 campaigns
35
+ # and prepends the currently selected campaign, if any.
36
+ #----------------------------------------------------------------------------
37
+ def opportunity_campaign_select(options = {})
38
+ options[:selected] ||= @opportunity.campaign_id || 0
39
+ selected_campaign = Campaign.find_by_id(options[:selected])
40
+ campaigns = ([selected_campaign] + Campaign.my.order(:name).limit(25)).compact.uniq
41
+ collection_select :opportunity, :campaign_id, campaigns, :id, :name, options,
42
+ {:"data-placeholder" => t(:select_a_campaign),
43
+ :"data-url" => auto_complete_campaigns_path(format: 'json'),
44
+ :style => "width:330px; display:none;",
45
+ :class => 'ajax_chosen' }
46
+ end
47
+
33
48
  end
@@ -0,0 +1,8 @@
1
+ module RemoteLinkPaginationHelper
2
+ class LinkRenderer < WillPaginate::ActionView::LinkRenderer
3
+ def link(text, target, attributes = {})
4
+ attributes['data-remote'] = true
5
+ super
6
+ end
7
+ end
8
+ end
@@ -22,8 +22,8 @@ module TagsHelper
22
22
 
23
23
  def tags_for_dashboard(model)
24
24
  content_tag(:ul) do
25
- model.tag_list.each do |tag|
26
- concat(content_tag(:li, tag))
25
+ model.tags.each do |tag|
26
+ concat(content_tag(:li, tag.name))
27
27
  end
28
28
  end.html_safe
29
29
  end
@@ -11,12 +11,13 @@ module TasksHelper
11
11
  def task_filter_checkbox(view, filter, count)
12
12
  name = "filter_by_task_#{view}"
13
13
  checked = (session[name] ? session[name].split(",").include?(filter.to_s) : count > 0)
14
- onclick = remote_function(
15
- :url => { :action => :filter, :view => view },
16
- :with => "'filter='+this.value+'&checked='+this.checked",
17
- :loading => "$('loading').show()",
18
- :complete => "$('loading').hide()"
19
- )
14
+ url = url_for(:action => :filter, :view => view)
15
+ onclick = %Q{
16
+ $('#loading').show();
17
+ $.post('#{url}', {filter: this.value, checked: this.checked}, function () {
18
+ $('#loading').hide();
19
+ });
20
+ }
20
21
  check_box_tag("filters[]", filter, checked, :onclick => onclick, :id => "filters_#{filter.to_s.underscore}")
21
22
  end
22
23
 
@@ -45,8 +46,14 @@ module TasksHelper
45
46
 
46
47
  #----------------------------------------------------------------------------
47
48
  def link_to_task_complete(pending, bucket)
48
- onclick = %Q/$("#{dom_id(pending, :name)}").style.textDecoration="line-through";/
49
- onclick << remote_function(:url => complete_task_path(pending), :method => :put, :with => "'bucket=#{bucket}'")
49
+ onclick = %Q{$("##{dom_id(pending, :name)}").css({textDecoration: "line-through"});}
50
+ onclick << %Q{$.ajax("#{complete_task_path(pending)}", {type: "PUT", data: {bucket: "#{bucket}"}});}
51
+ end
52
+
53
+ #----------------------------------------------------------------------------
54
+ def link_to_task_uncomplete(task, bucket)
55
+ link_to(t(:task_uncomplete), uncomplete_task_path(task, :bucket => bucket, :view => @view),
56
+ :method => :put, :remote => true)
50
57
  end
51
58
 
52
59
  # Task summary for RSS/ATOM feed.
@@ -79,8 +86,8 @@ module TasksHelper
79
86
 
80
87
  #----------------------------------------------------------------------------
81
88
  def hide_task_and_possibly_bucket(task, bucket)
82
- text = "jQuery('##{dom_id(task)}').remove();\n"
83
- text << "jQuery('#list_#{h bucket.to_s}').fadeOut({ duration:500 });\n" if Task.bucket_empty?(bucket, current_user, @view)
89
+ text = "$('##{dom_id(task)}').remove();\n"
90
+ text << "$('#list_#{h bucket.to_s}').fadeOut({ duration:500 });\n" if Task.bucket_empty?(bucket, current_user, @view)
84
91
  text.html_safe
85
92
  end
86
93
 
@@ -88,21 +95,21 @@ module TasksHelper
88
95
  def replace_content(task, bucket = nil)
89
96
  partial = (task.assigned_to && task.assigned_to != current_user.id) ? "assigned" : "pending"
90
97
  html = render(:partial => "tasks/#{partial}", :collection => [ task ], :locals => { :bucket => bucket })
91
- text = "jQuery('##{dom_id(task)}').html('#{ j html }');\n".html_safe
98
+ text = "$('##{dom_id(task)}').html('#{ j html }');\n".html_safe
92
99
  end
93
100
 
94
101
  #----------------------------------------------------------------------------
95
102
  def insert_content(task, bucket, view)
96
- text = "jQuery('#list_#{bucket}').show();\n".html_safe
103
+ text = "$('#list_#{bucket}').show();\n".html_safe
97
104
  html = render(:partial => view, :collection => [ task ], :locals => { :bucket => bucket })
98
- text << "jQuery('##{h bucket.to_s}').prepend('#{ j html }');\n".html_safe
99
- text << "jQuery('##{dom_id(task)}').effect('highlight', { duration:1500 });\n".html_safe
105
+ text << "$('##{h bucket.to_s}').prepend('#{ j html }');\n".html_safe
106
+ text << "$('##{dom_id(task)}').effect('highlight', { duration:1500 });\n".html_safe
100
107
  text
101
108
  end
102
109
 
103
110
  #----------------------------------------------------------------------------
104
111
  def tasks_flash(message)
105
- text = "jQuery('#flash').html('#{ message }');\n"
112
+ text = "$('#flash').html('#{ message }');\n"
106
113
  text << "crm.flash('notice', true)\n"
107
114
  text.html_safe
108
115
  end
@@ -17,7 +17,7 @@ module UsersHelper
17
17
  %Q[{ name: "#{language}", on_select: function() { #{redraw(:locale, [ locale, language ], url_for(:action => :redraw, :id => current_user))} } }]
18
18
  end
19
19
  end
20
-
20
+
21
21
  def all_users
22
22
  User.by_name
23
23
  end
@@ -26,7 +26,8 @@ module UsersHelper
26
26
  user_options = user_options_for_select(users, myself)
27
27
  select(asset, :assigned_to, user_options,
28
28
  { :include_blank => t(:unassigned) },
29
- { :style => "width:160px" })
29
+ { :style => "width:160px",
30
+ :class => 'select2' })
30
31
  end
31
32
 
32
33
  def user_options_for_select(users, myself)
@@ -10,7 +10,7 @@ class UserMailer < ActionMailer::Base
10
10
 
11
11
  mail :subject => "Fat Free CRM: " + I18n.t(:password_reset_instruction),
12
12
  :to => user.email,
13
- :from => "Fat Free CRM <noreply@fatfreecrm.com>",
13
+ :from => from_address,
14
14
  :date => Time.now
15
15
  end
16
16
 
@@ -21,8 +21,14 @@ class UserMailer < ActionMailer::Base
21
21
  @assigner_name = assigner.name
22
22
  mail :subject => "Fat Free CRM: You have been assigned #{@entity_name} #{@entity_type}",
23
23
  :to => entity.assignee.email,
24
- :from => "Fat Free CRM <notifications@fatfreecrm.com>"
24
+ :from => from_address
25
25
  end
26
26
 
27
- end
27
+ private
28
+
29
+ def from_address
30
+ from = Setting.smtp[:from]
31
+ !from.blank? ? from : "Fat Free CRM <noreply@fatfreecrm.com>"
32
+ end
28
33
 
34
+ end
@@ -21,7 +21,7 @@ class AccountContact < ActiveRecord::Base
21
21
 
22
22
  has_paper_trail :meta => { :related => :contact }, :ignore => [ :id, :created_at, :updated_at, :contact_id ]
23
23
 
24
- validates_presence_of :account_id, :contact_id
24
+ validates_presence_of :account_id
25
25
 
26
26
  ActiveSupport.run_load_hooks(:fat_free_crm_account_contact, self)
27
27
  end
@@ -136,7 +136,7 @@ class CustomField < Field
136
136
  ransack: {attributes: {klass.model_name.singular => {name => label}}}
137
137
  })
138
138
  # Reset Ransack cache
139
- Ransack::Helpers::FormBuilder.cached_searchable_attributes_for_base = {}
139
+ # Ransack::Helpers::FormBuilder.cached_searchable_attributes_for_base = {}
140
140
  end
141
141
 
142
142
  # Change database column type only if safe to do so
@@ -5,6 +5,7 @@
5
5
  #------------------------------------------------------------------------------
6
6
  class List < ActiveRecord::Base
7
7
  validates_presence_of :name
8
+ validates_presence_of :url
8
9
  belongs_to :user
9
10
 
10
11
  # Parses the controller from the url
@@ -19,7 +19,14 @@ class EntityObserver < ActiveRecord::Observer
19
19
  private
20
20
 
21
21
  def send_notification_to_assignee(item)
22
- UserMailer.assigned_entity_notification(item, current_user).deliver if item.assignee.present? && current_user.present?
22
+ if item.assignee.present? && current_user.present? && can_send_email?
23
+ UserMailer.assigned_entity_notification(item, current_user).deliver
24
+ end
25
+ end
26
+
27
+ # Need to have a host set before email can be sent
28
+ def can_send_email?
29
+ Setting.host.present?
23
30
  end
24
31
 
25
32
  def current_user
@@ -31,4 +38,6 @@ class EntityObserver < ActiveRecord::Observer
31
38
  User.find_by_id(user_id_or_user.to_i)
32
39
  end
33
40
  end
41
+
42
+ ActiveSupport.run_load_hooks(:fat_free_crm_entity_observer, self)
34
43
  end
@@ -24,4 +24,6 @@ class LeadObserver < ActiveRecord::Observer
24
24
  def log_activity(item, event)
25
25
  item.send(item.class.versions_association_name).create(:event => event, :whodunnit => PaperTrail.whodunnit)
26
26
  end
27
+
28
+ ActiveSupport.run_load_hooks(:fat_free_crm_lead_observer, self)
27
29
  end
@@ -42,4 +42,6 @@ class OpportunityObserver < ActiveRecord::Observer
42
42
  def update_campaign_revenue(campaign, revenue)
43
43
  campaign.update_attribute(:revenue, (campaign.revenue || 0) + revenue) if campaign
44
44
  end
45
+
46
+ ActiveSupport.run_load_hooks(:fat_free_crm_opportunity_observer, self)
45
47
  end
@@ -26,4 +26,6 @@ class TaskObserver < ActiveRecord::Observer
26
26
  def log_activity(item, event)
27
27
  item.send(item.class.versions_association_name).create(:event => event, :whodunnit => PaperTrail.whodunnit)
28
28
  end
29
+
30
+ ActiveSupport.run_load_hooks(:fat_free_crm_task_observer, self)
29
31
  end
@@ -36,6 +36,8 @@ class Avatar < ActiveRecord::Base
36
36
  end
37
37
  end
38
38
  has_attached_file :image, :styles => STYLES.dup, :url => "/avatars/:entity_type/:id/:style_:filename", :default_url => "/assets/avatar.jpg"
39
+ validates_attachment :image, :presence => true,
40
+ :content_type => { :content_type => %w(image/jpeg image/jpg image/png image/gif) }
39
41
 
40
42
  # Convert STYLE symbols to 'w x h' format for Gravatar and Rails
41
43
  # e.g. Avatar.size_from_style(:size => :large) -> '75x75'
@@ -44,7 +44,6 @@ class Comment < ActiveRecord::Base
44
44
 
45
45
  # Notify subscribed users when a comment is added, unless user created this comment
46
46
  def notify_subscribers
47
- return unless Rails.application.config.action_mailer.smtp_settings.present?
48
47
  commentable.subscribed_users.reject{|user_id| user_id == user.id}.each do |subscriber_id|
49
48
  if subscriber = User.find_by_id(subscriber_id)
50
49
  SubscriptionMailer.comment_notification(subscriber, self).deliver
@@ -144,9 +144,7 @@ class Task < ActiveRecord::Base
144
144
  # set by Time.now.end_of_week.
145
145
  #----------------------------------------------------------------------------
146
146
  def at_specific_time?
147
- self.due_at &&
148
- (self.due_at.hour != 0 || self.due_at.min != 0 || self.due_at.sec != 0) &&
149
- (self.due_at.hour != 23 && self.due_at.min != 59 && self.due_at.sec != 59)
147
+ self.due_at.present? && !due_end_of_day? && !due_beginning_of_day?
150
148
  end
151
149
 
152
150
  # Convert specific due_date to "due_today", "due_tomorrow", etc. bucket name.
@@ -154,21 +152,20 @@ class Task < ActiveRecord::Base
154
152
  def computed_bucket
155
153
  return self.bucket if self.bucket != "specific_time"
156
154
  case
157
- when self.due_at < Time.zone.now.midnight
155
+ when overdue?
158
156
  "overdue"
159
- when self.due_at >= Time.zone.now.midnight && self.due_at < Time.zone.now.midnight.tomorrow
157
+ when due_today?
160
158
  "due_today"
161
- when self.due_at >= Time.zone.now.midnight.tomorrow && self.due_at < Time.zone.now.midnight.tomorrow + 1.day
159
+ when due_tomorrow?
162
160
  "due_tomorrow"
163
- when self.due_at >= (Time.zone.now.midnight.tomorrow + 1.day) && self.due_at < Time.zone.now.next_week
161
+ when due_this_week? && !due_today? && !due_tomorrow?
164
162
  "due_this_week"
165
- when self.due_at >= Time.zone.now.next_week && self.due_at < (Time.zone.now.next_week.end_of_week + 1.day)
163
+ when due_next_week?
166
164
  "due_next_week"
167
165
  else
168
166
  "due_later"
169
167
  end
170
168
  end
171
-
172
169
  # Returns list of tasks grouping them by due date as required by tasks/index.
173
170
  #----------------------------------------------------------------------------
174
171
  def self.find_all_grouped(user, view)
@@ -227,6 +224,41 @@ class Task < ActiveRecord::Base
227
224
  end
228
225
  end
229
226
 
227
+ #----------------------------------------------------------------------------
228
+ def due_end_of_day?
229
+ self.due_at.present? && (self.due_at == self.due_at.end_of_day)
230
+ end
231
+
232
+ #----------------------------------------------------------------------------
233
+ def due_beginning_of_day?
234
+ self.due_at.present? && (self.due_at == self.due_at.beginning_of_day)
235
+ end
236
+
237
+ #----------------------------------------------------------------------------
238
+ def overdue?
239
+ self.due_at < Time.zone.now.midnight
240
+ end
241
+
242
+ #----------------------------------------------------------------------------
243
+ def due_today?
244
+ self.due_at.between?(Time.zone.now.midnight, Time.zone.now.end_of_day)
245
+ end
246
+
247
+ #----------------------------------------------------------------------------
248
+ def due_tomorrow?
249
+ self.due_at.between?(Time.zone.now.midnight.tomorrow, Time.zone.now.tomorrow.end_of_day)
250
+ end
251
+
252
+ #----------------------------------------------------------------------------
253
+ def due_this_week?
254
+ self.due_at.between?(Time.zone.now.beginning_of_week, Time.zone.now.end_of_week)
255
+ end
256
+
257
+ #----------------------------------------------------------------------------
258
+ def due_next_week?
259
+ self.due_at.between?(Time.zone.now.next_week, Time.zone.now.next_week.end_of_week)
260
+ end
261
+
230
262
  #----------------------------------------------------------------------------
231
263
  def notify_assignee
232
264
  if self.assigned_to
@@ -23,6 +23,7 @@ class Ability
23
23
  can :create, Task
24
24
  can :manage, Task, user: user.id
25
25
  can :manage, Task, assigned_to: user.id
26
+ can :manage, Task, completed_by: user.id
26
27
 
27
28
  # Entities
28
29
  can :manage, entities, :access => 'Public'
@@ -11,10 +11,5 @@ class Group < ActiveRecord::Base
11
11
 
12
12
  validates :name, :presence => true, :uniqueness => true
13
13
 
14
- # TODO: Fix chosen bug that makes this necessary
15
- def user_ids=(value)
16
- super value.join.split(',')
17
- end
18
-
19
14
  ActiveSupport.run_load_hooks(:fat_free_crm_group, self)
20
15
  end
@@ -139,13 +139,6 @@ class User < ActiveRecord::Base
139
139
  self.single_access_token ||= update_attribute(:single_access_token, Authlogic::Random.friendly_token)
140
140
  end
141
141
 
142
- # Massage value when using Chosen select box which gives values like ["", "1,2,3"]
143
- #----------------------------------------------------------------------------
144
- def group_ids=(value)
145
- value = value.join.split(',').map(&:to_i) if value.map{|v| v.to_s.include?(',')}.any?
146
- super(value)
147
- end
148
-
149
142
  def to_json(options = nil)
150
143
  [name].to_json
151
144
  end
@@ -10,6 +10,7 @@
10
10
  = render "accounts/contact_info", :f => f, :edit => true
11
11
  = render "fields/groups", :f => f, :edit => true
12
12
  = render "entities/permissions", :f => f, :edit => true, :entity => @account
13
+ = hook(:entity_form, self, {f: f, entity: @account}) {}
13
14
 
14
15
  .buttonbar
15
16
  - if Setting.compound_address
@@ -6,7 +6,7 @@
6
6
  .strip{:style => "color: gray;"} #{t :other}
7
7
 
8
8
  %ul.tools
9
- = hook(:account_tools_before, self, :account => account)
9
+ = hook(:account_tools_before, self, :account => account) {}
10
10
 
11
11
  - if can?(:update, account)
12
12
  %li= link_to_edit(account)
@@ -29,4 +29,4 @@
29
29
  = t('pluralize.contact', account.contacts.count) << " | "
30
30
  = t('pluralize.opportunity', account.opportunities.count)
31
31
 
32
- = hook(:account_bottom, self, :account => account)
32
+ = hook(:account_bottom, self, :account => account) {}
@@ -6,7 +6,7 @@
6
6
  .strip{:style => "color: gray;"} #{t :other}
7
7
 
8
8
  %ul.tools
9
- = hook(:account_tools_before, self, :account => account)
9
+ = hook(:account_tools_before, self, :account => account) {}
10
10
 
11
11
  - if can?(:update, account)
12
12
  %li= link_to_edit(account)
@@ -39,4 +39,4 @@
39
39
  %dt
40
40
  .tags= tags_for_index(account)
41
41
 
42
- = hook(:account_bottom, self, :account => account)
42
+ = hook(:account_bottom, self, :account => account) {}
@@ -10,6 +10,7 @@
10
10
  = render "accounts/contact_info", :f => f
11
11
  = render "fields/groups", :f => f
12
12
  = render "entities/permissions", :f => f, :entity => @account
13
+ = hook(:entity_form, self, {f: f, entity: @account}) {}
13
14
 
14
15
  .buttonbar
15
16
  - if Setting.compound_address
@@ -17,4 +17,4 @@
17
17
  %div{:style => "float:right;"}
18
18
  %b= @account_category_total[:all]
19
19
  %b #{t :total_accounts}
20
- = hook(:index_account_sidebar_bottom, self)
20
+ = hook(:index_account_sidebar_bottom, self) {}
@@ -54,4 +54,4 @@
54
54
  %dt
55
55
  .tags= tags_for_index(@account)
56
56
 
57
- = hook(:show_account_sidebar_bottom, self, :account => @account)
57
+ = hook(:show_account_sidebar_bottom, self, :account => @account) {}
@@ -26,4 +26,4 @@
26
26
 
27
27
  = render :partial => "/shared/tags", :locals => {:f => f, :span => 3}
28
28
 
29
- = hook(:account_top_section_bottom, self, :f => f)
29
+ = hook(:account_top_section_bottom, self, :f => f) {}
@@ -3,15 +3,15 @@
3
3
  - create_id = "create_#{entity_name}" # create_account
4
4
 
5
5
  - if @entity.valid?
6
- jQuery('##{create_id}_arrow').html(crm.COLLAPSED);
7
- jQuery('##{create_id}_title').html('#{ j t(entity_name.pluralize) }');
8
- jQuery('##{create_id}').slideUp(250);
9
- jQuery('##{entity_name.pluralize}').prepend('#{ j render(:partial => entity_name, :collection => [ @entity ]) }');
10
- jQuery('##{dom_id(@entity)}').effect("highlight", { duration:1500 });
6
+ $('##{create_id}_arrow').html(crm.COLLAPSED);
7
+ $('##{create_id}_title').html('#{ j t(entity_name.pluralize) }');
8
+ $('##{create_id}').slideUp(250);
9
+ $('##{entity_name.pluralize}').prepend('#{ j render(:partial => entity_name, :collection => [ @entity ]) }');
10
+ $('##{dom_id(@entity)}').effect("highlight", { duration:1500 });
11
11
  = refresh_sidebar(:index, :filters)
12
- jQuery('#paginate').html('#{ j render(:partial => "shared/paginate_with_per_page") }');
12
+ $('#paginate').html('#{ j render(:partial => "shared/paginate_with_per_page") }');
13
13
  crm.flick('empty', 'remove');
14
14
  - else
15
- jQuery('##{create_id}').html('#{ j render(:partial => "new") }');
16
- jQuery('##{create_id}').effect("shake", { duration:250, distance: 6 });
17
- jQuery('#new_#{entity_name} input[type!=hidden]').first().focus();
15
+ $('##{create_id}').html('#{ j render(:partial => "new") }');
16
+ $('##{create_id}').effect("shake", { duration:250, distance: 6 });
17
+ $('#new_#{entity_name} input[type!=hidden]').first().focus();