alchemy_cms 3.0.0.rc5 → 3.0.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -5
  3. data/README.md +32 -5
  4. data/alchemy_cms.gemspec +1 -1
  5. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +3 -3
  6. data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +19 -0
  7. data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +5 -0
  8. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +3 -2
  9. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +2 -0
  10. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +1 -1
  11. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +2 -26
  12. data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
  13. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +2 -0
  14. data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +12 -7
  15. data/app/assets/javascripts/alchemy/alchemy.js +1 -1
  16. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +33 -4
  17. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +1 -1
  18. data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +2 -13
  19. data/app/assets/javascripts/alchemy/{alchemy.tinymce.js.coffee.erb → alchemy.tinymce.js.coffee} +1 -25
  20. data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +63 -105
  21. data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +3 -3
  22. data/app/assets/stylesheets/alchemy/_extends.scss +2 -8
  23. data/app/assets/stylesheets/alchemy/_mixins.scss +4 -9
  24. data/app/assets/stylesheets/alchemy/base.scss +6 -6
  25. data/app/assets/stylesheets/alchemy/buttons.scss +56 -29
  26. data/app/assets/stylesheets/alchemy/elements.scss +66 -14
  27. data/app/assets/stylesheets/alchemy/form_fields.scss +39 -6
  28. data/app/assets/stylesheets/alchemy/forms.scss +32 -0
  29. data/app/assets/stylesheets/alchemy/frame.scss +44 -44
  30. data/app/assets/stylesheets/alchemy/icons.scss +2 -2
  31. data/app/assets/stylesheets/alchemy/jquery-ui.scss +2 -0
  32. data/app/assets/stylesheets/alchemy/notices.scss +6 -0
  33. data/app/assets/stylesheets/alchemy/selects.scss +10 -0
  34. data/app/assets/stylesheets/alchemy/sitemap.scss +8 -10
  35. data/app/assets/stylesheets/alchemy/toolbar.scss +40 -31
  36. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +11 -22
  37. data/app/controllers/alchemy/admin/base_controller.rb +14 -1
  38. data/app/controllers/alchemy/admin/elements_controller.rb +4 -2
  39. data/app/controllers/alchemy/admin/layoutpages_controller.rb +5 -0
  40. data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +39 -0
  41. data/app/controllers/alchemy/admin/pages_controller.rb +0 -3
  42. data/app/controllers/alchemy/base_controller.rb +7 -4
  43. data/app/helpers/alchemy/admin/base_helper.rb +33 -3
  44. data/app/helpers/alchemy/pages_helper.rb +1 -1
  45. data/app/models/alchemy/element.rb +6 -4
  46. data/app/models/alchemy/legacy_page_url.rb +5 -1
  47. data/app/models/alchemy/message.rb +2 -2
  48. data/app/models/alchemy/page.rb +8 -9
  49. data/app/models/alchemy/page/{cells.rb → page_cells.rb} +1 -1
  50. data/app/models/alchemy/page/{elements.rb → page_elements.rb} +1 -1
  51. data/app/models/alchemy/page/{naming.rb → page_naming.rb} +33 -18
  52. data/app/models/alchemy/page/{natures.rb → page_natures.rb} +1 -1
  53. data/app/models/alchemy/page/{scopes.rb → page_scopes.rb} +1 -1
  54. data/app/models/alchemy/page/{users.rb → page_users.rb} +13 -1
  55. data/app/views/alchemy/admin/elements/_add_element_button.html.erb +18 -0
  56. data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
  57. data/app/views/alchemy/admin/elements/_element.html.erb +12 -11
  58. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +3 -0
  59. data/app/views/alchemy/admin/elements/create.js.erb +3 -3
  60. data/app/views/alchemy/admin/elements/index.html.erb +19 -4
  61. data/app/views/alchemy/admin/elements/new.html.erb +3 -0
  62. data/app/views/alchemy/admin/elements/trash.js.erb +16 -12
  63. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
  64. data/app/views/alchemy/admin/layoutpages/edit.html.erb +11 -0
  65. data/app/views/alchemy/admin/layoutpages/index.html.erb +4 -16
  66. data/app/views/alchemy/admin/legacy_page_urls/_form.html.erb +5 -0
  67. data/app/views/alchemy/admin/legacy_page_urls/_label.html.erb +1 -0
  68. data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +13 -0
  69. data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +20 -0
  70. data/app/views/alchemy/admin/legacy_page_urls/create.js.erb +10 -0
  71. data/app/views/alchemy/admin/legacy_page_urls/destroy.js.erb +6 -0
  72. data/app/views/alchemy/admin/legacy_page_urls/update.js.erb +2 -0
  73. data/app/views/alchemy/admin/pages/_form.html.erb +58 -0
  74. data/app/views/alchemy/admin/pages/_internal_link.html.erb +9 -4
  75. data/app/views/alchemy/admin/pages/_legacy_urls.html.erb +23 -0
  76. data/app/views/alchemy/admin/pages/_locked_page.html.erb +21 -0
  77. data/app/views/alchemy/admin/pages/_page.html.erb +2 -2
  78. data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -9
  79. data/app/views/alchemy/admin/pages/_tinymce_custom_config.html.erb +13 -0
  80. data/app/views/alchemy/admin/pages/configure.html.erb +16 -57
  81. data/app/views/alchemy/admin/pages/edit.html.erb +64 -66
  82. data/app/views/alchemy/admin/pages/index.html.erb +9 -19
  83. data/app/views/alchemy/admin/pages/update.js.erb +1 -1
  84. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +7 -12
  85. data/app/views/alchemy/admin/partials/_routes.html.erb +25 -0
  86. data/app/views/alchemy/admin/partials/_search_form.html.erb +10 -12
  87. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +53 -47
  88. data/app/views/alchemy/admin/pictures/index.html.erb +34 -29
  89. data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +1 -1
  90. data/app/views/alchemy/navigation/_link.html.erb +9 -9
  91. data/app/views/alchemy/pages/show.rss.builder +2 -2
  92. data/app/views/layouts/alchemy/admin.html.erb +20 -9
  93. data/bin/alchemy +1 -1
  94. data/config/alchemy/config.yml +1 -0
  95. data/config/locales/alchemy.de.yml +15 -1
  96. data/config/locales/alchemy.en.yml +29 -19
  97. data/config/locales/alchemy.nl.yml +11 -1
  98. data/config/routes.rb +2 -1
  99. data/lib/alchemy/errors.rb +2 -2
  100. data/lib/alchemy/permissions.rb +2 -0
  101. data/lib/alchemy/resource.rb +22 -9
  102. data/lib/alchemy/tinymce.rb +13 -7
  103. data/lib/alchemy/version.rb +1 -1
  104. data/spec/controllers/admin/base_controller_spec.rb +39 -0
  105. data/spec/controllers/admin/elements_controller_spec.rb +17 -14
  106. data/spec/controllers/admin/pages_controller_spec.rb +1 -2
  107. data/spec/controllers/pages_controller_spec.rb +7 -3
  108. data/spec/dummy/app/models/dummy_user.rb +12 -2
  109. data/spec/features/admin/dashboard_spec.rb +45 -0
  110. data/spec/features/admin/legacy_page_url_management_spec.rb +62 -0
  111. data/spec/features/admin/page_editing_feature_spec.rb +66 -6
  112. data/spec/features/page_feature_spec.rb +13 -0
  113. data/spec/helpers/admin/base_helper_spec.rb +36 -0
  114. data/spec/libraries/resource_spec.rb +168 -84
  115. data/spec/libraries/tinymce_spec.rb +10 -0
  116. data/spec/models/element_spec.rb +16 -0
  117. data/spec/models/legacy_page_url_spec.rb +21 -0
  118. data/spec/models/message_spec.rb +23 -7
  119. data/spec/models/page_spec.rb +89 -12
  120. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.min.js +1 -0
  121. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.min.js +1 -0
  122. metadata +96 -75
  123. data/app/assets/javascripts/alchemy/alchemy.routes.js.erb +0 -38
  124. data/spec/models/resource_spec.rb +0 -159
