alchemy_cms 2.0.rc2 → 2.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. data/app/controllers/admin/attachments_controller.rb +47 -21
  2. data/app/controllers/admin/clipboard_controller.rb +2 -0
  3. data/app/controllers/admin/elements_controller.rb +2 -0
  4. data/app/controllers/admin/essence_files_controller.rb +7 -6
  5. data/app/controllers/admin/languages_controller.rb +1 -0
  6. data/app/controllers/admin/pictures_controller.rb +49 -34
  7. data/app/controllers/admin/users_controller.rb +2 -0
  8. data/app/controllers/admin_controller.rb +1 -0
  9. data/app/controllers/alchemy_controller.rb +9 -0
  10. data/app/helpers/alchemy_helper.rb +8 -2
  11. data/app/models/attachment.rb +5 -0
  12. data/app/models/element.rb +4 -0
  13. data/app/sweepers/pictures_sweeper.rb +2 -1
  14. data/app/views/admin/attachments/_archive_overlay.html.erb +25 -0
  15. data/app/views/admin/attachments/_file_to_assign.html.erb +2 -2
  16. data/app/views/admin/attachments/create.js.erb +4 -2
  17. data/app/views/admin/contents/create.js.erb +16 -7
  18. data/app/views/admin/elements/_add_content.html.erb +1 -3
  19. data/app/views/admin/essence_files/edit.html.erb +5 -5
  20. data/app/views/admin/essence_pictures/destroy.js.erb +6 -3
  21. data/app/views/admin/pages/edit.html.erb +1 -1
  22. data/app/views/admin/partials/_remote_search_form.html.erb +4 -3
  23. data/app/views/admin/partials/_upload_form.html.erb +1 -3
  24. data/app/views/admin/pictures/_archive_overlay.html.erb +18 -0
  25. data/app/views/admin/pictures/_filter_and_size_bar.html.erb +6 -17
  26. data/app/views/admin/pictures/_picture.html.erb +14 -16
  27. data/app/views/admin/pictures/_picture_to_assign.html.erb +27 -29
  28. data/app/views/admin/pictures/create.js.erb +10 -10
  29. data/app/views/admin/pictures/index.html.erb +35 -5
  30. data/app/views/essences/_essence_file_editor.html.erb +4 -4
  31. data/app/views/essences/_essence_picture_editor.html.erb +2 -2
  32. data/app/views/essences/_essence_picture_tools.html.erb +1 -3
  33. data/assets/javascripts/alchemy.js +2 -2
  34. data/assets/stylesheets/alchemy.css +127 -132
  35. data/assets/stylesheets/elements.css +19 -39
  36. data/config/routes.rb +6 -8
  37. data/lib/alchemy/remote_pagination_link_renderer.rb +12 -1
  38. data/lib/alchemy/version.rb +1 -1
  39. data/spec/dummy/public/stylesheets/alchemy/alchemy.css +197 -173
  40. data/spec/dummy/public/stylesheets/alchemy/elements.css +6 -6
  41. metadata +6 -8
  42. data/app/views/admin/attachments/archive_overlay.html.erb +0 -8
  43. data/app/views/admin/pictures/_archive_overlay_images.html.erb +0 -16
  44. data/app/views/admin/pictures/archive_overlay.html.erb +0 -3
  45. data/app/views/admin/pictures/update.js.erb +0 -11
@@ -6,7 +6,7 @@
6
6
  <div class="file_icon">
7
7
  <%- if content.ingredient.nil? -%>
