alchemy_cms 4.0.0.rc2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +1 -1
  3. data/.travis.yml +2 -2
  4. data/CHANGELOG.md +18 -0
  5. data/Gemfile +2 -1
  6. data/README.md +4 -11
  7. data/alchemy_cms.gemspec +3 -3
  8. data/app/assets/stylesheets/alchemy/_extends.scss +1 -2
  9. data/app/assets/stylesheets/alchemy/_mixins.scss +0 -8
  10. data/app/assets/stylesheets/alchemy/_variables.scss +2 -0
  11. data/app/assets/stylesheets/alchemy/archive.scss +23 -52
  12. data/app/assets/stylesheets/alchemy/base.scss +10 -8
  13. data/app/assets/stylesheets/alchemy/buttons.scss +3 -4
  14. data/app/assets/stylesheets/alchemy/dashboard.scss +0 -2
  15. data/app/assets/stylesheets/alchemy/dialogs.scss +13 -14
  16. data/app/assets/stylesheets/alchemy/elements.scss +41 -51
  17. data/app/assets/stylesheets/alchemy/forms.scss +0 -3
  18. data/app/assets/stylesheets/alchemy/frame.scss +0 -3
  19. data/app/assets/stylesheets/alchemy/image_library.scss +0 -3
  20. data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +0 -2
  21. data/app/assets/stylesheets/alchemy/lists.scss +1 -0
  22. data/app/assets/stylesheets/alchemy/navigation.scss +1 -4
  23. data/app/assets/stylesheets/alchemy/pagination.scss +1 -3
  24. data/app/assets/stylesheets/alchemy/selects.scss +2 -2
  25. data/app/assets/stylesheets/alchemy/sitemap.scss +1 -1
  26. data/app/assets/stylesheets/alchemy/upload.scss +0 -1
  27. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +0 -2
  28. data/app/helpers/alchemy/elements_helper.rb +12 -2
  29. data/app/models/alchemy/essence_picture.rb +28 -10
  30. data/app/models/alchemy/essence_picture_view.rb +1 -1
  31. data/app/models/alchemy/picture/transformations.rb +2 -3
  32. data/app/models/alchemy/picture/url.rb +10 -2
  33. data/app/views/alchemy/admin/contents/create.js.erb +1 -3
  34. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +4 -3
  35. data/app/views/alchemy/essences/_essence_file_editor.html.erb +1 -1
  36. data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +1 -1
  37. data/config/brakeman.ignore +5 -5
  38. data/config/locales/alchemy.de.yml +2 -2
  39. data/config/locales/alchemy.en.yml +2 -2
  40. data/config/locales/alchemy.es.yml +1 -1
  41. data/config/locales/alchemy.fr.yml +1 -1
  42. data/config/locales/alchemy.it.yml +1 -1
  43. data/config/locales/alchemy.nl.yml +1 -1
  44. data/config/locales/alchemy.ru.yml +1 -1
  45. data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +0 -12
  46. data/lib/alchemy/errors.rb +6 -1
  47. data/lib/alchemy/logger.rb +1 -1
  48. data/lib/alchemy/permissions.rb +0 -7
  49. data/lib/alchemy/tasks/tidy.rb +130 -0
  50. data/lib/alchemy/test_support/factories/attachment_factory.rb +2 -2
  51. data/lib/alchemy/test_support/factories/cell_factory.rb +3 -3
  52. data/lib/alchemy/test_support/factories/content_factory.rb +2 -2
  53. data/lib/alchemy/test_support/factories/dummy_user_factory.rb +2 -2
  54. data/lib/alchemy/test_support/factories/element_factory.rb +2 -2
  55. data/lib/alchemy/test_support/factories/essence_file_factory.rb +2 -2
  56. data/lib/alchemy/test_support/factories/essence_picture_factory.rb +2 -2
  57. data/lib/alchemy/test_support/factories/essence_text_factory.rb +2 -2
  58. data/lib/alchemy/test_support/factories/language_factory.rb +2 -2
  59. data/lib/alchemy/test_support/factories/page_factory.rb +4 -4
  60. data/lib/alchemy/test_support/factories/picture_factory.rb +2 -2
  61. data/lib/alchemy/test_support/factories/site_factory.rb +2 -2
  62. data/lib/alchemy/upgrader/three_point_four.rb +25 -0
  63. data/lib/alchemy/version.rb +1 -1
  64. data/lib/tasks/alchemy/tidy.rake +1 -129
  65. data/lib/tasks/alchemy/upgrade.rake +9 -1
  66. metadata +22 -9