@@ -2,7 +2,7 @@
2
2
  @include box-sizing(border-box);
3
3
  position: absolute;
4
4
  right: 0;
5
- top: 80px;
5
+ top: 75px;
6
6
  width: 400px;
7
7
  height: auto;
8
8
  border-left: $default-border;
@@ -25,6 +25,50 @@
25
25
  }
26
26
  }
27
27
 
28
+ .insert-element-button {
29
+ display: block;
30
+ text-align: center;
31
+ margin-bottom: 2 * $default-margin;
32
+ background-color: transparent;
33
+ border: 1px solid $medium-gray;
34
+ height: 20px;
35
+ line-height: 20px;
36
+ @extend %rounded-border;
37
+ @include transition(all 100ms ease-in-out);
38
+
39
+ &:hover, &.expanded {
40
+ height: 30px;
41
+ line-height: 30px;
42
+ background-color: darken($medium-gray, 2%);
43
+ text-decoration: none;
44
+ cursor: pointer;
45
+ border-color: darken($medium-gray, 2%);
46
+
47
+ label { display: inline-block; }
48
+ .icon { @include opacity(1) }
49
+ }
50
+
51
+ &.expanded:hover {
52
+ background-color: darken($medium-gray, 5%);
53
+
54
+ label { color: #000 }
55
+ }
56
+
57
+ label {
58
+ display: inline-block;
59
+ vertical-align: middle;
60
+ cursor: pointer;
61
+ display: none;
62
+ }
63
+
64
+ .icon {
65
+ display: inline-block;
66
+ vertical-align: text-top;
67
+ @include opacity(0.7);
68
+ @include transition(opacity 100ms ease-in-out);
69
+ }
70
+ }
71
+
28
72
  .element_heading {
29
73
  padding: 0;
30
74
  z-index: 0;
@@ -121,10 +165,7 @@ span.preview_text_element_name {
121
165
  }
122
166
 
123
167
  .element_editor {
124
- border: 1px solid $default-border-color;
125
- @extend %rounded-border;
126
168
  background-color: $light-gray;
127
- margin-bottom: 2*$default-margin;
128
169
 
129
170
  &.not-draggable {
130
171
  @include opacity(0.5);
@@ -138,14 +179,17 @@ span.preview_text_element_name {
138
179
  }
139
180
  }
140
181
 
141
- &.selected {
182
+ &.selected > .edit_element {
142
183
  border-color: $blue;
143
184
  @include box-shadow(0 0 4px $blue);
144
185
  }
145
186
 
146
187
  form {
147
188
  margin: 0;
148
- padding: 8px 8px 0 8px;
189
+ padding: 0 8px;
190
+ margin-bottom: 2*$default-margin;
191
+ border: $default-border;
192
+ @include border-radius($default-border-radius);
149
193
  }
150
194
 
151
195
  .validation_notice {
@@ -202,14 +246,22 @@ span.preview_text_element_name {
202
246
 
203
247
  .element_head, .element_foot {
204
248
  position: relative;
249
+ background-color: $medium-gray;
250
+ margin-left: -8px;
251
+ margin-right: -8px;
205
252
  }
206
253
 
207
254
  .element_head {
208
255
  padding: 8px 0 6px;
209
- margin-bottom: 0;
256
+ margin-bottom: 2*$default-margin;
210
257
  height: 20px;
211
- background-color: $medium-gray;
212
258
  @extend .disable-user-select;
259
+ @include border-top-radius($default-border-radius);
260
+
261
+ .folded & {
262
+ margin-bottom: 0;
263
+ @include border-bottom-radius($default-border-radius);
264
+ }
213
265
 
214
266
  .spinner {
215
267
  top: 9px;
@@ -221,9 +273,7 @@ span.preview_text_element_name {
221
273
  padding: 2*$default-padding;
222
274
  width: 100%;
223
275
  height: 29px;
224
- margin-left: -8px;
225
- margin-right: -8px;
226
- background-color: $medium-gray;
276
+ @include border-bottom-radius($default-border-radius);
227
277
 
228
278
  .element_tools {
229
279
  float: left;
@@ -299,17 +349,19 @@ div#cells {
299
349
  min-height: 100px;
300
350
  }
301
351
 
302
- span.linkable_essence_tools {
352
+ .linkable_essence_tools {
303
353
  position: absolute;
304
354
  bottom: 0;
305
355
  right: 0;
306
356
 
307
- a.icon_button {
357
+ .icon_button {
308
358
  margin: 0 0 0 4px;
359
+ padding: 3px;
309
360
  position: absolute;
310
361
  bottom: 4px;
311
362
  right: 28px;
312
- @extend %border-radius-reset;
363
+ @extend %button-defaults;
364
+ @include border-radius(0);
313
365
 
314
366
  &.unlink {
315
367
  right: 0;
@@ -1,4 +1,10 @@
1
- textarea, input[type="text"], input[type="email"], input[type="password"], .thin_border, .input_field {
1
+ textarea,
2
+ input[type="url"],
3
+ input[type="text"],
4
+ input[type="email"],
5
+ input[type="password"],
6
+ .thin_border,
7
+ .input_field {
2
8
  @extend %default-input-style;
3
9
 
4
10
  &.dirty {
@@ -13,10 +19,10 @@ textarea {
13
19
  }
14
20
 
15
21
  input#search_input_field {
16
- width: 224px;
22
+ width: 204px;
17
23
  text-align: left;
18
24
  @include border-radius(21px);
19
- padding: 3px 26px;
25
+ padding: 3px 16px 3px 28px;
20
26
  margin: 0;
21
27
  height: 29px;
22
28
  }
@@ -30,13 +36,13 @@ div.search_field span.icon, div.js_filter_field_box span.icon {
30
36
  .js_filter_field_box {
31
37
  position: absolute;
32
38
  right: 4px;
33
- top: 4px;
39
+ top: 8px;
34
40
 
35
41
  .js_filter_field {
36
42
  width: 220px;
37
43
  text-align: left;
38
- @include border-radius(3px);
39
- padding: 3px 24px;
44
+ @include border-radius($default-border-radius);
45
+ padding: 3px 24px 3px 28px;
40
46
  height: 29px;
41
47
  margin: 0;
42
48
  }
@@ -54,3 +60,30 @@ div.search_field span.icon, div.js_filter_field_box span.icon {
54
60
 
55
61
  label { position: absolute }
56
62
  }
63
+
64
+ .alchemy-char-counter {
65
+ display: block;
66
+ clear: both;
67
+ text-align: right;
68
+
69
+ &.too-long {
70
+ color: $error_text_color;
71
+ }
72
+ }
73
+
74
+ fieldset {
75
+ border: none;
76
+ padding: 0;
77
+ margin: 1em 0;
78
+
79
+ legend {
80
+ font-weight: bold;
81
+ text-decoration: none;
82
+ margin-bottom: 0.5em;
83
+ }
84
+ }
85
+
86
+ ::-webkit-input-placeholder {
87
+ line-height: 1.5;
88
+ color: $default-border-color;
89
+ }
@@ -28,6 +28,7 @@ form {
28
28
  padding: $default-padding 0;
29
29
  @include pie-clearfix;
30
30
 
31
+ input[type="url"],
31
32
  input[type="text"],
32
33
  input[type="email"],
33
34
  input[type="password"],
@@ -113,6 +114,37 @@ form {
113
114
  }
114
115
  }
115
116
 
117
+ .inline-input {
118
+ @include clearfix;
119
+ margin: 0 -1*$default-margin;
120
+ @include box-sizing(border-box);
121
+
122
+ .left-column, .right-column {
123
+ padding: 0 $default-padding;
124
+ @include box-sizing(border-box);
125
+ }
126
+
127
+ .left-column {
128
+ width: $form-right-width;
129
+ float: left;
130
+ }
131
+
132
+ .right-column {
133
+ width: $form-left-width;
134
+ float: right;
135
+ }
136
+
137
+ button,
138
+ .button,
139
+ input[type="url"],
140
+ input[type="text"],
141
+ input[type="email"],
142
+ input[type="submit"],
143
+ input[type="password"] {
144
+ width: 100%;
145
+ }
146
+ }
147
+
116
148
  .control_group {
117
149
  width: $form-right-width;
118
150
  padding-top: 6px;
@@ -33,11 +33,11 @@
33
33
  }
34
34
 
35
35
  #main_navi {
36
- padding-top: 25px;
36
+ padding-top: 20px;
37
37
  padding-left: 4px;
38
38
  padding-bottom: 80px;
39
39
 
40
- a.main_navi_entry {
40
+ .main_navi_entry {
41
41
  color: #444;
42
42
  position: relative;
43
43
  text-align: center;
@@ -47,7 +47,7 @@
47
47
  @extend .left-rounded-border;
48
48
  border: 1px none #afafaf;
49
49
  border-right-style: none;
50
- padding-bottom: 5px;
50
+ padding-bottom: 6px;
51
51
  padding-left: 1px;
52
52
  width: 60px;
53
53
 
@@ -66,7 +66,7 @@
66
66
  padding-left: 0;
67
67
  border-right-style: none;
68
68
  padding-top: 6px;
69
- padding-bottom: 4px;
69
+ padding-bottom: 5px;
70
70
  }
71
71
 
72
72
  img {
@@ -142,7 +142,7 @@ div#overlay_text_box {
142
142
  #main_content {
143
143
  @include box-sizing(border-box);
144
144
  background-color: $light-gray;
145
- padding: 88px 8px 8px 74px;
145
+ padding: 83px 8px 8px 74px;
146
146
  z-index: 0;
147
147
  width: 100%;
148
148
  height: 100%;
@@ -158,27 +158,29 @@ div#overlay_text_box {
158
158
 
159
159
  div#user_info {
160
160
  position: absolute;
161
- z-index: 10;
162
- line-height: 27px;
163
- height: 29px;
164
- font-size: 11px;
161
+ top: 0;
165
162
  right: 65px;
166
- top: -3px;
163
+ line-height: 28px;
164
+ font-size: 11px;
167
165
  padding: 0 8px;
168
166
  background-color: $light-blue;
169
167
 
170
168
  .select2-container {
171
- margin-right: 2 * $default-margin;
169
+ margin-top: -2px;
170
+ margin-right: $default-margin;
171
+ }
172
+
173
+ .current-user-name {
174
+ padding-right: $default-padding;
172
175
  }
173
176
  }
174
177
 
175
178
  #sub_navigation {
176
- height: 22px;
177
- line-height: 21px;
179
+ height: 24px;
180
+ line-height: 23px;
178
181
  background: $light-blue;
179
182
  border-bottom: $default-border;
180
183
  padding-top: 4px;
181
- z-index: 5;
182
184
  position: relative;
183
185
 
184
186
  a {
@@ -189,48 +191,46 @@ div#user_info {
189
191
  }
190
192
  }
191
193
 
192
- span.page_status_and_name {
194
+ .page_status_and_name {
193
195
  padding: 0 8px;
194
196
  background-color: $medium-gray;
195
197
  text-shadow: 0px 1px 1px #FFFFFF;
196
198
  @extend .disable-user-select;
197
199
  cursor: default;
198
- line-height: 20px;
200
+ line-height: 22px;
199
201
  float: left;
200
202
  @extend .top-rounded-border;
201
203
  border: $default-border;
202
204
  border-bottom-style: none;
203
- height: 22px;
205
+ height: 24px;
204
206
  margin-right: 1px;
207
+ }
205
208
 
206
- .page_language {
207
- float: none;
208
- position: relative;
209
- @include inline-block;
210
- bottom: 2px;
211
- border: 1px solid #f0c8d1;
212
- background-color: #f0c8d1;
213
- color: #ac3d57;
214
- @extend %rounded-border;
215
- margin-right: 2px;
216
- padding: 2px 3px;
217
- line-height: 11px;
218
- }
209
+ .page_name {
210
+ position: relative;
211
+ margin-right: $default-margin;
212
+ line-height: 27px;
213
+ bottom: 2px;
214
+ }
219
215
 
220
- span.page_name {
221
- position: relative;
222
- margin-right: 16px;
223
- margin-left: 4px;
224
- line-height: 27px;
225
- bottom: 2px;
226
- }
216
+ .page_language {
217
+ float: none;
218
+ position: relative;
219
+ @include inline-block;
220
+ bottom: 3px;
221
+ color: #3265b1;
222
+ @extend %rounded-border;
223
+ margin-right: 2px;
224
+ font-size: 10px;
225
+ line-height: 12px;
226
+ text-transform: uppercase;
227
227
  }
228
228
 
229
- div.subnavi_tab {
229
+ .subnavi_tab {
230
230
  float: left;
231
231
  padding: 0px 8px;
232
- line-height: 19px;
233
- height: 21px;
232
+ line-height: 21px;
233
+ height: 23px;
234
234
  text-shadow: #fff 0 0px 4px;
235
235
  background: #d6e0e6;
236
236
  color: #444;
@@ -260,7 +260,7 @@ div#user_info {
260
260
  float: left;
261
261
  position: relative;
262
262
  padding: 0px 8px;
263
- height: 22px;
263
+ height: 24px;
264
264
  color: $text-color;
265
265
  background-color: $medium-gray;
266
266
  text-shadow: #fff 0 1px 2px;
@@ -272,14 +272,14 @@ div#user_info {
272
272
  }
273
273
 
274
274
  #subnav_additions {
275
- height: 23px;
275
+ height: 25px;
276
276
  overflow: hidden;
277
277
 
278
278
  label {
279
279
  float: left;
280
280
  font-size: 10px;
281
- line-height: 25px;
282
- height: 25px;
281
+ line-height: 27px;
282
+ height: 27px;
283
283
  margin-left: 8px;
284
284
  margin-right: 4px;
285
285
  }
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  &.close {
51
- background-position: -416px -40px;
51
+ background-position: -416px -39px;
52
52
 
53
53
  &.small {
54
54
  background: none;
@@ -297,7 +297,7 @@
297
297
  }
298
298
 
299
299
  &.visit_page {
300
- background-position: -31px -137px;
300
+ background-position: -31px -135px;
301
301
  }
302
302
 
303
303
  &.warning, &.warn, &.alert {