8
8
  <%= link_to_overlay_window("",
9
- archive_overlay_admin_attachments_path(
9
+ admin_attachments_path(
10
10
  :content_id => content.id,
11
11
  :only => options[:file_assign_show_only],
12
12
  :except => options[:file_assign_do_not_show],
@@ -25,12 +25,12 @@
25
25
  <%- end -%>
26
26
  </div>
27
27
  <div class="file_name">
28
- <%= content.ingredient.name rescue "&#x2190;" + _('assign_file_from_archive') %>
28
+ <%= content.ingredient.name rescue ("&#x2190;" + _('assign_file_from_archive')).html_safe %>
29
29
  </div>
30
30
  <%- unless content.ingredient.nil? -%>
31
31
  <div class="essence_file_tools">
32
32
  <%= link_to_overlay_window("",
33
- archive_overlay_admin_attachments_path(
33
+ admin_attachments_path(
34
34
  :content_id => content.id,
35
35
  :only => options[:file_assign_show_only],
36
36
  :except => options[:file_assign_do_not_show],
@@ -52,7 +52,7 @@
52
52
  ),
53
53
  {
54
54
  :title => _('edit_file_properties'),
55
- :size => '365x150'
55
+ :size => '400x150'
56
56
  },
57
57
  :class => 'edit_file',
58
58
  :title => _('edit_file_properties')
@@ -1,5 +1,5 @@
1
1
  <div id="<%= content_dom_id(content) %>" class="<%= options[:dragable] ? 'essence_picture_editor dragable_picture' : 'essence_picture_editor' %>">
2
- <div class="picture_detail">
2
+ <div class="picture_thumbnail">
3
3
  <span class="picture_tool_delete">
4
4
  <%= link_to_confirmation_window(
5
5
  "",
@@ -26,7 +26,7 @@
26
26
  <%- else -%>
27
27
  <div class="picture_handle" title="<%= _('drag_to_sort') if options[:dragable] %>"></div>
28
28
  <div class="picture_content_spinner">
29
- <%= image_tag("alchemy/ajax_loader.gif", :alt => '') %>
29
+ <%= image_tag("alchemy/image_loader.gif", :alt => '') %>
30
30
  </div>
31
31
  <div class="picture_image">
32
32
  <div class="thumbnail_background">
@@ -13,9 +13,7 @@
13
13
 
14
14
  <%= link_to_overlay_window(
15
15
  render_icon('swap_picture'),
16
- url_for(
17
- :controller => 'pictures',
18
- :action => 'archive_overlay',
16
+ admin_pictures_path(
19
17
  :element_id => content.element,
20
18
  :content_id => content,
21
19
  :swap => true,
@@ -207,7 +207,7 @@ if (typeof(Alchemy) === 'undefined') {
207
207
  url: path,
208
208
  success: function(data, textStatus, XMLHttpRequest) {
209
209
  $dialog.html(data);
210
- Alchemy.ButtonObserver('#alchemyElementWindow button.button');
210
+ Alchemy.ButtonObserver('#alchemyElementWindow .button');
211
211
  },
212
212
  error: function(XMLHttpRequest, textStatus, errorThrown) {
213
213
  Alchemy.AjaxErrorHandler($dialog, XMLHttpRequest.status, textStatus, errorThrown);
@@ -821,7 +821,7 @@ if (typeof(Alchemy) === 'undefined') {
821
821
  var $button = $(button), $clone = $button.clone(), width = $button.outerWidth(), text = $button.text();
822
822
  $button.hide();
823
823
  $button.parent().append($clone);
824
- $clone.attr({disabled: true})
824
+ $clone.attr({disabled: true, href: 'javascript:void(0)'})
825
825
  .addClass('disabled cloned-button')
826
826
  .css({width: width})
827
827
  .html('<img src="/images/alchemy/ajax_loader.gif">')
@@ -2021,6 +2021,7 @@ td.role {
2021
2021
 
2022
2022
  #archive_all {
2023
2023
  padding: 16px;
2024
+ overflow: auto;
2024
2025
  }
2025
2026
 
2026
2027
  #archive_all .padding_left_right {
@@ -2028,40 +2029,6 @@ td.role {
2028
2029
  padding-left: 8px;
2029
2030
  }
2030
2031
 
2031
- .picture_image {
2032
- overflow: hidden;
2033
- position: absolute;
2034
- z-index: 0;
2035
- padding: 1px 0 1px 1px;
2036
- }
2037
-
2038
- div#archive_all .picture_detail {
2039
- padding: 2px 0 0;
2040
- margin: 0 16px 16px 0;
2041
- height: 118px;
2042
- width: 118px;
2043
- }
2044
-
2045
- #archive_all .picture_name {
2046
- width: 110px;
2047
- height: 12px;
2048
- padding-top: 2px;
2049
- padding-bottom: 2px;
2050
- display: block;
2051
- text-align: center;
2052
- white-space: nowrap;
2053
- overflow: hidden;
2054
- position: absolute;
2055
- bottom: 3px;
2056
- left: 4px;
2057
- font-family: "Courier New", Courier, mono;
2058
- line-height: 11px;
2059
- }
2060
-
2061
- #archive_all .picture_name.rename.hover {
2062
- cursor: text;
2063
- }
2064
-
2065
2032
  .inplace-edit {
2066
2033
  background-color: #ededed;
2067
2034
  position: absolute;
@@ -2115,70 +2082,6 @@ div.spinner {
2115
2082
  left: 0;
2116
2083
  }
2117
2084
 
2118
- div.image_spinner {
2119
- background-color: #666;
2120
- }
2121
-
2122
- div.image_spinner img {
2123
- position: absolute;
2124
- z-index: 0;
2125
- top: 32px;
2126
- left: 40px;
2127
- }
2128
-
2129
- .picture_detail {
2130
- width: 118px;
2131
- height: 118px;
2132
- padding: 2px 0 0;
2133
- margin: 2px 1px 2px 2px;
2134
- background-color: #fff;
2135
- float: left;
2136
- padding: 3px 0 0;
2137
- border: 1px solid #c0c0c0;
2138
- position: relative;
2139
- -webkit-border-radius: 3px;
2140
- -moz-border-radius: 3px;
2141
- -o-border-radius: 3px;
2142
- border-radius: 3px;
2143
- }
2144
-
2145
- .picture_detail .picture_image {
2146
- text-align: center;
2147
- margin-left: 3px;
2148
- margin-bottom: 2px;
2149
- width: 110px;
2150
- height: 93px;
2151
- }
2152
-
2153
- #archive_all .picture_image {
2154
- margin-bottom: 0;
2155
- position: relative;
2156
- margin-top: 1px;
2157
- height: 93px;
2158
- }
2159
-
2160
- #archive_all .picture_detail:hover .picture_tool_delete {
2161
- display: block;
2162
- }
2163
-
2164
- .picture_image a {
2165
- cursor: -webkit-zoom-in;
2166
- cursor: -moz-zoom-in;
2167
- cursor: -o-zoom-in;
2168
- cursor: zoom-in;
2169
- }
2170
-
2171
- .thumbnail_background {
2172
- margin: auto;
2173
- float: none;
2174
- display: table-cell;
2175
- width: 111px;
2176
- height: 93px;
2177
- background-color: #666;
2178
- vertical-align: middle;
2179
- text-align: center;
2180
- }
2181
-
2182
2085
  .headline_text_editor {
2183
2086
  overflow: auto;
2184
2087
  width: 374px;
@@ -2908,7 +2811,7 @@ label.sup {
2908
2811
  bottom: 3px;
2909
2812
  }
2910
2813
 
2911
- div.assign_image_list_detail {
2814
+ /*div.assign_image_list_detail {
2912
2815
  background-color: #ffffff;
2913
2816
  text-align: center;
2914
2817
  float: left;
@@ -2921,72 +2824,175 @@ div.assign_image_list_detail {
2921
2824
  -moz-border-radius: 3px;
2922
2825
  -o-border-radius: 3px;
2923
2826
  border-radius: 3px;
2924
- }
2827
+ }*/
2925
2828
 
2926
2829
  #assign_image_list {
2927
2830
  padding: 8px;
2928
2831
  overflow: hidden;
2929
2832
  }
2930
2833
 
2931
- #assign_image_list div.assign_image_list_detail.small {
2834
+ /* @group Picture Thumbnails */
2835
+
2836
+ .picture_thumbnail {
2837
+ padding: 4px;
2838
+ margin: 2px 1px 2px 2px;
2839
+ background-color: #fff;
2840
+ float: left;
2841
+ border: 1px solid #c0c0c0;
2842
+ position: relative;
2843
+ -webkit-border-radius: 3px;
2844
+ -moz-border-radius: 3px;
2845
+ -o-border-radius: 3px;
2846
+ border-radius: 3px;
2847
+ }
2848
+
2849
+ div#archive_all .picture_thumbnail {
2850
+ margin: 0 16px 16px 0;
2851
+ }
2852
+
2853
+ #archive_all .picture_thumbnail:hover .picture_tool_delete {
2854
+ display: block;
2855
+ }
2856
+
2857
+ .picture_thumbnail .thumbnail_background {
2858
+ display: table-cell;
2859
+ width: 160px;
2860
+ height: 120px;
2861
+ background-color: #666;
2862
+ text-align: center;
2863
+ vertical-align: middle;
2864
+ padding: 0;
2865
+ }
2866
+
2867
+ .picture_thumbnail.small .thumbnail_background {
2868
+ width: 80px;
2869
+ height: 60px;
2870
+ }
2871
+
2872
+ .picture_thumbnail.medium .thumbnail_background {
2873
+ width: 160px;
2874
+ height: 120px;
2875
+ }
2876
+
2877
+ .picture_thumbnail.large .thumbnail_background {
2878
+ width: 240px;
2879
+ height: 180px;
2880
+ }
2881
+
2882
+ #archive_all .picture_thumbnail .thumbnail_background {
2883
+ cursor: -webkit-zoom-in;
2884
+ cursor: -moz-zoom-in;
2885
+ cursor: -o-zoom-in;
2886
+ cursor: zoom-in;
2887
+ }
2888
+
2889
+ .essence_picture_editor .picture_thumbnail {
2890
+ width: 111px;
2891
+ height: 115px;
2892
+ margin: 3px;
2893
+ }
2894
+
2895
+ .essence_picture_editor .picture_thumbnail .thumbnail_background {
2896
+ width: 111px;
2897
+ height: 93px;
2898
+ }
2899
+
2900
+ div.picture_thumbnail.small {
2932
2901
  width: 80px;
2933
2902
  height: 75px;
2934
2903
  }
2935
2904
 
2936
- #assign_image_list div.assign_image_list_detail.medium {
2905
+ div.picture_thumbnail.medium {
2937
2906
  width: 160px;
2938
- height: 135px;
2907
+ height: 140px;
2939
2908
  }
2940
2909
 
2941
- #assign_image_list div.assign_image_list_detail.large {
2910
+ div.picture_thumbnail.large {
2942
2911
  width: 240px;
2943
2912
  height: 195px;
2944
2913
  }
2945
2914
 
2915
+ .picture_thumbnail .picture_name {
2916
+ height: 12px;
2917
+ display: block;
2918
+ text-align: center;
2919
+ white-space: nowrap;
2920
+ overflow: hidden;
2921
+ position: absolute;
2922
+ bottom: 1px;
2923
+ left: 0;
2924
+ font-family: "Courier New", Courier, mono;
2925
+ line-height: 11px;
2926
+ padding: 2px 0;
2927
+ margin-right: 4px;
2928
+ margin-left: 4px;
2929
+ }
2930
+
2931
+ .picture_thumbnail .picture_name.rename.hover {
2932
+ cursor: text;
2933
+ }
2934
+
2935
+ .picture_thumbnail.small .picture_name {
2936
+ width: 80px;
2937
+ }
2938
+
2939
+ .picture_thumbnail.medium .picture_name {
2940
+ width: 160px;
2941
+ bottom: 3px;
2942
+ }
2943
+
2944
+ .picture_thumbnail.large .picture_name {
2945
+ width: 240px;
2946
+ }
2947
+
2946
2948
  div.assign_image_list_image {
2947
2949
  text-align: center;
2948
2950
  overflow: hidden;
2949
2951
  position: relative;
2950
2952
  }
2951
2953
 
2952
- .assign_image_list_detail.small div.image_spinner img {
2954
+ div.picture_thumbnail.small div.image_spinner img {
2953
2955
  top: 14px;
2954
2956
  left: 25px;
2955
2957
  }
2956
2958
 
2957
- .assign_image_list_detail.medium div.image_spinner img {
2959
+ div.picture_thumbnail.medium div.image_spinner img {
2958
2960
  top: 42px;
2959
2961
  left: 64px;
2960
2962
  }
2961
2963
 
2962
- .assign_image_list_detail.large div.image_spinner img {
2964
+ div.picture_thumbnail.large div.image_spinner img {
2963
2965
  top: 74px;
2964
2966
  left: 108px;
2965
2967
  }
2966
2968
 
2967
- #assign_image_list div.assign_image_list_image a {
2968
- width: 160px;
2969
- height: 120px;
2969
+ div.image_spinner {
2970
+ background-color: #666;
2971
+ width: 1px;
2972
+ margin: 4px;
2970
2973
  }
2971
2974
 
2972
- #assign_image_list div.assign_image_list_detail.small div.assign_image_list_image,
2973
- #assign_image_list div.assign_image_list_detail.small div.assign_image_list_image a {
2974
- width: 80px;
2975
+ div.picture_thumbnail.small .image_spinner {
2975
2976
  height: 60px;
2977
+ margin: 4px;
2976
2978
  }
2977
2979
 
2978
- #assign_image_list div.assign_image_list_detail.medium div.assign_image_list_image,
2979
- #assign_image_list div.assign_image_list_detail.medium div.assign_image_list_image a {
2980
- width: 160px;
2980
+ div.picture_thumbnail.medium .image_spinner {
2981
2981
  height: 120px;
2982
+ margin: 4px;
2982
2983
  }
2983
2984
 
2984
- #assign_image_list div.assign_image_list_detail.large div.assign_image_list_image,
2985
- #assign_image_list div.assign_image_list_detail.large div.assign_image_list_image a {
2986
- width: 240px;
2985
+ div.picture_thumbnail.large .image_spinner {
2987
2986
  height: 180px;
2988
2987
  }
2989
2988
 
2989
+ div.image_spinner img {
2990
+ position: absolute;
2991
+ z-index: 0;
2992
+ top: 32px;
2993
+ left: 40px;
2994
+ }
2995
+
2990
2996
  #assign_image_list div.assign_image_list_image img {
2991
2997
  border-style: none;
2992
2998
  }
@@ -2995,6 +3001,8 @@ div.assign_image_list_image {
2995
3001
 
2996
3002
  }
2997
3003
 
3004
+ /* @end */
3005
+
2998
3006
  div#errors {
2999
3007
  margin-bottom: 8px;
3000
3008
  padding: 8px 8px 4px 28px;
@@ -3077,14 +3085,6 @@ input#user_admin {
3077
3085
  line-height: 19px;
3078
3086
  }
3079
3087
 
3080
- #assign_image_list div.assign_image_list_detail .picture_to_assign_name {
3081
- white-space: nowrap;
3082
- overflow: hidden;
3083
- padding-top: 3px;
3084
- display: block;
3085
- font: 12px "Courier New", Courier, mono;
3086
- }
3087
-
3088
3088
  #alchemy div#overlay_toolbar div#image_assign_filter_and_image_sizing form {
3089
3089
  float: right;
3090
3090
  width: 290px;
@@ -3484,11 +3484,6 @@ div#overlay_toolbar {
3484
3484
  padding: 8px;
3485
3485
  }
3486
3486
 
3487
- #overlay_toolbar div.js_filter_field_box {
3488
- margin-top: 6px;
3489
- margin-right: 8px;
3490
- }
3491
-
3492
3487
  div#overlay_toolbar div.toolbar_spacer {
3493
3488
  float: left;
3494
3489
  width: 1px;
@@ -1,3 +1,5 @@
1
+ /* @override http://localhost:3000/stylesheets/alchemy/elements.css */
2
+
1
3
  /* @override
2
4
  http://0.0.0.0:3000/stylesheets/alchemy/elements.css
3
5
  http://localhost:3000/stylesheets/alchemy/elements.css
@@ -103,13 +105,13 @@ div.element_foot span.element_public {
103
105
 
104
106
  .add_content {
105
107
  float: left;
106
- margin: 2px 1px 2px 2px;
107
- width: 118px;
108
- padding: 0;
108
+ margin: 3px;
109
+ width: 111px;
110
+ padding: 4px;
109
111
  background-color: #f0e8d7;
110
112
  border: 1px solid #c2baab;
111
113
  border-radius: 3px;
112
- height: 121px;
114
+ height: 115px;
113
115
  }
114
116
 
115
117
  .add_content a {
@@ -129,8 +131,8 @@ div.element_foot span.element_public {
129
131
  .add_content a .icon.assign {
130
132
  background: url(/images/alchemy/icons.png) no-repeat -144px -40px;
131
133
  position: absolute;
132
- top: 54px;
133
- left: 51px;
134
+ top: 52px;
135
+ left: 47px;
134
136
  }
135
137
 
136
138
  .element_foot {
@@ -260,41 +262,19 @@ div.picture_gallery_images {
260
262
  overflow: hidden;
261
263
  margin-bottom: 8px;
262
264
  border: 1px inset #cecece;
263
- padding-left: 1px;
265
+ padding-left: 2px;
264
266
  -webkit-border-radius: 3px;
265
267
  -moz-border-radius: 3px;
266
268
  border-radius: 3px;
267
269
  background-color: #e5dcca;
268
270
  }
269
271
 
270
- div.picture_detail div.picture_image img.img_paddingtop {
272
+ div.picture_thumbnail div.picture_image img.img_paddingtop {
271
273
  -moz-user-select: none;
272
274
  -webkit-user-select: none;
273
275
  user-select: none;
274
276
  }
275
277
 
276
- .gallery_index div.picture_gallery_images {
277
- margin-top: 8px;
278
- height: 100%;
279
- border: 1px inset #b1b1b1;
280
- padding-left: 1px;
281
- padding-top: 1px;
282
- padding-bottom: 1px;
283
- overflow: hidden;
284
- margin-bottom: 11px;
285
- width: 374px;
286
- margin-left: 7px;
287
- }
288
-
289
- form.add_gallery_to_index span {
290
- float: left;
291
- padding-top: 3px;
292
- }
293
-
294
- form.add_gallery_to_index select {
295
- float: left;
296
- }
297
-
298
278
  /* @group add moclecule */
299
279
 
300
280
  .new_alchemy_element {
@@ -481,7 +461,7 @@ div.essence_picture_editor .picture_tool_delete {
481
461
  z-index: 2;
482
462
  }
483
463
 
484
- div.essence_picture_editor.validation_failed .picture_detail {
464
+ div.essence_picture_editor.validation_failed .picture_thumbnail {
485
465
  border-color: #931f23;
486
466
  -webkit-box-shadow: #931f23 0px 1px 3px;
487
467
  -moz-box-shadow: #931f23 0px 1px 3px;
@@ -511,23 +491,23 @@ div.essence_picture_editor:hover .picture_tool_delete {
511
491
  float: left;
512
492
  }
513
493
 
514
- .picture_detail div.missing_image {
494
+ .picture_thumbnail div.missing_image {
515
495
  height: 94px;
516
496
  text-align: center;
517
497
  line-height: 47px;
518
498
  color: #b3b3b3;
519
499
  }
520
500
 
521
- .validation_failed .picture_detail div.missing_image {
501
+ .validation_failed .picture_thumbnail div.missing_image {
522
502
  color: #931f23;
523
503
  }
524
504
 
525
- .picture_detail div.missing_image img {
505
+ .picture_thumbnail div.missing_image img {
526
506
  position: relative;
527
507
  top: 10px;
528
508
  }
529
509
 
530
- .picture_detail .picture_handle {
510
+ .picture_thumbnail .picture_handle {
531
511
  position: absolute;
532
512
  z-index: 1;
533
513
  width: 110px;
@@ -817,10 +797,10 @@ textarea {
817
797
  border: 1px dotted #bba589;
818
798
  background-color: #f0e8d7;
819
799
  float: left;
820
- width: 118px;
821
- height: 119px;
822
- padding: 2px 0 0;
823
- margin: 2px 1px 2px 2px;
800
+ width: 111px;
801
+ height: 115px;
802
+ padding: 4px;
803
+ margin: 3px;
824
804
  }
825
805
 
826
806
  div.element_editor div.error {