alchemy_cms 4.1.0.rc1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of alchemy_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +60 -6
- data/README.md +10 -8
- data/alchemy_cms.gemspec +1 -1
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +2 -4
- data/app/assets/stylesheets/alchemy/_extends.scss +1 -1
- data/app/assets/stylesheets/alchemy/_mixins.scss +8 -15
- data/app/assets/stylesheets/alchemy/_variables.scss +22 -15
- data/app/assets/stylesheets/alchemy/admin.scss +1 -0
- data/app/assets/stylesheets/alchemy/archive.scss +1 -2
- data/app/assets/stylesheets/alchemy/base.scss +12 -59
- data/app/assets/stylesheets/alchemy/buttons.scss +9 -4
- data/app/assets/stylesheets/alchemy/elements.scss +2 -1
- data/app/assets/stylesheets/alchemy/forms.scss +0 -4
- data/app/assets/stylesheets/alchemy/frame.scss +1 -10
- data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +1 -0
- data/app/assets/stylesheets/alchemy/lists.scss +10 -0
- data/app/assets/stylesheets/alchemy/menubar.scss +1 -0
- data/app/assets/stylesheets/alchemy/notices.scss +5 -7
- data/app/assets/stylesheets/alchemy/pagination.scss +12 -7
- data/app/assets/stylesheets/alchemy/resource_info.scss +0 -4
- data/app/assets/stylesheets/alchemy/search.scss +5 -2
- data/app/assets/stylesheets/alchemy/selects.scss +4 -2
- data/app/assets/stylesheets/alchemy/sitemap.scss +0 -10
- data/app/assets/stylesheets/alchemy/tables.scss +23 -0
- data/app/assets/stylesheets/alchemy/typography.scss +55 -0
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +6 -3
- data/app/controllers/alchemy/admin/attachments_controller.rb +1 -1
- data/app/controllers/alchemy/admin/base_controller.rb +2 -1
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pictures_controller.rb +28 -7
- data/app/controllers/alchemy/admin/resources_controller.rb +18 -4
- data/app/controllers/alchemy/admin/styleguide_controller.rb +7 -0
- data/app/controllers/alchemy/admin/tags_controller.rb +1 -1
- data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/index.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_users.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/index.html.erb +2 -1
- data/app/views/alchemy/admin/languages/index.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_external_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_file_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_form.html.erb +0 -2
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/configure_external.html.erb +0 -1
- data/app/views/alchemy/admin/pages/index.html.erb +5 -1
- data/app/views/alchemy/admin/pictures/_archive.html.erb +3 -2
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_form.html.erb +0 -1
- data/app/views/alchemy/admin/pictures/_infos.html.erb +3 -2
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/index.html.erb +8 -6
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +20 -0
- data/app/views/alchemy/admin/resources/_table_header.html.erb +5 -0
- data/app/views/alchemy/admin/resources/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/resources/index.html.erb +1 -1
- data/app/views/alchemy/admin/sites/index.html.erb +1 -1
- data/app/views/alchemy/admin/styleguide/index.html.erb +238 -0
- data/app/views/alchemy/admin/tags/edit.html.erb +4 -4
- data/app/views/alchemy/admin/tags/index.html.erb +1 -4
- data/app/views/alchemy/elements/_editor_not_found.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +2 -1
- data/app/views/kaminari/alchemy/_paginator.html.erb +8 -5
- data/config/alchemy/config.yml +5 -0
- data/config/locales/alchemy.en.yml +1 -0
- data/config/routes.rb +2 -0
- data/lib/alchemy/permissions.rb +1 -1
- data/lib/alchemy/resources_helper.rb +2 -1
- data/lib/alchemy/version.rb +1 -1
- metadata +12 -7
@@ -9,10 +9,15 @@ button, input[type="submit"], a.button, input.button {
|
|
9
9
|
|
10
10
|
&:focus {
|
11
11
|
@include default-focus-style(
|
12
|
-
$border-color: $
|
13
|
-
$box-shadow:
|
12
|
+
$border-color: $button-focus-border-color,
|
13
|
+
$box-shadow: $button-focus-box-shadow
|
14
14
|
);
|
15
15
|
}
|
16
|
+
|
17
|
+
&:active, &:active:focus {
|
18
|
+
border-color: $button-hover-border-color;
|
19
|
+
box-shadow: none;
|
20
|
+
}
|
16
21
|
}
|
17
22
|
|
18
23
|
&.small {
|
@@ -148,7 +153,7 @@ button.icon_button {
|
|
148
153
|
.icon_button {
|
149
154
|
width: 29px;
|
150
155
|
height: 29px;
|
151
|
-
line-height:
|
156
|
+
line-height: 24px;
|
152
157
|
}
|
153
158
|
|
154
159
|
label {
|
@@ -161,7 +166,7 @@ button.icon_button {
|
|
161
166
|
z-index: 30;
|
162
167
|
background-color: $tooltip-background-color;
|
163
168
|
color: $white;
|
164
|
-
padding: $default-padding 2*$default-padding;
|
169
|
+
padding: $default-padding 2*$default-padding 1.5*$default-padding;
|
165
170
|
line-height: 1;
|
166
171
|
box-shadow: 0 0 4px $default-border-color;
|
167
172
|
white-space: nowrap;
|
@@ -192,7 +192,7 @@
|
|
192
192
|
}
|
193
193
|
|
194
194
|
.message {
|
195
|
-
margin: 2*$default-margin;
|
195
|
+
margin: 2*$default-margin 0;
|
196
196
|
}
|
197
197
|
|
198
198
|
.foot_note {
|
@@ -337,6 +337,7 @@
|
|
337
337
|
$background-color: $medium-gray,
|
338
338
|
$hover-color: darken($medium-gray, 5%),
|
339
339
|
$border: 1px solid #c0c0c0,
|
340
|
+
$box-shadow: none,
|
340
341
|
$hover-border-color: #c0c0c0,
|
341
342
|
$line-height: 30px,
|
342
343
|
$padding: 0,
|
@@ -89,8 +89,7 @@ div#overlay_text_box {
|
|
89
89
|
}
|
90
90
|
|
91
91
|
#archive_all {
|
92
|
-
height:
|
93
|
-
padding-bottom: 60px;
|
92
|
+
height: 100%;
|
94
93
|
|
95
94
|
&.with_tag_filter {
|
96
95
|
|
@@ -102,14 +101,6 @@ div#overlay_text_box {
|
|
102
101
|
margin-right: 242px;
|
103
102
|
}
|
104
103
|
}
|
105
|
-
|
106
|
-
&.resources-table-wrapper {
|
107
|
-
padding-top: 47px;
|
108
|
-
|
109
|
-
> table {
|
110
|
-
padding-bottom: 60px;
|
111
|
-
}
|
112
|
-
}
|
113
104
|
}
|
114
105
|
|
115
106
|
#user_info {
|
@@ -9,12 +9,7 @@ div.message {
|
|
9
9
|
margin-bottom: 8px;
|
10
10
|
text-align: left;
|
11
11
|
|
12
|
-
h1 {
|
13
|
-
font-size: 1.2em;
|
14
|
-
margin: 8px 0;
|
15
|
-
}
|
16
|
-
|
17
|
-
h1, h2 { margin-top: 0 }
|
12
|
+
h1, h2, h3 { margin-top: 0 }
|
18
13
|
|
19
14
|
.icon {
|
20
15
|
position: absolute;
|
@@ -31,7 +26,10 @@ div.message {
|
|
31
26
|
a {
|
32
27
|
text-decoration: underline;
|
33
28
|
|
34
|
-
&:hover {
|
29
|
+
&:hover {
|
30
|
+
color: inherit;
|
31
|
+
text-decoration: none;
|
32
|
+
}
|
35
33
|
}
|
36
34
|
|
37
35
|
ol {
|
@@ -1,12 +1,13 @@
|
|
1
1
|
.pagination {
|
2
|
-
background: $light_gray;
|
3
2
|
position: fixed;
|
3
|
+
display: flex;
|
4
|
+
align-items: center;
|
5
|
+
background: $light_gray;
|
4
6
|
bottom: 0;
|
5
7
|
right: 0;
|
6
8
|
width: 100%;
|
7
9
|
left: 0px;
|
8
10
|
height: 52px;
|
9
|
-
line-height: 35px;
|
10
11
|
padding: 2*$default-padding;
|
11
12
|
padding-left: $main-menu-width + 10px;
|
12
13
|
text-align: left;
|
@@ -18,6 +19,7 @@
|
|
18
19
|
font-weight: bold;
|
19
20
|
color: $icon-color;
|
20
21
|
padding: $default-padding 2*$default-padding;
|
22
|
+
margin: 0 $default-margin/2;
|
21
23
|
}
|
22
24
|
|
23
25
|
a:hover {
|
@@ -28,15 +30,12 @@
|
|
28
30
|
|
29
31
|
span a { padding: 0 }
|
30
32
|
|
31
|
-
.page { padding: 0px 8px }
|
32
|
-
|
33
33
|
.current {
|
34
|
-
color: $
|
35
|
-
border: 1px solid $
|
34
|
+
color: $text-color;
|
35
|
+
border: 1px solid $text-color;
|
36
36
|
text-shadow: 0px 1px 1px #fff;
|
37
37
|
cursor: default;
|
38
38
|
border-radius: $default-border-radius;
|
39
|
-
padding: 5px 8px;
|
40
39
|
}
|
41
40
|
|
42
41
|
.previous_page {
|
@@ -55,6 +54,7 @@
|
|
55
54
|
border: none;
|
56
55
|
background: transparent;
|
57
56
|
cursor: default;
|
57
|
+
margin: 0;
|
58
58
|
}
|
59
59
|
|
60
60
|
.icon {
|
@@ -62,6 +62,11 @@
|
|
62
62
|
}
|
63
63
|
}
|
64
64
|
|
65
|
+
.per-page-select-form {
|
66
|
+
margin-left: auto;
|
67
|
+
display: inline;
|
68
|
+
}
|
69
|
+
|
65
70
|
#assign_image_list .pagination, #assign_file_list .pagination {
|
66
71
|
position: absolute;
|
67
72
|
padding-left: 8px;
|
@@ -7,6 +7,7 @@ select {
|
|
7
7
|
$hover-border-color: darken($default-border-color, 10%),
|
8
8
|
$padding: 0 2*$default-padding,
|
9
9
|
$border: 1px solid $default-border-color,
|
10
|
+
$box-shadow: none,
|
10
11
|
$color: $text-color,
|
11
12
|
$margin: 0);
|
12
13
|
height: $form-field-height;
|
@@ -31,6 +32,7 @@ select {
|
|
31
32
|
$hover-border-color: darken($default-border-color, 10%),
|
32
33
|
$padding: $form-field-padding,
|
33
34
|
$border: 1px solid $default-border-color,
|
35
|
+
$box-shadow: none,
|
34
36
|
$color: $text-color,
|
35
37
|
$margin: 0);
|
36
38
|
background-image: none;
|
@@ -190,8 +192,8 @@ select {
|
|
190
192
|
padding: 4px 0;
|
191
193
|
|
192
194
|
&.select2-highlighted {
|
193
|
-
background: $
|
194
|
-
color: $
|
195
|
+
background: $select-hover-bg-color;
|
196
|
+
color: $select-hover-text-color;
|
195
197
|
}
|
196
198
|
|
197
199
|
&.select2-result-with-children {
|
@@ -211,16 +211,6 @@
|
|
211
211
|
display: inline-block;
|
212
212
|
}
|
213
213
|
|
214
|
-
#create_language_tree_form {
|
215
|
-
width: 80%;
|
216
|
-
max-width: 500px;
|
217
|
-
margin: 2em auto;
|
218
|
-
padding: 4*$default-padding;
|
219
|
-
border: $default-border;
|
220
|
-
background: $medium-gray;
|
221
|
-
border-radius: $default-border-radius;
|
222
|
-
}
|
223
|
-
|
224
214
|
#sitemap_heading {
|
225
215
|
padding: 0;
|
226
216
|
|
@@ -186,3 +186,26 @@ td#user_roles {
|
|
186
186
|
min-width: 40%;
|
187
187
|
}
|
188
188
|
}
|
189
|
+
|
190
|
+
.resources-table-wrapper {
|
191
|
+
padding-top: 50px;
|
192
|
+
|
193
|
+
table {
|
194
|
+
padding-bottom: 60px;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
.resources-header {
|
199
|
+
position: fixed;
|
200
|
+
width: 100%;
|
201
|
+
top: $top-menu-height;
|
202
|
+
left: $main-menu-width + 9px;
|
203
|
+
z-index: 2;
|
204
|
+
margin: 0 -8px;
|
205
|
+
padding: 8px 16px;
|
206
|
+
background-color: $light-gray;
|
207
|
+
|
208
|
+
> h2, > h3 {
|
209
|
+
margin-bottom: 0;
|
210
|
+
}
|
211
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
h1, .h1,
|
2
|
+
h2, .h2,
|
3
|
+
h3, .h3,
|
4
|
+
h4, .h4,
|
5
|
+
h5, .h5 {
|
6
|
+
padding: 0;
|
7
|
+
margin: 1em 0;
|
8
|
+
}
|
9
|
+
|
10
|
+
h1, .h1,
|
11
|
+
h2, .h2,
|
12
|
+
h3, .h3,
|
13
|
+
h4, .h4 {
|
14
|
+
font-weight: bold;
|
15
|
+
}
|
16
|
+
|
17
|
+
h1, .h1 {
|
18
|
+
font-size: 1.5rem;
|
19
|
+
}
|
20
|
+
|
21
|
+
h2, .h2 {
|
22
|
+
font-size: 1.25rem;
|
23
|
+
}
|
24
|
+
|
25
|
+
h3, .h3 {
|
26
|
+
font-size: 1.125rem;
|
27
|
+
}
|
28
|
+
|
29
|
+
h4, .h4,
|
30
|
+
h5, .h5 {
|
31
|
+
font-size: 1rem;
|
32
|
+
}
|
33
|
+
|
34
|
+
h5, .h5 {
|
35
|
+
font-weight: normal;
|
36
|
+
}
|
37
|
+
|
38
|
+
p {
|
39
|
+
margin: 0 0 2*$default-margin 0;
|
40
|
+
white-space: normal;
|
41
|
+
|
42
|
+
a {
|
43
|
+
color: $anchor-color;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
kbd {
|
48
|
+
font-family: Courier, monospaced;
|
49
|
+
background: $medium-gray;
|
50
|
+
border: $default-border;
|
51
|
+
padding: 0.25em 0.5em;
|
52
|
+
vertical-align: top;
|
53
|
+
margin-right: 1ex;
|
54
|
+
border-radius: $default-border-radius;
|
55
|
+
}
|
@@ -467,11 +467,13 @@ div.mce-fullscreen {
|
|
467
467
|
}
|
468
468
|
|
469
469
|
button {
|
470
|
-
padding:
|
470
|
+
padding: $button-padding;
|
471
471
|
width: auto !important;
|
472
472
|
height: auto !important;
|
473
|
+
line-height: 1;
|
473
474
|
border: 1px solid $button-border-color;
|
474
475
|
background-color: $button-bg-color;
|
476
|
+
box-shadow: $button-box-shadow;
|
475
477
|
}
|
476
478
|
|
477
479
|
.mce-txt {
|
@@ -530,10 +532,10 @@ body .mce-abs-layout-item {
|
|
530
532
|
.mce-tooltip {
|
531
533
|
position: absolute;
|
532
534
|
padding: 5px;
|
535
|
+
transition-delay: .3s;
|
533
536
|
}
|
534
537
|
|
535
538
|
.mce-tooltip-inner {
|
536
|
-
font-size: 11px;
|
537
539
|
background-color: $tooltip-background-color;
|
538
540
|
color: $white;
|
539
541
|
max-width: 200px;
|
@@ -656,7 +658,7 @@ body .mce-abs-layout-item {
|
|
656
658
|
display: inline-block;
|
657
659
|
*display: inline;
|
658
660
|
*zoom: 1;
|
659
|
-
box-shadow:
|
661
|
+
box-shadow: none;
|
660
662
|
background-color: $light-gray;
|
661
663
|
|
662
664
|
&:focus,
|
@@ -687,6 +689,7 @@ body .mce-abs-layout-item {
|
|
687
689
|
overflow: visible;
|
688
690
|
-webkit-appearance: none;
|
689
691
|
border-radius: inherit;
|
692
|
+
box-shadow: none;
|
690
693
|
|
691
694
|
&:focus {
|
692
695
|
box-shadow: none;
|
@@ -110,7 +110,8 @@ module Alchemy
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def per_page_value_for_screen_size
|
113
|
-
|
113
|
+
Alchemy::Deprecation.warn("#per_page_value_for_screen_size is deprecated, please use #items_per_page instead")
|
114
|
+
return items_per_page if session[:screen_size].blank?
|
114
115
|
screen_height = session[:screen_size].split('x').last.to_i
|
115
116
|
(screen_height / 50) - 12
|
116
117
|
end
|
@@ -5,7 +5,7 @@ module Alchemy
|
|
5
5
|
class LanguagesController < ResourcesController
|
6
6
|
def index
|
7
7
|
@query = Language.on_current_site.ransack(search_filter_params[:q])
|
8
|
-
@languages = @query.result.page(params[:page] || 1).per(
|
8
|
+
@languages = @query.result.page(params[:page] || 1).per(items_per_page)
|
9
9
|
end
|
10
10
|
|
11
11
|
def new
|
@@ -15,7 +15,11 @@ module Alchemy
|
|
15
15
|
def index
|
16
16
|
@size = params[:size].present? ? params[:size] : 'medium'
|
17
17
|
@query = Picture.ransack(search_filter_params[:q])
|
18
|
-
@pictures = Picture.search_by(
|
18
|
+
@pictures = Picture.search_by(
|
19
|
+
search_filter_params,
|
20
|
+
@query,
|
21
|
+
items_per_page
|
22
|
+
)
|
19
23
|
|
20
24
|
if in_overlay?
|
21
25
|
archive_overlay
|
@@ -108,18 +112,35 @@ module Alchemy
|
|
108
112
|
redirect_to_index
|
109
113
|
end
|
110
114
|
|
115
|
+
def items_per_page
|
116
|
+
if in_overlay?
|
117
|
+
case params[:size]
|
118
|
+
when 'small' then 25
|
119
|
+
when 'large' then 4
|
120
|
+
else
|
121
|
+
9
|
122
|
+
end
|
123
|
+
else
|
124
|
+
cookies[:alchemy_pictures_per_page] = params[:per_page] ||
|
125
|
+
cookies[:alchemy_pictures_per_page] ||
|
126
|
+
pictures_per_page_for_size(params[:size])
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def items_per_page_options
|
131
|
+
per_page = pictures_per_page_for_size(@size)
|
132
|
+
[per_page, per_page * 2, per_page * 4]
|
133
|
+
end
|
134
|
+
|
111
135
|
private
|
112
136
|
|
113
137
|
def pictures_per_page_for_size(size)
|
114
138
|
case size
|
115
|
-
when 'small'
|
116
|
-
|
117
|
-
when 'large'
|
118
|
-
per_page = in_overlay? ? 4 : (per_page_value_for_screen_size / 1.7).floor + 1
|
139
|
+
when 'small' then 60
|
140
|
+
when 'large' then 12
|
119
141
|
else
|
120
|
-
|
142
|
+
20
|
121
143
|
end
|
122
|
-
per_page
|
123
144
|
end
|
124
145
|
|
125
146
|
def in_overlay?
|