@@ -3,8 +3,6 @@
3
3
  padding: 4*$default-padding 2*$default-padding;
4
4
  width: 100%;
5
5
  position: relative;
6
- box-sizing: border-box;
7
- * { box-sizing: border-box }
8
6
 
9
7
  h1 {
10
8
  font-size: 2em;
@@ -81,9 +81,15 @@
81
81
  position: relative;
82
82
  }
83
83
 
84
+ form,
84
85
  .info.message {
85
- float: right;
86
- width: 134px;
86
+ position: absolute;
87
+ right: 2 * $default-padding;
88
+ width: 256px;
89
+ }
90
+
91
+ .info.message {
92
+ top: 2 * $default-padding;
87
93
  margin: 0 0 0 8px;
88
94
  padding: 0 8px 0 32px;
89
95
  }
@@ -99,27 +105,22 @@
99
105
 
100
106
  form {
101
107
  padding: 0;
102
- position: absolute;
103
108
  bottom: 2 * $default-padding;
104
- right: 2 * $default-padding;
105
- width: 176px;
106
109
  margin-left: 8px;
107
110
 
108
- .reset_mask, button {
109
- display: block;
111
+ button {
110
112
  margin-bottom: 0;
111
- text-align: center;
113
+ width: calc(50% - #{$default-padding});
112
114
  }
113
115
 
114
- .reset_mask { padding-top: 4px }
115
-
116
- button { width: 100% }
116
+ button[type="submit"] {
117
+ float: right;
118
+ }
117
119
  }
118
120
  }
119
121
  }
120
122
 
121
123
  .alchemy-dialog-header {
122
- box-sizing: border-box;
123
124
  position: relative;
124
125
  height: $dialog-header-height;
125
126
  padding: 0 2*$default-padding;
@@ -168,7 +169,6 @@
168
169
  }
169
170
 
170
171
  .alchemy-dialog-body {
171
- box-sizing: border-box;
172
172
  position: relative;
173
173
  color: $text-color;
174
174
 
@@ -207,7 +207,6 @@
207
207
  }
208
208
 
209
209
  .alchemy-dialog-buttons {
210
- box-sizing: border-box;
211
210
  float: left;
212
211
  clear: both;
213
212
  width: 100%;
@@ -1,5 +1,4 @@
1
1
  #alchemy_elements_window {
2
- box-sizing: border-box;
3
2
  position: absolute;
4
3
  right: 0;
5
4
  top: 73px;
@@ -10,7 +9,6 @@
10
9
  }
11
10
 
12
11
  #element_area {
13
- box-sizing: border-box;
14
12
  overflow-x: hidden;
15
13
  overflow-y: auto;
16
14
 
@@ -251,7 +249,6 @@
251
249
 
252
250
  .element-header {
253
251
  position: relative;
254
- height: 20px;
255
252
  padding: 2*$default-padding;
256
253
  background-color: $medium-gray;
257
254
  @extend .disable-user-select;
@@ -277,14 +274,13 @@
277
274
  }
278
275
 
279
276
  .element-toolbar {
280
- padding: 6px 0;
281
- height: 6*$default-padding;
277
+ padding: $default-padding 0;
278
+ height: $element-toolbar-height;
282
279
  background-color: #f0f0f0;
283
280
 
284
281
  .element_tools {
285
282
  float: left;
286
- margin-top: -3px;
287
- margin-left: -4px;
283
+ margin-left: -$default-margin;
288
284
  }
289
285
  }
