fat_free_crm 0.19.2 → 0.20.0
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 +4 -4
- data/.github/workflows/brakeman-analysis.yml +46 -0
- data/.github/workflows/rubocop-analysis.yml +40 -0
- data/.github/workflows/ruby.yml +52 -0
- data/.rubocop_todo.yml +49 -43
- data/.travis.yml +1 -20
- data/CHANGELOG.md +13 -0
- data/Gemfile +9 -5
- data/Gemfile.lock +163 -119
- data/README.md +4 -3
- data/SECURITY.md +11 -0
- data/app/assets/javascripts/application.js.erb +3 -0
- data/app/assets/stylesheets/application.css.erb +1 -0
- data/app/assets/stylesheets/base.scss +9 -2
- data/app/assets/stylesheets/bootstrap-custom.scss +206 -0
- data/app/assets/stylesheets/common.scss +87 -67
- data/app/assets/stylesheets/header.scss +0 -8
- data/app/controllers/admin/field_groups_controller.rb +1 -1
- data/app/controllers/admin/fields_controller.rb +1 -1
- data/app/controllers/admin/groups_controller.rb +1 -1
- data/app/controllers/admin/tags_controller.rb +2 -2
- data/app/controllers/admin/users_controller.rb +2 -1
- data/app/controllers/application_controller.rb +10 -0
- data/app/controllers/comments_controller.rb +1 -1
- data/app/controllers/entities/accounts_controller.rb +1 -1
- data/app/controllers/entities/campaigns_controller.rb +1 -1
- data/app/controllers/home_controller.rb +3 -1
- data/app/controllers/lists_controller.rb +1 -1
- data/app/controllers/tasks_controller.rb +3 -3
- data/app/controllers/users_controller.rb +3 -1
- data/app/helpers/accounts_helper.rb +12 -0
- data/app/helpers/application_helper.rb +3 -5
- data/app/helpers/tasks_helper.rb +2 -2
- data/app/models/entities/account.rb +1 -1
- data/app/models/entities/account_contact.rb +1 -1
- data/app/models/entities/account_opportunity.rb +1 -1
- data/app/models/entities/campaign.rb +1 -1
- data/app/models/entities/contact.rb +1 -1
- data/app/models/entities/lead.rb +1 -1
- data/app/models/entities/opportunity.rb +1 -1
- data/app/models/fields/custom_field_pair.rb +2 -2
- data/app/models/observers/opportunity_observer.rb +1 -1
- data/app/models/polymorphic/address.rb +1 -1
- data/app/models/polymorphic/comment.rb +1 -1
- data/app/models/polymorphic/email.rb +1 -1
- data/app/models/polymorphic/task.rb +1 -1
- data/app/models/setting.rb +4 -2
- data/app/models/users/preference.rb +2 -2
- data/app/models/users/user.rb +2 -2
- data/app/views/accounts/_edit.html.haml +2 -2
- data/app/views/accounts/_new.html.haml +2 -2
- data/app/views/accounts/_sidebar_index.html.haml +2 -2
- data/app/views/accounts/_sidebar_show.html.haml +19 -19
- data/app/views/accounts/create.js.haml +1 -2
- data/app/views/accounts/destroy.js.haml +1 -1
- data/app/views/accounts/show.html.haml +1 -0
- data/app/views/accounts/update.js.haml +2 -3
- data/app/views/admin/field_groups/create.js.haml +0 -1
- data/app/views/admin/field_groups/destroy.js.haml +0 -1
- data/app/views/admin/field_groups/update.js.haml +0 -1
- data/app/views/admin/fields/create.js.haml +0 -1
- data/app/views/admin/fields/destroy.js.haml +0 -1
- data/app/views/admin/fields/update.js.haml +0 -1
- data/app/views/admin/groups/create.js.haml +0 -1
- data/app/views/admin/groups/destroy.js.haml +0 -1
- data/app/views/admin/groups/update.js.haml +0 -1
- data/app/views/admin/tags/create.js.haml +0 -1
- data/app/views/admin/tags/destroy.js.haml +0 -1
- data/app/views/admin/tags/update.js.haml +0 -1
- data/app/views/admin/users/create.js.haml +0 -1
- data/app/views/admin/users/destroy.js.haml +0 -1
- data/app/views/admin/users/update.js.haml +0 -1
- data/app/views/campaigns/_edit.html.haml +1 -1
- data/app/views/campaigns/_new.html.haml +1 -1
- data/app/views/campaigns/_sidebar_index.html.haml +2 -2
- data/app/views/campaigns/_sidebar_show.html.haml +68 -67
- data/app/views/campaigns/create.js.haml +1 -2
- data/app/views/campaigns/destroy.js.haml +1 -1
- data/app/views/campaigns/show.html.haml +1 -0
- data/app/views/campaigns/update.js.haml +3 -4
- data/app/views/comments/_edit.html.haml +1 -1
- data/app/views/comments/_new.html.haml +1 -1
- data/app/views/comments/update.js.haml +0 -1
- data/app/views/contacts/_edit.html.haml +1 -1
- data/app/views/contacts/_new.html.haml +1 -1
- data/app/views/contacts/_sidebar_show.html.haml +18 -18
- data/app/views/contacts/create.js.haml +0 -1
- data/app/views/contacts/destroy.js.haml +1 -1
- data/app/views/contacts/show.html.haml +1 -0
- data/app/views/contacts/update.js.haml +2 -3
- data/app/views/entities/_title_bar.html.haml +1 -1
- data/app/views/entities/attach.js.haml +2 -2
- data/app/views/entities/discard.js.haml +2 -2
- data/app/views/home/_opportunity.html.haml +1 -1
- data/app/views/home/_task.html.haml +1 -1
- data/app/views/home/index.xls.builder +51 -0
- data/app/views/layouts/_sidebar.html.haml +2 -2
- data/app/views/layouts/_tabbed.html.haml +14 -11
- data/app/views/layouts/application.html.haml +2 -2
- data/app/views/leads/_edit.html.haml +2 -2
- data/app/views/leads/_new.html.haml +2 -2
- data/app/views/leads/_sidebar_index.html.haml +2 -2
- data/app/views/leads/_sidebar_show.html.haml +30 -30
- data/app/views/leads/create.js.haml +2 -3
- data/app/views/leads/destroy.js.haml +2 -2
- data/app/views/leads/promote.js.haml +3 -4
- data/app/views/leads/reject.js.haml +3 -3
- data/app/views/leads/show.html.haml +1 -1
- data/app/views/leads/update.js.haml +4 -5
- data/app/views/lists/create.js.haml +0 -1
- data/app/views/opportunities/_edit.html.haml +1 -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 +1 -1
- data/app/views/opportunities/_sidebar_index.html.haml +2 -2
- data/app/views/opportunities/_sidebar_show.html.haml +47 -46
- data/app/views/opportunities/create.js.haml +3 -4
- data/app/views/opportunities/destroy.js.haml +3 -3
- data/app/views/opportunities/show.html.haml +1 -0
- data/app/views/opportunities/update.js.haml +5 -6
- data/app/views/shared/_inline_styles.html.haml +0 -26
- data/app/views/tasks/_assigned.html.haml +1 -1
- data/app/views/tasks/_completed.html.haml +1 -1
- data/app/views/tasks/_edit.html.haml +1 -1
- data/app/views/tasks/_new.html.haml +1 -1
- data/app/views/tasks/_pending.html.haml +1 -1
- data/app/views/tasks/_related.html.haml +1 -1
- data/app/views/tasks/_selector.html.haml +7 -8
- data/app/views/tasks/_sidebar_index.html.haml +2 -2
- data/app/views/tasks/_title.html.haml +1 -1
- data/app/views/tasks/complete.js.haml +1 -1
- data/app/views/tasks/create.js.haml +1 -2
- data/app/views/tasks/destroy.js.haml +1 -1
- data/app/views/tasks/uncomplete.js.haml +1 -2
- data/app/views/tasks/update.js.haml +0 -1
- data/app/views/users/change_password.js.haml +0 -1
- data/app/views/users/update.js.haml +0 -1
- data/app/views/users/upload_avatar.js.haml +0 -1
- data/app/views/versions/_version_item.html.haml +1 -1
- data/bin/setup +6 -6
- data/config/application.rb +1 -1
- data/config/environment.rb +1 -1
- data/config/initializers/content_security_policy.rb +5 -0
- data/config/initializers/new_framework_defaults_6_0.rb +46 -0
- data/config/initializers/simple_form.rb +135 -55
- data/config/initializers/simple_form_bootstrap.rb +433 -0
- data/config/locales/fat_free_crm.cs.yml +86 -47
- data/config/locales/fat_free_crm.ru.yml +1 -0
- data/config/settings.default.yml +0 -41
- data/db/migrate/20200806004152_add_pattern_to_fields.rb +7 -0
- data/db/migrate/20200806004459_add_html5_to_fields.rb +10 -0
- data/db/schema.rb +11 -6
- data/fat_free_crm.gemspec +4 -4
- data/lib/fat_free_crm/core_ext.rb +1 -1
- data/lib/fat_free_crm/gem_ext.rb +0 -1
- data/lib/fat_free_crm/tabs.rb +2 -2
- data/lib/fat_free_crm/version.rb +2 -2
- data/lib/gravatar_image_tag.rb +1 -1
- data/lib/tasks/ffcrm/preference_update.rake +19 -0
- data/lib/tasks/ffcrm/setup.rake +1 -1
- data/lib/templates/erb/scaffold/_form.html.erb +4 -2
- data/spec/controllers/comments_controller_spec.rb +6 -6
- data/spec/controllers/home_controller_spec.rb +3 -3
- data/spec/controllers/users_controller_spec.rb +13 -1
- data/spec/factories/user_factories.rb +5 -2
- data/spec/features/acceptance_helper.rb +1 -1
- data/spec/features/accounts_spec.rb +2 -2
- data/spec/features/admin/groups_spec.rb +1 -1
- data/spec/features/admin/users_spec.rb +1 -1
- data/spec/features/campaigns_spec.rb +2 -2
- data/spec/features/contacts_spec.rb +2 -5
- data/spec/features/leads_spec.rb +11 -7
- data/spec/features/opportunities_spec.rb +4 -4
- data/spec/features/support/browser.rb +6 -2
- data/spec/features/support/selector_helpers.rb +10 -1
- data/spec/features/tasks_spec.rb +6 -6
- data/spec/helpers/accounts_helper_spec.rb +57 -0
- data/spec/models/entities/opportunity_spec.rb +2 -2
- data/spec/models/fields/custom_field_pair_spec.rb +2 -2
- data/spec/models/observers/entity_observer_spec.rb +3 -3
- data/spec/models/polymorphic/task_spec.rb +11 -11
- data/spec/models/polymorphic/version_spec.rb +2 -2
- data/spec/models/users/preference_spec.rb +1 -1
- data/spec/views/accounts/_edit.haml_spec.rb +1 -1
- data/spec/views/accounts/_new.haml_spec.rb +1 -1
- data/spec/views/accounts/create.js.haml_spec.rb +0 -1
- data/spec/views/accounts/update.js.haml_spec.rb +2 -5
- data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -1
- data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -1
- data/spec/views/admin/users/create.js.haml_spec.rb +0 -1
- data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -6
- data/spec/views/admin/users/update.js.haml_spec.rb +1 -2
- data/spec/views/campaigns/_edit.haml_spec.rb +1 -1
- data/spec/views/campaigns/_new.haml_spec.rb +1 -1
- data/spec/views/campaigns/create.js.haml_spec.rb +0 -1
- data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -1
- data/spec/views/campaigns/update.js.haml_spec.rb +2 -6
- data/spec/views/contacts/_edit.haml_spec.rb +1 -1
- data/spec/views/contacts/_new.haml_spec.rb +1 -1
- data/spec/views/contacts/create.js.haml_spec.rb +0 -1
- data/spec/views/contacts/update.js.haml_spec.rb +3 -7
- data/spec/views/home/index.haml_spec.rb +2 -2
- data/spec/views/leads/_edit.haml_spec.rb +1 -1
- data/spec/views/leads/_new.haml_spec.rb +1 -1
- data/spec/views/leads/create.js.haml_spec.rb +0 -3
- data/spec/views/leads/destroy.js.haml_spec.rb +0 -2
- data/spec/views/leads/promote.js.haml_spec.rb +3 -11
- data/spec/views/leads/reject.js.haml_spec.rb +0 -3
- data/spec/views/leads/update.js.haml_spec.rb +3 -11
- data/spec/views/opportunities/_edit.haml_spec.rb +1 -1
- data/spec/views/opportunities/_new.haml_spec.rb +1 -1
- data/spec/views/opportunities/create.js.haml_spec.rb +0 -2
- data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -3
- data/spec/views/opportunities/update.js.haml_spec.rb +3 -11
- data/spec/views/tasks/_edit.haml_spec.rb +1 -1
- data/spec/views/tasks/complete.js.haml_spec.rb +0 -1
- data/spec/views/tasks/create.js.haml_spec.rb +0 -2
- data/spec/views/tasks/destroy.js.haml_spec.rb +0 -1
- data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -1
- data/spec/views/tasks/update.js.haml_spec.rb +1 -4
- data/spec/views/users/change_password.js.haml_spec.rb +1 -2
- data/spec/views/users/update.js.haml_spec.rb +1 -2
- data/spec/views/users/upload_avatar.js.haml_spec.rb +1 -2
- metadata +23 -14
- data/config/initializers/new_framework_defaults_5_2.rb +0 -40
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +0 -24
@@ -0,0 +1,206 @@
|
|
1
|
+
// Custom.scss
|
2
|
+
// Option B: Include parts of Bootstrap
|
3
|
+
|
4
|
+
// 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
|
5
|
+
@import "bootstrap/functions";
|
6
|
+
|
7
|
+
// 2. Include any default variable overrides here
|
8
|
+
|
9
|
+
$bg_color1: #05668D;
|
10
|
+
$bg_color2: #028090;
|
11
|
+
$bg_color3: #00A896;
|
12
|
+
$bg_color4: #02C39A;
|
13
|
+
$bg_color5: #2A9D8F;
|
14
|
+
$bg_color6: #B4A6AB;
|
15
|
+
$bg_color7: #946E83;
|
16
|
+
$bg_color8: #615055;
|
17
|
+
$bg_color9: #FFDD4A;
|
18
|
+
|
19
|
+
$theme-colors: (
|
20
|
+
"primary": #05668D,
|
21
|
+
"secondary": #028090,
|
22
|
+
"success": #00A896,
|
23
|
+
"info": #02C39A,
|
24
|
+
"warning": #2A9D8F,
|
25
|
+
"danger": #B4A683,
|
26
|
+
"light": #615055,
|
27
|
+
"dark": #FFDD4A
|
28
|
+
);
|
29
|
+
|
30
|
+
$btn-padding-y: 0.375;
|
31
|
+
$btn-padding-x: 0.75;
|
32
|
+
$btn-font-size: '0.9rem';
|
33
|
+
|
34
|
+
// 3. Include remainder of required Bootstrap stylesheets
|
35
|
+
@import "bootstrap/variables";
|
36
|
+
@import "bootstrap/mixins";
|
37
|
+
|
38
|
+
// 4. Include any optional Bootstrap components as you like
|
39
|
+
|
40
|
+
@import "bootstrap/root";
|
41
|
+
// @import "bootstrap/reboot";
|
42
|
+
// @import "bootstrap/type";
|
43
|
+
|
44
|
+
@import "bootstrap/images";
|
45
|
+
@import "bootstrap/containers";
|
46
|
+
@import "bootstrap/grid";
|
47
|
+
@import "bootstrap/tables";
|
48
|
+
@import "bootstrap/forms";
|
49
|
+
@import "bootstrap/buttons";
|
50
|
+
@import "bootstrap/transitions";
|
51
|
+
@import "bootstrap/dropdown";
|
52
|
+
@import "bootstrap/button-group";
|
53
|
+
@import "bootstrap/nav";
|
54
|
+
@import "bootstrap/navbar";
|
55
|
+
@import "bootstrap/card";
|
56
|
+
@import "bootstrap/accordion";
|
57
|
+
@import "bootstrap/breadcrumb";
|
58
|
+
@import "bootstrap/pagination";
|
59
|
+
@import "bootstrap/badge";
|
60
|
+
@import "bootstrap/alert";
|
61
|
+
@import "bootstrap/progress";
|
62
|
+
@import "bootstrap/list-group";
|
63
|
+
@import "bootstrap/close";
|
64
|
+
@import "bootstrap/toasts";
|
65
|
+
@import "bootstrap/modal";
|
66
|
+
@import "bootstrap/tooltip";
|
67
|
+
@import "bootstrap/popover";
|
68
|
+
@import "bootstrap/carousel";
|
69
|
+
@import "bootstrap/spinners";
|
70
|
+
@import "bootstrap/offcanvas";
|
71
|
+
|
72
|
+
// Helpers
|
73
|
+
@import "bootstrap/helpers";
|
74
|
+
|
75
|
+
// Utilities
|
76
|
+
$utilities: ();
|
77
|
+
@import "bootstrap/utilities/api";
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
// 5. Add additional custom code here
|
82
|
+
|
83
|
+
// Used on tasks#index as the selector component
|
84
|
+
.nav-sm .nav-link {
|
85
|
+
padding: 0.25rem 0.5rem;
|
86
|
+
}
|
87
|
+
|
88
|
+
// Application grid
|
89
|
+
#primary-application-pane {
|
90
|
+
@extend .container-fluid;
|
91
|
+
width: auto;
|
92
|
+
|
93
|
+
.sidebar {
|
94
|
+
@extend .col-2;
|
95
|
+
// @extend .g-2;
|
96
|
+
|
97
|
+
.panel {
|
98
|
+
}
|
99
|
+
}
|
100
|
+
.main {
|
101
|
+
// Same as .col=9
|
102
|
+
flex: 0 0 auto;
|
103
|
+
width: 75%;
|
104
|
+
}
|
105
|
+
|
106
|
+
#summary.panel {
|
107
|
+
dl {
|
108
|
+
display: flex;
|
109
|
+
flex-flow: row wrap;
|
110
|
+
align-items: flex-start;
|
111
|
+
|
112
|
+
li {
|
113
|
+
display: flex;
|
114
|
+
width: 12%;
|
115
|
+
margin-right: 1rem;
|
116
|
+
flex-direction: column-reverse;
|
117
|
+
|
118
|
+
vertical-align: top;
|
119
|
+
dt { float: none; width: 100%; }
|
120
|
+
tt { width: 100%; }
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
// Navbar
|
126
|
+
.navbar-toggler-icon {
|
127
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
128
|
+
}
|
129
|
+
button.navbar-toggler:focus {
|
130
|
+
box-shadow: none !important;
|
131
|
+
}
|
132
|
+
@include media-breakpoint-down(lg) {
|
133
|
+
.navbar.tabs {
|
134
|
+
li {
|
135
|
+
a:link, a:visited {
|
136
|
+
background-color: transparent;
|
137
|
+
}
|
138
|
+
i { display: none; }
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
// On mobile, reverse the order of our content
|
143
|
+
#primary-application-pane {
|
144
|
+
.row:first-child {
|
145
|
+
flex-direction: column-reverse !important;
|
146
|
+
}
|
147
|
+
|
148
|
+
.main {
|
149
|
+
width: 90%;
|
150
|
+
margin: auto;
|
151
|
+
}
|
152
|
+
.sidebar {
|
153
|
+
width: 90%;
|
154
|
+
margin: auto;
|
155
|
+
display: flex;
|
156
|
+
align-items: stretch;
|
157
|
+
}
|
158
|
+
|
159
|
+
.sidebar #filters, .sidebar #lists, .sidebar #recently, .sidebar #summary {
|
160
|
+
margin-right: 2%;
|
161
|
+
width: 30%;
|
162
|
+
}
|
163
|
+
|
164
|
+
#summary.panel {
|
165
|
+
dl {
|
166
|
+
li {
|
167
|
+
width: 23%;
|
168
|
+
font-size: 2rem;
|
169
|
+
dt {
|
170
|
+
font-size: inherit;
|
171
|
+
}
|
172
|
+
tt {
|
173
|
+
font-size: inherit;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
|
181
|
+
// For now, clip excess page until we tweak the layout properly
|
182
|
+
body {
|
183
|
+
overflow-x: clip;
|
184
|
+
}
|
185
|
+
#search {
|
186
|
+
.tabs { @extend .row; }
|
187
|
+
|
188
|
+
ul {
|
189
|
+
@extend .col;
|
190
|
+
}
|
191
|
+
li {
|
192
|
+
display: inline-block;
|
193
|
+
}
|
194
|
+
#search_results_count {
|
195
|
+
@extend .col;
|
196
|
+
text-align: right;
|
197
|
+
width: 98%;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
// ransack_ui_search renders in older bootstrap, so adding padding fixes a few visual glitches
|
202
|
+
#advanced_search {
|
203
|
+
.row {
|
204
|
+
padding-right: 1.5rem;
|
205
|
+
}
|
206
|
+
}
|
@@ -10,7 +10,7 @@ $sidebar_width: 210px;
|
|
10
10
|
// Common page elements.
|
11
11
|
//------------------------------------------------------------------------------
|
12
12
|
.title {
|
13
|
-
border-bottom: 1px
|
13
|
+
border-bottom: 1px #eee solid;
|
14
14
|
color: $color_title;
|
15
15
|
font: {
|
16
16
|
size: 17px;
|
@@ -22,7 +22,6 @@ $sidebar_width: 210px;
|
|
22
22
|
top: 2px; } }
|
23
23
|
|
24
24
|
.title_tools {
|
25
|
-
font-size: 12px;
|
26
25
|
float: right;
|
27
26
|
margin: 0;
|
28
27
|
margin-top: 4px;
|
@@ -35,14 +34,14 @@ $sidebar_width: 210px;
|
|
35
34
|
}
|
36
35
|
|
37
36
|
.subtitle {
|
38
|
-
border-bottom: 1px
|
37
|
+
border-bottom: 1px #eee solid;
|
39
38
|
color: #2f2f2f;
|
40
39
|
font: {
|
41
40
|
size: 14px;
|
42
41
|
weight: bold; };
|
43
42
|
small {
|
44
43
|
font-weight: normal;
|
45
|
-
font-size:
|
44
|
+
font-size: 0.9em;
|
46
45
|
padding-left: 5px; }
|
47
46
|
a:link, a:visited {
|
48
47
|
color: $color_subtitle;
|
@@ -56,7 +55,7 @@ $sidebar_width: 210px;
|
|
56
55
|
margin-left: 5px }
|
57
56
|
|
58
57
|
.subtitle_tools {
|
59
|
-
font-size:
|
58
|
+
font-size: 0.9em;
|
60
59
|
float: right; }
|
61
60
|
|
62
61
|
.radio_box {
|
@@ -71,7 +70,7 @@ $sidebar_width: 210px;
|
|
71
70
|
position: relative;
|
72
71
|
top: -3px; }
|
73
72
|
label {
|
74
|
-
font-size:
|
73
|
+
font-size: 0.9em; } }
|
75
74
|
|
76
75
|
// Main area (page and form).
|
77
76
|
//------------------------------------------------------------------------------
|
@@ -86,9 +85,7 @@ $sidebar_width: 210px;
|
|
86
85
|
padding: 20px;
|
87
86
|
width: 400px;
|
88
87
|
-moz-border-radius: 6px;
|
89
|
-
-moz-box-shadow: 5px 5px 15px #bbbbbb, -5px 0px 15px #bbbbbb;
|
90
88
|
-webkit-border-radius: 6px;
|
91
|
-
-webkit-box-shadow: 5px 5px 15px #bbbbbb, -5px 0px 15px #bbbbbb;
|
92
89
|
input[type="text"], input[type="email"], input[type="password"] {
|
93
90
|
font-size: 16px;
|
94
91
|
padding: 2px;
|
@@ -103,9 +100,7 @@ $sidebar_width: 210px;
|
|
103
100
|
background: white;
|
104
101
|
padding: 8px 15px 15px 15px;
|
105
102
|
-moz-border-radius: 4px;
|
106
|
-
-
|
107
|
-
-webkit-border-radius: 4px;
|
108
|
-
-webkit-box-shadow: 2px 2px 8px #bbbbbb, -2px 0px 8px #bbbbbb; }
|
103
|
+
-webkit-border-radius: 4px; }
|
109
104
|
|
110
105
|
.info {
|
111
106
|
padding-top: 12px;
|
@@ -113,9 +108,9 @@ $sidebar_width: 210px;
|
|
113
108
|
|
114
109
|
.sidebar {
|
115
110
|
color: #3f3f3f;
|
116
|
-
font-size:
|
117
|
-
padding:
|
118
|
-
|
111
|
+
font-size: 0.9em;
|
112
|
+
padding-top: 1rem;
|
113
|
+
}
|
119
114
|
|
120
115
|
.form {
|
121
116
|
background: white;
|
@@ -124,7 +119,7 @@ $sidebar_width: 210px;
|
|
124
119
|
height: 30px; } }
|
125
120
|
|
126
121
|
.tools {
|
127
|
-
font-size:
|
122
|
+
font-size: 0.9em;
|
128
123
|
float: right;
|
129
124
|
padding: 0px 0px 0px 4px;
|
130
125
|
&#comment_new_tools {
|
@@ -132,7 +127,6 @@ $sidebar_width: 210px;
|
|
132
127
|
|
133
128
|
.label {
|
134
129
|
color: #3f3f3f;
|
135
|
-
font-size: 12px;
|
136
130
|
margin: 8px 0px 0px 0px;
|
137
131
|
padding: 0px 8px 0px 0px; }
|
138
132
|
|
@@ -150,7 +144,6 @@ $sidebar_width: 210px;
|
|
150
144
|
|
151
145
|
.intro {
|
152
146
|
color: dimgray;
|
153
|
-
font-size: 12px;
|
154
147
|
padding-top: 5px; }
|
155
148
|
|
156
149
|
.section {
|
@@ -243,12 +236,71 @@ $sidebar_width: 210px;
|
|
243
236
|
.black {
|
244
237
|
color: black; }
|
245
238
|
|
246
|
-
.white {
|
247
|
-
color: white !important; }
|
248
|
-
|
249
239
|
.grayed {
|
250
240
|
color: silver !important; }
|
251
241
|
|
242
|
+
// Default tag colors
|
243
|
+
// Override these with your own stylesheets
|
244
|
+
// TODO: Improve the dark vs light to be smarter/inherited
|
245
|
+
// TODO: Refactor to a better structure
|
246
|
+
$dark_strip_text: #111;
|
247
|
+
$light_strip_text: #EEE;
|
248
|
+
|
249
|
+
$bg_color1: #05668D;
|
250
|
+
$bg_color2: #028090;
|
251
|
+
$bg_color3: #00A896;
|
252
|
+
$bg_color4: #02C39A;
|
253
|
+
$bg_color5: #2A9D8F;
|
254
|
+
$bg_color6: #B4A6AB;
|
255
|
+
$bg_color7: #946E83;
|
256
|
+
$bg_color8: #615055;
|
257
|
+
$bg_color9: #FFDD4A;
|
258
|
+
|
259
|
+
|
260
|
+
.task .call { background: $bg_color1; color: $light_strip_text; }
|
261
|
+
.task .email { background: $bg_color2; color: $light_strip_text; }
|
262
|
+
.task .follow_up { background: $bg_color3; color: $light_strip_text; }
|
263
|
+
.task .lunch { background: $bg_color4; color: $light_strip_text; }
|
264
|
+
.task .meeting { background: $bg_color5; color: $light_strip_text; }
|
265
|
+
.task .money { background: $bg_color6; color: $dark_strip_text; }
|
266
|
+
.task .presentation { background: $bg_color7; color: $light_strip_text; }
|
267
|
+
.task .trip { background: $bg_color8; color: $light_strip_text; }
|
268
|
+
.task .other { background: $bg_color9; color: $dark_strip_text; }
|
269
|
+
|
270
|
+
.campaign .planned { background: $bg_color1; color: $light_strip_text; }
|
271
|
+
.campaign .started { background: $bg_color9; color: $dark_strip_text; }
|
272
|
+
.campaign .completed { background: $bg_color3; color: $light_strip_text; }
|
273
|
+
.campaign .on_hold { background: $bg_color6; color: $dark_strip_text; }
|
274
|
+
.campaign .called_off { background: $bg_color2; color: $light_strip_text; }
|
275
|
+
|
276
|
+
.lead .new { background: $bg_color9; color: $dark_strip_text; }
|
277
|
+
.lead .contacted { background: $bg_color3; color: $light_strip_text; }
|
278
|
+
.lead .converted { background: $bg_color6; color: $dark_strip_text; }
|
279
|
+
.lead .rejected { background: $bg_color1; color: $light_strip_text; }
|
280
|
+
|
281
|
+
.account .affiliate { background: $bg_color1; color: $light_strip_text; }
|
282
|
+
.account .competitor { background: $bg_color2; color: $light_strip_text; }
|
283
|
+
.account .customer { background:$bg_color3; color: $light_strip_text; }
|
284
|
+
.account .partner { background: $bg_color4; color: $light_strip_text; }
|
285
|
+
.account .reseller { background: $bg_color6; color: $dark_strip_text; }
|
286
|
+
.account .vendor { background: $bg_color9; color: $dark_strip_text; }
|
287
|
+
|
288
|
+
.opportunity .prospecting { background: $bg_color1; color: $light_strip_text; }
|
289
|
+
.opportunity .analysis { background: $bg_color2; color: $light_strip_text; }
|
290
|
+
.opportunity .presentation { background:$bg_color3; color: $light_strip_text; }
|
291
|
+
.opportunity .proposal { background: $bg_color4; color: $light_strip_text; }
|
292
|
+
.opportunity .negotiation { background: $bg_color5; color: $light_strip_text; }
|
293
|
+
.opportunity .final_review { background: $bg_color9; color: $dark_strip_text; }
|
294
|
+
.opportunity .won { background: $bg_color7; color: $light_strip_text; }
|
295
|
+
.opportunity .lost { background: $bg_color1; color: $light_strip_text; }
|
296
|
+
|
297
|
+
.user .admin { background: $bg_color1; color: $light_strip_text; }
|
298
|
+
.user .suspended { background: $bg_color3; color: $light_strip_text; }
|
299
|
+
.user .active { background: $bg_color6; color: $dark_strip_text; }
|
300
|
+
.user .signed_up { background: $bg_color9; color: $dark_strip_text; }
|
301
|
+
|
302
|
+
|
303
|
+
|
252
304
|
.amount {
|
253
305
|
background: palegreen;
|
254
306
|
color: black;
|
@@ -275,12 +327,8 @@ $sidebar_width: 210px;
|
|
275
327
|
padding: 1px 4px 1px 3px;
|
276
328
|
text-align: right;
|
277
329
|
width: 75px;
|
278
|
-
|
279
|
-
|
280
|
-
bottomleft: 7px; };
|
281
|
-
-webkit-border: {
|
282
|
-
top-left-radius: 7px;
|
283
|
-
bottom-left-radius: 7px; }; }
|
330
|
+
border-radius: 2px;
|
331
|
+
}
|
284
332
|
|
285
333
|
// Indentation classes:
|
286
334
|
// - indent: for use with strip (regular indentation).
|
@@ -408,27 +456,22 @@ $sidebar_width: 210px;
|
|
408
456
|
.log {
|
409
457
|
padding: 8px 0px 0px 0px;
|
410
458
|
h3 {
|
411
|
-
border-bottom: 1px #2f2f2f dotted;
|
412
459
|
color: #2f2f2f;
|
413
460
|
margin: 0px 0px 4px 0px;
|
414
461
|
padding: 2px 0px 2px 86px;
|
415
462
|
&.overdue {
|
416
|
-
color: crimson;
|
417
|
-
border-bottom: 1px crimson dotted; }
|
463
|
+
color: crimson; }
|
418
464
|
&.due_asap {
|
419
|
-
color: darkred;
|
420
|
-
border-bottom: 1px darkred dotted; }
|
465
|
+
color: darkred; }
|
421
466
|
&.due_today {
|
422
|
-
color: darkgreen;
|
423
|
-
border-bottom: 1px darkgreen dotted; } }
|
467
|
+
color: darkgreen; } }
|
424
468
|
li {
|
425
469
|
color: #3f3f3f;
|
426
|
-
font-size: 12px;
|
427
470
|
list-style: none;
|
428
471
|
padding: 3px 0px 3px 0px;
|
429
472
|
tt {
|
430
473
|
color: dimgray;
|
431
|
-
font-size:
|
474
|
+
font-size: 0.9em; } }
|
432
475
|
input[type=checkbox] {
|
433
476
|
float: left;
|
434
477
|
margin: 0px 4px 0px 0px; } }
|
@@ -438,9 +481,8 @@ $sidebar_width: 210px;
|
|
438
481
|
.list {
|
439
482
|
padding: 8px 0px 7px 0px;
|
440
483
|
li {
|
441
|
-
border-bottom: 1px
|
484
|
+
border-bottom: 1px #eee dotted;
|
442
485
|
color: #3f3f3f;
|
443
|
-
font-size: 12px;
|
444
486
|
list-style: none;
|
445
487
|
padding: 6px 0px 6px 0px;
|
446
488
|
.gravatar {
|
@@ -448,13 +490,12 @@ $sidebar_width: 210px;
|
|
448
490
|
padding: 0px 8px 0px 0px; }
|
449
491
|
tt {
|
450
492
|
color: dimgray;
|
451
|
-
|
493
|
+
}
|
452
494
|
dt {
|
453
495
|
color: #3f3f3f;
|
454
|
-
font-size: 11px;
|
455
496
|
padding: 2px 0px 0px 0px; } } }
|
456
497
|
|
457
|
-
// Sidebar, filters
|
498
|
+
// Sidebar, filters
|
458
499
|
//------------------------------------------------------------------------------
|
459
500
|
.filters, .panel {
|
460
501
|
background: snow;
|
@@ -462,14 +503,11 @@ $sidebar_width: 210px;
|
|
462
503
|
padding: 6px 8px 6px 8px;
|
463
504
|
-moz-border-radius: 4px;
|
464
505
|
-webkit-border-radius: 4px;
|
465
|
-
-moz-box-shadow: 2px 2px 8px #bbbbbb, -2px 0px 8px #bbbbbb;
|
466
|
-
-webkit-box-shadow: 2px 2px 8px #bbbbbb, -2px 0px 8px #bbbbbb;
|
467
506
|
|
468
507
|
.caption {
|
469
|
-
border-bottom: 1px
|
508
|
+
border-bottom: 1px #eee solid;
|
470
509
|
color: navy;
|
471
510
|
font: {
|
472
|
-
size: 12px;
|
473
511
|
weight: bold; };
|
474
512
|
margin: 4px 0px 5px 0px;
|
475
513
|
padding: 2px 0px 2px 0px; }
|
@@ -487,42 +525,24 @@ $sidebar_width: 210px;
|
|
487
525
|
div {
|
488
526
|
margin: 0px 0px 10px 0px; }
|
489
527
|
h4 {
|
490
|
-
font-size:
|
528
|
+
font-size: 1.1em;
|
491
529
|
font-weight: bold; }
|
492
530
|
li {
|
493
|
-
border-bottom: 1px silver dotted;
|
494
|
-
font-size: 12px;
|
495
531
|
list-style: none;
|
496
532
|
padding: 2px 0px 3px 0px;
|
497
533
|
dt {
|
498
534
|
float: right;
|
499
|
-
font-size: 11px;
|
500
535
|
font-weight: bold; }
|
501
536
|
tt {
|
502
|
-
|
537
|
+
}
|
503
538
|
&.last {
|
504
539
|
border-bottom: none; } }
|
505
540
|
&#recently {
|
506
541
|
background: floralwhite; }
|
507
542
|
&#summary {
|
508
|
-
background: oldlace;
|
509
543
|
p {
|
510
544
|
margin: 4px 0px 4px 0px; } } }
|
511
545
|
|
512
|
-
.selector {
|
513
|
-
color: black;
|
514
|
-
cursor: pointer;
|
515
|
-
font-size: 10px;
|
516
|
-
text-align: center; }
|
517
|
-
|
518
|
-
.on {
|
519
|
-
background: lightgoldenrodyellow;
|
520
|
-
border: 1px silver inset; }
|
521
|
-
|
522
|
-
.off {
|
523
|
-
background: lightgrey;
|
524
|
-
border: 1px silver outset; }
|
525
|
-
|
526
546
|
.arrow {
|
527
547
|
font-size: 9px;
|
528
548
|
padding: 0px 2px 3px 0px; }
|
@@ -659,7 +679,7 @@ span.handle img {
|
|
659
679
|
padding: 2px 6px 1px 6px;
|
660
680
|
margin: 4px 0 3px 4px;
|
661
681
|
border: 1px solid #bdbdbd;
|
662
|
-
background-image: -webkit-gradient(linear,
|
682
|
+
background-image: -webkit-gradient(linear, to right bottom, to right top, color-stop(0, #eaeaea), color-stop(0.7, #f2f2f2));
|
663
683
|
background-image: -webkit-linear-gradient(center bottom, #eaeaea 0%, #f2f2f2 70%);
|
664
684
|
background-image: -moz-linear-gradient(center bottom, #eaeaea 0%, #f2f2f2 70%);
|
665
685
|
background-image: -o-linear-gradient(bottom, #eaeaea 0%, #f2f2f2 70%);
|
@@ -691,7 +711,7 @@ ul.tools {
|
|
691
711
|
border-right: 1px black solid;
|
692
712
|
border-bottom: none;
|
693
713
|
padding: 0 4px;
|
694
|
-
font-size:
|
714
|
+
font-size: 0.8em;
|
695
715
|
float: left;
|
696
716
|
clear: none; }
|
697
717
|
li:last-child {
|
@@ -717,7 +737,7 @@ table.asset_attributes {
|
|
717
737
|
width: 100%;
|
718
738
|
border-spacing: 4px;
|
719
739
|
td, th {
|
720
|
-
border-bottom: 1px dotted
|
740
|
+
border-bottom: 1px dotted #eee;
|
721
741
|
vertical-align: top;
|
722
742
|
text-align: left;
|
723
743
|
}
|
@@ -72,20 +72,13 @@ $color_footer: grey;
|
|
72
72
|
|
73
73
|
.tabs {
|
74
74
|
background: $color_header_background;
|
75
|
-
height: $size_tab_height;
|
76
75
|
padding: 0px;
|
77
|
-
text-align: center;
|
78
|
-
width: 100%;
|
79
76
|
i.fa {
|
80
77
|
font-size: 130%;
|
81
78
|
vertical-align:text-top; }
|
82
79
|
ul {
|
83
|
-
// :margin 0px 25%, 18% for 5th tab
|
84
80
|
margin-left: 15px; }
|
85
81
|
li {
|
86
|
-
float: left;
|
87
|
-
font-size: 12px;
|
88
|
-
line-height: 16px;
|
89
82
|
list-style: none;
|
90
83
|
margin: 0px 4px 0px 1px; }
|
91
84
|
a:link, a:visited {
|
@@ -96,7 +89,6 @@ $color_footer: grey;
|
|
96
89
|
margin-right: 7px; }
|
97
90
|
background: $color_tab_background;
|
98
91
|
color: white;
|
99
|
-
float: left;
|
100
92
|
padding: 4px 15px 6px;
|
101
93
|
text-align: center;
|
102
94
|
text-decoration: none;
|
@@ -41,7 +41,7 @@ class Admin::FieldGroupsController < Admin::ApplicationController
|
|
41
41
|
#----------------------------------------------------------------------------
|
42
42
|
def update
|
43
43
|
@field_group = FieldGroup.find(params[:id])
|
44
|
-
@field_group.
|
44
|
+
@field_group.update(field_group_params)
|
45
45
|
|
46
46
|
respond_with(@field_group)
|
47
47
|
end
|
@@ -63,7 +63,7 @@ class Admin::FieldsController < Admin::ApplicationController
|
|
63
63
|
@field = CustomFieldPair.update_pair(params).first
|
64
64
|
else
|
65
65
|
@field = Field.find(params[:id])
|
66
|
-
@field.
|
66
|
+
@field.update(field_params)
|
67
67
|
end
|
68
68
|
|
69
69
|
respond_with(@field)
|
@@ -46,7 +46,7 @@ class Admin::GroupsController < Admin::ApplicationController
|
|
46
46
|
# PUT /groups/1
|
47
47
|
#----------------------------------------------------------------------------
|
48
48
|
def update
|
49
|
-
@group.
|
49
|
+
@group.update(group_params)
|
50
50
|
|
51
51
|
respond_with(@group)
|
52
52
|
end
|
@@ -35,7 +35,7 @@ class Admin::TagsController < Admin::ApplicationController
|
|
35
35
|
# POST /admin/tags.xml AJAX
|
36
36
|
#----------------------------------------------------------------------------
|
37
37
|
def create
|
38
|
-
@tag.
|
38
|
+
@tag.update(tag_params)
|
39
39
|
|
40
40
|
respond_with(@tag)
|
41
41
|
end
|
@@ -44,7 +44,7 @@ class Admin::TagsController < Admin::ApplicationController
|
|
44
44
|
# PUT /admin/tags/1.xml AJAX
|
45
45
|
#----------------------------------------------------------------------------
|
46
46
|
def update
|
47
|
-
@tag.
|
47
|
+
@tag.update(tag_params)
|
48
48
|
|
49
49
|
respond_with(@tag)
|
50
50
|
end
|
@@ -104,8 +104,9 @@ class Admin::UsersController < Admin::ApplicationController
|
|
104
104
|
def user_params
|
105
105
|
return {} unless params[:user]
|
106
106
|
|
107
|
-
params[:user][:email].try(:strip!)
|
108
107
|
params[:user][:password_confirmation] = nil if params[:user][:password_confirmation].blank?
|
108
|
+
params[:user][:email].try(:strip!)
|
109
|
+
params[:user][:alt_email].try(:strip!)
|
109
110
|
|
110
111
|
params[:user].permit(
|
111
112
|
:admin,
|
@@ -60,6 +60,16 @@ class ApplicationController < ActionController::Base
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
+
# To deal with pre rails 6 users, reset the session and ask them to relogin
|
64
|
+
rescue_from ArgumentError do |exception|
|
65
|
+
if request.format.html? && exception.message == "invalid base64"
|
66
|
+
request.reset_session
|
67
|
+
redirect_to login_path
|
68
|
+
else
|
69
|
+
raise(exception)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
63
73
|
private
|
64
74
|
|
65
75
|
#
|
@@ -63,7 +63,7 @@ class CommentsController < ApplicationController
|
|
63
63
|
#----------------------------------------------------------------------------
|
64
64
|
def update
|
65
65
|
@comment = Comment.find(params[:id])
|
66
|
-
@comment.
|
66
|
+
@comment.update(comment_params)
|
67
67
|
respond_with(@comment)
|
68
68
|
end
|
69
69
|
|
@@ -71,7 +71,7 @@ class AccountsController < EntitiesController
|
|
71
71
|
respond_with(@account) do |_format|
|
72
72
|
# Must set access before user_ids, because user_ids= method depends on access value.
|
73
73
|
@account.access = params[:account][:access] if params[:account][:access]
|
74
|
-
get_data_for_sidebar if @account.
|
74
|
+
get_data_for_sidebar if @account.update(resource_params)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
@@ -109,7 +109,7 @@ class CampaignsController < EntitiesController
|
|
109
109
|
respond_with(@campaign) do |_format|
|
110
110
|
# Must set access before user_ids, because user_ids= method depends on access value.
|
111
111
|
@campaign.access = resource_params[:access] if resource_params[:access]
|
112
|
-
get_data_for_sidebar if @campaign.
|
112
|
+
get_data_for_sidebar if @campaign.update(resource_params) && called_from_index_page?
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
@@ -15,7 +15,9 @@ class HomeController < ApplicationController
|
|
15
15
|
@my_tasks = Task.visible_on_dashboard(current_user).includes(:user, :asset).by_due_at
|
16
16
|
@my_opportunities = Opportunity.visible_on_dashboard(current_user).includes(:account, :user, :tags).by_closes_on.by_amount
|
17
17
|
@my_accounts = Account.visible_on_dashboard(current_user).includes(:user, :tags).by_name
|
18
|
-
respond_with
|
18
|
+
respond_with @activities do |format|
|
19
|
+
format.xls { render xls: @activities, layout: 'header' }
|
20
|
+
end
|
19
21
|
end
|
20
22
|
|
21
23
|
# GET /home/options AJAX
|