290
286
 
@@ -393,17 +389,16 @@
393
389
  }
394
390
 
395
391
  .edit_images_bottom {
396
- height: 19px;
397
392
  position: absolute;
393
+ left: 0;
394
+ bottom: 0;
398
395
  z-index: 0;
399
- left: 5px;
400
- bottom: 2px;
401
- width: 111px;
396
+ width: inherit;
397
+ padding: $default-padding;
402
398
 
403
399
  > a, > span.icon {
404
400
  float: left;
405
- margin-left: 2px;
406
- margin-right: 2px;
401
+ margin: 0 $default-margin/2;
407
402
  width: 18px;
408
403
  height: 18px;
409
404
  }
@@ -447,8 +442,8 @@
447
442
  }
448
443
 
449
444
  .picture_thumbnail {
450
- width: 111px;
451
- height: 115px;
445
+ width: 121px;
446
+ height: 125px;
452
447
  margin: $default-margin 0;
453
448
 
454
449
  .thumbnail_background {
@@ -495,72 +490,67 @@
495
490
  .picture_thumbnail .picture_handle {
496
491
  position: absolute;
497
492
  z-index: 1;
498
- width: 110px;
499
- height: 93px;
500
- top: 4px;
501
- left: 4px;
493
+ width: 100%;
494
+ height: 97px;
495
+ top: 0;
496
+ left: 0;
502
497
  background-color: transparent;
503
498
  @extend .disable-user-select;
504
499
  }
505
500
 
506
- div.file {
507
- padding: 0;
508
- margin-top: 8px;
509
- margin-bottom: 4px;
510
- border: 1px solid #c0c0c0;
511
- background-color: #f3f3f3;
512
- @extend %rounded-border;
513
- height: 24px;
501
+ .content_editor.essence_file {
514
502
 
515
- .validation_failed & {
516
- color: $error_text_color;
517
- border-color: $error_border_color;
503
+ .file {
504
+ margin: 6px 0 $default-margin;
505
+ border: $default-border;
506
+ background-color: $white;
507
+ @extend %rounded-border;
508
+ height: $default-form-field-height;
509
+
510
+ .validation_failed & {
511
+ color: $error_text_color;
512
+ border-color: $error_border_color;
513
+ }
518
514
  }
519
- }
520
515
 
521
- div.file_icon {
522
- text-align: center;
523
- float: left;
524
- height: 24px;
525
- width: 24px;
516
+ .file_icon {
517
+ text-align: center;
518
+ float: left;
519
+ line-height: 25px;
520
+ width: 24px;
526
521
 
527
- span.icon {
528
- margin: $default-margin;
529
- }
522
+ .icon {
523
+ margin: $default-margin;
524
+ }
530
525
 
531
- a.assign_file {
532
- display: block;
533
- height: 16px;
534
- background: image-url('alchemy/icons.png') no-repeat -480px -40px;
535
- width: 16px;
536
- margin: $default-margin;
526
+ .assign_file {
527
+ background-position: -480px -40px;
528
+ }
537
529
  }
538
- }
539
-
540
- .content_editor.essence_file {
541
530
 
542
531
  .file_name {
543
532
  white-space: nowrap;
544
533
  overflow: hidden;
545
534
  float: left;
546
535
  max-width: 80%;
547
- line-height: 25px;
536
+ line-height: $default-form-field-height;
548
537
  font-size: 10px;
549
538
  text-overflow: ellipsis;
550
539
  }
551
540
  }
552
541
 
553
542
  .essence_file_tools {
554
- height: 24px;
543
+ height: 27px;
555
544
  float: right;
556
545
  background-color: white;
557
546
  width: 48px;
547
+ border-radius: 0 $default-border-radius $default-border-radius 0;
558
548
 
559
549
  a {
560
550
  text-decoration: none;
561
551
  width: 16px;
562
552
  height: 16px;
563
- margin: $default-margin;
553
+ margin: 5px $default-margin;
564
554
  float: left;
565
555
 
566
556
  &.assign_file {
@@ -136,11 +136,9 @@ form {
136
136
  .inline-input {
137
137
  @include clearfix;
138
138
  margin: 0 -1*$default-margin;
139
- box-sizing: border-box;
140
139
 
141
140
  .left-column, .right-column {
142
141
  padding: 0 $default-padding;
143
- box-sizing: border-box;
144
142
  }
145
143
 
146
144
  .left-column {
@@ -180,7 +178,6 @@ form {
180
178
  }
181
179
 
182
180
  .input-column {
183
- box-sizing: border-box;
184
181
  float: left;
185
182
  padding: 0 $default-padding;
186
183
  width: 50%;
@@ -29,7 +29,6 @@ div#overlay_text_box {
29
29
  }
30
30
 
31
31
  #logout {
32
- box-sizing: border-box;
33
32
  position: absolute;
34
33
  z-index: 1;
35
34
  bottom: 0;
@@ -99,7 +98,6 @@ div#overlay_text_box {
99
98
  }
100
99
 
101
100
  #main_content {
102
- box-sizing: border-box;
103
101
  background-color: $light-gray;
104
102
  padding: 84px 8px 8px $main-menu-width + 10px;
105
103
  z-index: 0;
@@ -108,7 +106,6 @@ div#overlay_text_box {
108
106
  }
109
107
 
110
108
  #archive_all {
111
- box-sizing: border-box;
112
109
  height: 100%;
113
110
  padding-bottom: 60px;
114
111
 
@@ -88,7 +88,6 @@ $image-overlay-transition-easing: ease-in;
88
88
  }
89
89
 
90
90
  .picture-details-overlay {
91
- box-sizing: border-box;
92
91
  right: 0;
93
92
  width: $image-overlay-form-width;
94
93
  height: 100%;
@@ -138,7 +137,6 @@ $image-overlay-transition-easing: ease-in;
138
137
  }
139
138
 
140
139
  .zoomed-picture-background {
141
- box-sizing: border-box;
142
140
  width: 100%;
143
141
  height: 100%;
144
142
  padding-top: 2*$default-padding;
@@ -175,7 +173,6 @@ $image-overlay-transition-easing: ease-in;
175
173
  padding: 2*$default-padding 0;
176
174
 
177
175
  .message {
178
- box-sizing: border-box;
179
176
  margin: 2*$default-padding 0;
180
177
  }
181
178
  }
@@ -24,7 +24,6 @@ $datepicker_day_color: $text-color !default;
24
24
  padding-top: 2px;
25
25
  position: absolute;
26
26
  z-index: 9999;
27
- box-sizing: border-box;
28
27
  display: none;
29
28
  }
30
29
 
@@ -61,7 +60,6 @@ $datepicker_day_color: $text-color !default;
61
60
  }
62
61
 
63
62
  .xdsoft_datetimepicker * {
64
- box-sizing: border-box;
65
63
  padding: 0;
66
64
  margin: 0;
67
65
  }
@@ -25,6 +25,7 @@ ul.list {
25
25
  background-color: transparent;
26
26
  font-weight: bold;
27
27
  padding: $default-padding;
28
+ margin-bottom: $default-margin;
28
29
 
29
30
  .list-secondary {
30
31
  color: $text-color;
@@ -1,5 +1,4 @@
1
1
  #top_menu {
2
- box-sizing: border-box;
3
2
  position: fixed;
4
3
  top: 0;
5
4
  margin-left: $main-menu-width;
@@ -15,7 +14,6 @@
15
14
  }
16
15
 
17
16
  #left_menu {
18
- box-sizing: border-box;
19
17
  z-index: 30;
20
18
  height: 100%;
21
19
  position: fixed;
@@ -49,7 +47,6 @@
49
47
  }
50
48
 
51
49
  label {
52
- box-sizing: border-box;
53
50
  position: absolute;
54
51
  top: 0;
55
52
  left: $collapsed-main-menu-width - 1;
@@ -80,7 +77,7 @@
80
77
  }
81
78
 
82
79
  #main_navi {
83
- padding-top: 30px;
80
+ padding-top: 28px;
84
81
  padding-bottom: 80px;
85
82
  }
86
83
 
@@ -1,5 +1,4 @@
1
1
  .pagination {
2
- box-sizing: border-box;
3
2
  background: $light_gray;
4
3
  color: $text-color;
5
4
  position: fixed;
@@ -7,7 +6,7 @@
7
6
  right: 0;
8
7
  width: 100%;
9
8
  left: 0px;
10
- height: 50px;
9
+ height: 52px;
11
10
  padding: 2*$default-padding;
12
11
  padding-left: $main-menu-width + 10px;
13
12
  text-align: left;
@@ -16,7 +15,6 @@
16
15
 
17
16
  a, span, em {
18
17
  font-size: $default-font-size;
19
- height: 25px;
20
18
  line-height: 25px;
21
19
  padding: $default-padding;
22
20
  }
@@ -13,8 +13,8 @@ select {
13
13
  text-shadow: #FFF 0px 1px 0px;
14
14
 
15
15
  .select2-choice {
16
- height: 27px;
17
- line-height: 27px;
16
+ height: $default-form-field-height;
17
+ line-height: $default-form-field-height - 2;
18
18
  @include button-defaults($padding: 0 2*$default-padding, $margin: 0);
19
19
  display: block;
20
20
  font-weight: normal;
@@ -98,7 +98,7 @@
98
98
  .sitemap_left_images {
99
99
  @extend .left-rounded-border;
100
100
  position: relative;
101
- width: 16px;
101
+ width: 32px;
102
102
  height: $sitemap-line-height;
103
103
  line-height: $sitemap-line-height - 2px;
104
104
  float: left;
@@ -42,7 +42,6 @@
42
42
  }
43
43
 
44
44
  .overall-upload {
45
- box-sizing: border-box;
46
45
  position: fixed;
47
46
  bottom: -100%;
48
47
  left: 0;
@@ -29,7 +29,6 @@
29
29
  }
30
30
 
31
31
  .mce-widget button {
32
- box-sizing: border-box;
33
32
  }
34
33
 
35
34
  .mce-container *[unselectable] {
@@ -255,7 +254,6 @@ div.mce-tinymce-inline {
255
254
  .mce-panel {
256
255
  border: 0 solid $default-border-color;
257
256
  background-color: $medium-gray;
258
- box-sizing: border-box;
259
257
  }
260
258
 
261
259
  .mce-toolbar-grp {
@@ -187,7 +187,12 @@ module Alchemy
187
187
 
188
188
  # Renders the HTML tag attributes required for preview mode.
189
189
  def element_preview_code(element)
190
- tag_options(element_preview_code_attributes(element))
190
+ if respond_to?(:tag_options)
191
+ tag_options(element_preview_code_attributes(element))
192
+ else
193
+ # Rails 5.1 uses TagBuilder
194
+ tag_builder.tag_options(element_preview_code_attributes(element))
195
+ end
191
196
  end
192
197
 
193
198
  # Returns a hash containing the HTML tag attributes required for preview mode.
@@ -205,7 +210,12 @@ module Alchemy
205
210
  # HTML tag attributes containing the element's tag information.
206
211
  #
207
212
  def element_tags(element, options = {})
208
- tag_options(element_tags_attributes(element, options))
213
+ if respond_to?(:tag_options)
214
+ tag_options(element_tags_attributes(element, options))
215
+ else
216
+ # Rails 5.1 uses TagBuilder
217
+ tag_builder.tag_options(element_tags_attributes(element, options))
218
+ end
209
219
  end
210
220
 
211
221
  # Returns the element's tags information as an attribute hash.