alchemy_cms 2.2.4 → 2.3.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. data/.gitignore +1 -1
  2. data/.travis.yml +3 -4
  3. data/Gemfile +1 -0
  4. data/README.md +10 -6
  5. data/alchemy_cms.gemspec +5 -2
  6. data/app/assets/images/alchemy/icons.png +0 -0
  7. data/app/assets/images/sassy-ie-overlay.png +0 -0
  8. data/app/assets/javascripts/alchemy/alchemy.base.js +50 -59
  9. data/app/assets/javascripts/alchemy/alchemy.buttons.js +14 -4
  10. data/app/assets/javascripts/alchemy/alchemy.datepicker.js +8 -2
  11. data/app/assets/javascripts/alchemy/alchemy.elements_window.js +11 -3
  12. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +1 -1
  13. data/app/assets/javascripts/alchemy/alchemy.link_overlay.js.coffee +14 -1
  14. data/app/assets/javascripts/alchemy/alchemy.preview.js +1 -1
  15. data/app/assets/javascripts/alchemy/alchemy.preview_window.js +12 -4
  16. data/app/assets/javascripts/alchemy/alchemy.uploader.js +4 -1
  17. data/app/assets/javascripts/alchemy/alchemy.windows.js +18 -8
  18. data/app/assets/stylesheets/alchemy/_defaults.scss +84 -120
  19. data/app/assets/stylesheets/alchemy/alchemy.css +2 -2
  20. data/app/assets/stylesheets/alchemy/archive.css.scss +288 -0
  21. data/app/assets/stylesheets/alchemy/base.css.scss +95 -390
  22. data/app/assets/stylesheets/alchemy/dashboard.css.scss +4 -4
  23. data/app/assets/stylesheets/alchemy/elements.css.scss +83 -118
  24. data/app/assets/stylesheets/alchemy/flash.css.scss +1 -1
  25. data/app/assets/stylesheets/alchemy/form_elements.css.scss +528 -0
  26. data/app/assets/stylesheets/alchemy/frame.css.scss +13 -39
  27. data/app/assets/stylesheets/alchemy/icons.css.scss +217 -228
  28. data/app/assets/stylesheets/alchemy/jquery-ui.alchemy.css.scss +48 -50
  29. data/app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss +1 -1
  30. data/app/assets/stylesheets/alchemy/login.css.scss +1 -5
  31. data/app/assets/stylesheets/alchemy/menubar.css.scss +19 -29
  32. data/app/assets/stylesheets/alchemy/pagination.css.scss +3 -4
  33. data/app/assets/stylesheets/alchemy/sitemap.css.scss +81 -81
  34. data/app/assets/stylesheets/alchemy/tables.css.scss +63 -57
  35. data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +57 -57
  36. data/app/assets/stylesheets/alchemy/upload.css.scss +6 -6
  37. data/app/assets/stylesheets/tiny_mce/plugins/inlinepopups/skins/alchemy/window.css.scss +6 -10
  38. data/app/controllers/alchemy/admin/attachments_controller.rb +5 -4
  39. data/app/controllers/alchemy/admin/base_controller.rb +1 -9
  40. data/app/controllers/alchemy/admin/contents_controller.rb +4 -6
  41. data/app/controllers/alchemy/admin/elements_controller.rb +2 -2
  42. data/app/controllers/alchemy/admin/pages_controller.rb +2 -2
  43. data/app/controllers/alchemy/admin/pictures_controller.rb +74 -15
  44. data/app/controllers/alchemy/attachments_controller.rb +8 -2
  45. data/app/controllers/alchemy/base_controller.rb +47 -5
  46. data/app/controllers/alchemy/elements_controller.rb +1 -1
  47. data/app/controllers/alchemy/messages_controller.rb +12 -12
  48. data/app/controllers/alchemy/pages_controller.rb +5 -1
  49. data/app/controllers/alchemy/pictures_controller.rb +9 -4
  50. data/app/controllers/alchemy/user_sessions_controller.rb +2 -4
  51. data/app/helpers/alchemy/admin/base_helper.rb +98 -19
  52. data/app/helpers/alchemy/admin/contents_helper.rb +2 -2
  53. data/app/helpers/alchemy/admin/elements_helper.rb +2 -3
  54. data/app/helpers/alchemy/base_helper.rb +6 -5
  55. data/app/helpers/alchemy/elements_helper.rb +2 -2
  56. data/app/helpers/alchemy/essences_helper.rb +4 -5
  57. data/app/helpers/alchemy/pages_helper.rb +15 -79
  58. data/app/helpers/alchemy/url_helper.rb +67 -0
  59. data/app/mailers/alchemy/messages.rb +1 -1
  60. data/app/mailers/alchemy/notifications.rb +1 -1
  61. data/app/models/alchemy/attachment.rb +11 -2
  62. data/app/models/alchemy/cell.rb +20 -10
  63. data/app/models/alchemy/content.rb +4 -3
  64. data/app/models/alchemy/element.rb +170 -178
  65. data/app/models/alchemy/language/code.rb +4 -1
  66. data/app/models/alchemy/message.rb +19 -3
  67. data/app/models/alchemy/page.rb +45 -40
  68. data/app/models/alchemy/picture.rb +24 -2
  69. data/app/models/alchemy/user.rb +2 -3
  70. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +12 -12
  71. data/app/views/alchemy/admin/attachments/_attachment.html.erb +1 -1
  72. data/app/views/alchemy/admin/attachments/create.js.erb +1 -0
  73. data/app/views/alchemy/admin/attachments/edit.html.erb +9 -3
  74. data/app/views/alchemy/admin/attachments/index.html.erb +3 -2
  75. data/app/views/alchemy/admin/contents/_missing.html.erb +1 -1
  76. data/app/views/alchemy/admin/contents/create.js.erb +54 -0
  77. data/app/views/alchemy/admin/contents/new.html.erb +9 -4
  78. data/app/views/alchemy/admin/elements/{_add_content.html.erb → _add_picture.html.erb} +4 -4
  79. data/app/views/alchemy/admin/elements/_elements_select.html.erb +2 -1
  80. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +1 -1
  81. data/app/views/alchemy/admin/elements/{_picture_editor.html.erb → _picture_gallery_editor.html.erb} +7 -11
  82. data/app/views/alchemy/admin/elements/fold.js.erb +46 -0
  83. data/app/views/alchemy/admin/elements/index.html.erb +24 -24
  84. data/app/views/alchemy/admin/elements/list.js.erb +11 -9
  85. data/app/views/alchemy/admin/essence_files/assign.js.erb +3 -1
  86. data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +28 -0
  87. data/app/views/alchemy/admin/pages/_contactform_links.html.erb +8 -6
  88. data/app/views/alchemy/admin/pages/_external_link.html.erb +11 -9
  89. data/app/views/alchemy/admin/pages/_file_link.html.erb +10 -8
  90. data/app/views/alchemy/admin/pages/_internal_link.html.erb +14 -10
  91. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
  92. data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
  93. data/app/views/alchemy/admin/pages/_page_for_links.html.erb +32 -21
  94. data/app/views/alchemy/admin/pages/configure.html.erb +2 -2
  95. data/app/views/alchemy/admin/pages/configure_external.html.erb +13 -13
  96. data/app/views/alchemy/admin/pages/edit.html.erb +2 -2
  97. data/app/views/alchemy/admin/pages/index.html.erb +26 -24
  98. data/app/views/alchemy/admin/pages/link.html.erb +2 -5
  99. data/app/views/alchemy/admin/partials/_upload_form.html.erb +28 -12
  100. data/app/views/alchemy/admin/pictures/_archive.html.erb +54 -0
  101. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +10 -7
  102. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +21 -22
  103. data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +31 -0
  104. data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +9 -0
  105. data/app/views/alchemy/admin/pictures/_picture.html.erb +36 -6
  106. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +27 -0
  107. data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +3 -1
  108. data/app/views/alchemy/admin/pictures/create.js.erb +4 -5
  109. data/app/views/alchemy/admin/pictures/edit.html.erb +26 -0
  110. data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +39 -0
  111. data/app/views/alchemy/admin/pictures/index.html.erb +81 -70
  112. data/app/views/alchemy/admin/pictures/index.js.erb +3 -0
  113. data/app/views/alchemy/admin/pictures/new.html.erb +1 -0
  114. data/app/views/alchemy/admin/resources/index.html.erb +3 -1
  115. data/app/views/alchemy/admin/users/_table.html.erb +1 -1
  116. data/app/views/alchemy/admin/users/index.html.erb +27 -23
  117. data/app/views/alchemy/elements/_article_editor.html.erb +7 -2
  118. data/app/views/alchemy/elements/_bild_editor.html.erb +1 -1
  119. data/app/views/alchemy/elements/_bild_text_editor.html.erb +6 -1
  120. data/app/views/alchemy/elements/_bild_text_view.html.erb +3 -3
  121. data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +1 -1
  122. data/app/views/alchemy/elements/_image_mosaic_view.html.erb +2 -2
  123. data/app/views/alchemy/elements/_intro_image_text_view.html.erb +4 -4
  124. data/app/views/alchemy/elements/_searchresult_editor.html.erb +4 -1
  125. data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +1 -1
  126. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +2 -3
  127. data/app/views/alchemy/essences/_essence_picture_tools.html.erb +1 -1
  128. data/app/views/alchemy/search/_form.html.erb +8 -0
  129. data/app/views/alchemy/search/_result.html.erb +3 -2
  130. data/app/views/alchemy/search/_results.html.erb +28 -0
  131. data/app/views/alchemy/user_sessions/leave.html.erb +4 -4
  132. data/app/views/alchemy/user_sessions/login.html.erb +1 -2
  133. data/app/views/layouts/alchemy/admin.html.erb +30 -10
  134. data/app/views/layouts/alchemy/login.html.erb +2 -39
  135. data/config/alchemy/elements.yml +1 -2
  136. data/config/alchemy/page_layouts.yml +8 -5
  137. data/config/authorization_rules.rb +27 -18
  138. data/config/initializers/localeapp.rb +9 -0
  139. data/config/locales/alchemy.de.yml +93 -56
  140. data/config/locales/alchemy.en.yml +73 -50
  141. data/config/routes.rb +3 -1
  142. data/db/migrate/20120704181529_add_upload_hash_to_alchemy_picture.rb +5 -0
  143. data/db/migrate/20120705214247_acts_as_taggable_on_migration.rb +28 -0
  144. data/db/migrate/20120728185830_add_cached_tag_list_to_alchemy_pictures.rb +5 -0
  145. data/db/migrate/20120831135441_set_alchemy_languages_country_code_default_to_empty_string.rb +9 -0
  146. data/lib/alchemy/capistrano.rb +2 -2
  147. data/lib/alchemy/essence.rb +14 -0
  148. data/lib/alchemy/page_layout.rb +0 -6
  149. data/lib/alchemy/resource.rb +9 -15
  150. data/lib/alchemy/upgrader.rb +18 -3
  151. data/lib/alchemy/version.rb +5 -1
  152. data/lib/alchemy_cms.rb +4 -1
  153. data/lib/rails/generators/alchemy/deploy_script/deploy_script_generator.rb +16 -6
  154. data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +17 -3
  155. data/lib/rails/generators/alchemy/elements/elements_generator.rb +6 -1
  156. data/lib/rails/generators/alchemy/elements/templates/editor.html.erb +10 -1
  157. data/lib/rails/generators/alchemy/elements/templates/view.html.erb +17 -18
  158. data/lib/rails/generators/alchemy/scaffold/files/pages.html.erb +4 -2
  159. data/lib/tasks/fleximage.rake +2 -2
  160. data/spec/controllers/admin/contents_controller_spec.rb +2 -2
  161. data/spec/controllers/admin/elements_controller_spec.rb +30 -1
  162. data/spec/controllers/admin/pages_controller_spec.rb +35 -18
  163. data/spec/controllers/admin/trash_controller_spec.rb +40 -16
  164. data/spec/controllers/attachments_controller_spec.rb +62 -0
  165. data/spec/controllers/base_controller_spec.rb +43 -42
  166. data/spec/controllers/elements_controller_spec.rb +30 -0
  167. data/spec/controllers/pages_controller_spec.rb +22 -5
  168. data/spec/controllers/pictures_controller_spec.rb +82 -0
  169. data/spec/dummy/app/models/event.rb +2 -1
  170. data/spec/dummy/config/database.yml +3 -2
  171. data/spec/dummy/db/schema.rb +51 -27
  172. data/spec/factories.rb +29 -8
  173. data/spec/helpers/admin/base_helper_spec.rb +134 -21
  174. data/spec/helpers/admin/contents_helper_spec.rb +2 -2
  175. data/spec/helpers/admin/elements_helper_spec.rb +17 -9
  176. data/spec/helpers/admin/essences_helper_spec.rb +7 -6
  177. data/spec/helpers/essences_helper_spec.rb +8 -7
  178. data/spec/helpers/pages_helper_spec.rb +208 -325
  179. data/spec/helpers/url_helper_spec.rb +171 -0
  180. data/spec/integration/admin/link_overlay_spec.rb +53 -0
  181. data/spec/integration/admin/modules_integration_spec.rb +22 -26
  182. data/spec/integration/admin/pages_controller_spec.rb +10 -19
  183. data/spec/integration/admin/picture_library_integration_spec.rb +52 -0
  184. data/spec/integration/admin/resources_integration_spec.rb +68 -75
  185. data/spec/integration/pages_controller_spec.rb +70 -61
  186. data/spec/integration/security_spec.rb +3 -5
  187. data/spec/integration/translation_integration_spec.rb +56 -0
  188. data/spec/libraries/essence_spec.rb +18 -0
  189. data/spec/libraries/resource_spec.rb +101 -79
  190. data/spec/libraries/resources_helper_spec.rb +3 -0
  191. data/spec/models/content_spec.rb +63 -60
  192. data/spec/models/element_spec.rb +203 -93
  193. data/spec/models/language_spec.rb +90 -65
  194. data/spec/models/page_layout_spec.rb +37 -0
  195. data/spec/models/page_spec.rb +181 -113
  196. data/spec/models/picture_spec.rb +73 -26
  197. data/spec/models/resource_spec.rb +52 -23
  198. data/spec/support/alchemy/specs_helpers.rb +2 -0
  199. data/spec/support/image.png +0 -0
  200. data/spec/{helpers/url_helpers_spec.rb → url_helpers_spec.rb} +0 -0
  201. data/vendor/assets/javascripts/jquery_plugins/jquery.selectBoxIt.js +1909 -0
  202. data/vendor/assets/javascripts/jquery_plugins/preloadCssImages.jQuery_v5.js +152 -0
  203. metadata +106 -33
  204. data/app/assets/stylesheets/alchemy/buttons.css.scss +0 -361
  205. data/app/assets/stylesheets/alchemy/jquery.sb.css.scss +0 -260
  206. data/app/views/alchemy/admin/contents/create.js.coffee +0 -49
  207. data/app/views/alchemy/admin/elements/fold.js.coffee +0 -37
  208. data/app/views/alchemy/admin/essence_pictures/destroy.js.coffee +0 -19
  209. data/app/views/alchemy/admin/pictures/_pictures_list.html.erb +0 -16
  210. data/app/views/alchemy/admin/pictures/update.js.erb +0 -3
  211. data/spec/dummy/config/locales/en.yml +0 -5
  212. data/spec/dummy/config/locales/fo.yml +0 -5
  213. data/spec/page_layout_spec.rb +0 -35
  214. data/vendor/assets/javascripts/jquery_plugins/jquery.in-place-edit.js +0 -172
  215. data/vendor/assets/javascripts/jquery_plugins/jquery.sb.min.js +0 -14
@@ -9,6 +9,13 @@ table {
9
9
 
10
10
  td, th {
11
11
  padding: $default-padding;
12
+ white-space: nowrap;
13
+ vertical-align: top;
14
+ line-height: 18px;
15
+
16
+ &.wrap-text {
17
+ white-space: normal !important;
18
+ }
12
19
  }
13
20
 
14
21
  th {
@@ -25,30 +32,74 @@ table tr td.tools {
25
32
  @include disable-user-select;
26
33
  }
27
34
 
28
- td.input, td.label {
29
- padding-top: 2px;
35
+ td.label, td.input, td.submit, td.select, td.value {
36
+ padding: 2px 0;
30
37
  vertical-align: top;
31
38
  }
32
39
 
33
- td.input, td.submit, td.select {
40
+ td.input, td.submit, td.select, td.value {
34
41
  text-align: right;
35
- padding-right: 0;
42
+
43
+ &.left {
44
+ text-align: left;
45
+ }
46
+ }
47
+
48
+ td.label {
49
+ white-space: nowrap;
50
+ width: 80px;
51
+ padding: 9px 2*$default-padding 0 0;
52
+ line-height: 21px;
53
+
54
+ &.mandatory:after {
55
+ content: '*';
56
+ }
57
+
58
+ &.long {
59
+ width: 140px;
60
+ }
61
+
62
+ &.middle {
63
+ padding-left: 2*$default-padding;
64
+ }
65
+
66
+ &.very_long {
67
+ width: 230px;
68
+ }
36
69
  }
37
70
 
38
71
  td.checkbox {
39
- padding: 6px 4px;
72
+ padding-top: 10px;
73
+ text-align: right;
74
+ white-space: nowrap;
75
+
76
+ label {
77
+ @include inline-block;
78
+ text-align: left;
79
+ width: 194px;
80
+ }
81
+
82
+ &.long {
83
+ label {
84
+ width: 224px;
85
+ }
86
+ }
87
+
88
+ input[type="checkbox"] {
89
+ vertical-align: middle;
90
+ margin-top: 4px;
91
+ }
40
92
  }
41
93
 
42
94
  td.value {
43
- text-align: right;
95
+ padding-top: 4px;
44
96
 
45
97
  p {
46
- display: inline;
47
- display: inline-block;
98
+ @include inline-block;
48
99
  width: 214px;
49
100
  text-align: left;
50
- margin: 0;
51
- line-height: 23px;
101
+ margin: $default-form-field-margin;
102
+ line-height: 25px;
52
103
  }
53
104
 
54
105
  &.long {
@@ -58,35 +109,12 @@ td.value {
58
109
  }
59
110
  }
60
111
 
61
- td.label {
62
- white-space: nowrap;
63
- width: 80px;
64
- padding: $default-padding 2*$default-padding 0 0;
65
- line-height: 6*$default-padding;
66
- }
67
-
68
- td.label.mandatory:after {
69
- content: '*';
70
- }
71
-
72
112
  td.heading {
73
113
  padding: $default-padding 0;
74
114
  font-weight: bold;
75
115
  text-decoration: underline;
76
116
  }
77
117
 
78
- td.input input[type="checkbox"], td.input input[type="radio"] {
79
- margin-top: 6px;
80
- }
81
-
82
- td.label.long {
83
- width: 140px;
84
- }
85
-
86
- td.label.very_long {
87
- width: 230px;
88
- }
89
-
90
118
  table tr td.tools a {
91
119
  width: 19px;
92
120
  height: 19px;
@@ -122,6 +150,7 @@ td.date {
122
150
 
123
151
  table td.right, table th.right {
124
152
  text-align: right;
153
+ padding-right: 0;
125
154
  }
126
155
 
127
156
  table td.center, table th.center {
@@ -137,8 +166,7 @@ td.email {
137
166
  }
138
167
 
139
168
  td.role {
140
- width: 70px;
141
- padding-right: 4px;
169
+ width: 10%;
142
170
  }
143
171
 
144
172
  table td.rights {
@@ -161,29 +189,7 @@ table tr.even td {
161
189
  background-color: white;
162
190
  }
163
191
 
164
- td.label.middle {
165
- padding-left: 2*$default-padding;
166
- }
167
-
168
192
  th.icon, td.icon {
169
193
  background: none;
170
194
  display: table-cell;
171
195
  }
172
-
173
- td.checkbox {
174
- text-align: right;
175
- white-space: nowrap;
176
-
177
- label {
178
- display: inline;
179
- display: inline-block;
180
- text-align: left;
181
- width: 194px;
182
- }
183
-
184
- &.long {
185
- label {
186
- width: 224px;
187
- }
188
- }
189
- }
@@ -3,28 +3,30 @@
3
3
  /* Generic */
4
4
 
5
5
  body {
6
- font: 12px "Lucida Grande", Arial, sans-serif;
7
- color: #333;
8
- background: #ededed;
6
+ font: $default-font-style;
7
+ color: $text-color;
8
+ background-color: $light-gray;
9
9
  padding: 0;
10
- margin: 8px 8px 0 8px;
10
+ margin: 2*$default-margin;
11
+ margin-bottom: 0;
11
12
  }
12
13
 
13
14
  html {
14
- background: #ededed;
15
+ background: $light-gray;
15
16
  }
16
17
 
17
- textarea {
18
- resize: none;
19
- outline: none;
20
- }
18
+ a {
19
+ color: $text-color;
20
+ text-decoration: none;
21
21
 
22
- a:link, a:visited {
23
- color: black;
24
- }
22
+ &:hover {
23
+ text-decoration: underline;
24
+ }
25
25
 
26
- a:hover {
27
- color: #2B6FB6;
26
+ &:focus {
27
+ @include default-focus-style(rgba(white, 0.5), none);
28
+ color: black;
29
+ }
28
30
  }
29
31
 
30
32
  .nowrap {
@@ -61,17 +63,13 @@ input.invalid {
61
63
  border: 1px solid #EE0000;
62
64
  }
63
65
 
64
- input {
65
- background: #FFF;
66
- border: 1px solid #CCC;
67
- }
68
-
69
- input, select, textarea {
70
- font: 12px "Lucida Grande", Arial, sans-serif;
71
- }
72
-
73
- input, select, textarea {
74
- border: 1px solid #808080;
66
+ textarea {
67
+ @include default-input-style;
68
+ margin: 0;
69
+ resize: none;
70
+ outline: none;
71
+ padding: 4px !important;
72
+ line-height: 19px !important;
75
73
  }
76
74
 
77
75
  input.radio {
@@ -93,12 +91,7 @@ input.checkbox {
93
91
  /* Buttons */
94
92
 
95
93
  #insert, #cancel, input.button, .updateButton {
96
- @include button-styles;
97
- height: 26px;
98
-
99
- &:hover {
100
- @include button-hover-styles;
101
- }
94
+ @include default-button-style;
102
95
  }
103
96
 
104
97
  /* Browse */
@@ -128,9 +121,7 @@ a.browse:hover span {
128
121
 
129
122
  a.browse span.disabled {
130
123
  border: 1px solid white;
131
- opacity: 0.3;
132
- -ms-filter: 'alpha(opacity=30)';
133
- filter: alpha(opacity = 30)
124
+ @include opacity(0.3);
134
125
  }
135
126
 
136
127
  a.browse:hover span.disabled {
@@ -177,29 +168,33 @@ td.charmap, #charmap a {
177
168
  line-height: 18px;
178
169
  }
179
170
 
180
- #charmap a {
181
- display: block;
182
- color: #000;
183
- text-decoration: none;
184
- border: 0
185
- }
171
+ #charmap {
172
+ margin: 4px 0;
186
173
 
187
- #charmap a:hover {
188
- background: #CCC;
189
- color: #2B6FB6
190
- }
174
+ a {
175
+ display: block;
176
+ color: $text-color;
177
+ text-decoration: none;
178
+ border: 0;
191
179
 
192
- #charmap #codeN {
193
- font-size: 10px;
194
- font-family: "Lucida Grande", Arial, sans-serif;
195
- text-align: center
196
- }
180
+ &:hover {
181
+ background: #CCC;
182
+ color: #2B6FB6
183
+ }
184
+ }
197
185
 
198
- #charmap #codeV {
199
- font-size: 40px;
200
- height: 80px;
201
- border: 1px solid #AAA;
202
- text-align: center
186
+ #codeN {
187
+ font-size: 10px;
188
+ font-family: "Lucida Grande", Arial, sans-serif;
189
+ text-align: center
190
+ }
191
+
192
+ #codeV {
193
+ font-size: 40px;
194
+ height: 80px;
195
+ border: 1px solid #AAA;
196
+ text-align: center
197
+ }
203
198
  }
204
199
 
205
200
  /* Source */
@@ -211,7 +206,7 @@ td.charmap, #charmap a {
211
206
  }
212
207
 
213
208
  .mceActionPanel {
214
- margin-top: 5px;
209
+ margin-top: 0px;
215
210
  }
216
211
 
217
212
  /* Tabs classes */
@@ -230,7 +225,7 @@ td.charmap, #charmap a {
230
225
 
231
226
  .tabs li {
232
227
  float: left;
233
- background: image-url('alchemy/shading.png') repeat-x 0 0;
228
+ background: url('shading.png') repeat-x 0 0;
234
229
  margin: 0 2px 0 0;
235
230
  padding: 0 0 0 10px;
236
231
  line-height: 17px;
@@ -408,4 +403,9 @@ h3 {
408
403
 
409
404
  #colorpicker #colornamecontainer {
410
405
  margin-top: 5px;
411
- }
406
+ }
407
+
408
+ #iframecontainer iframe#iframe {
409
+ @include default-input-style;
410
+ padding: 0;
411
+ }
@@ -33,7 +33,7 @@ a#uploadswitcher, a.underline {
33
33
  }
34
34
 
35
35
  #uploadProgressContainer .progressBarContainer {
36
- background: #F9F9F9 image-url('alchemy/shading.png') repeat-x 0 0;
36
+ background: #F9F9F9 url('shading.png') repeat-x 0 0;
37
37
  border: 1px solid #9E9E9E;
38
38
  @include rounded-corner;
39
39
  height: 16px;
@@ -42,31 +42,31 @@ a#uploadswitcher, a.underline {
42
42
  }
43
43
 
44
44
  #uploadProgressContainer .progressBarInProgress {
45
- background: #77AAD5 image-url('alchemy/shading.png') repeat-x 0 -75px;
45
+ background: #77AAD5 url('shading.png') repeat-x 0 -75px;
46
46
  height: 16px;
47
47
  width: 0;
48
48
  }
49
49
 
50
50
  #uploadProgressContainer .progressBarComplete {
51
- background: #00D827 image-url('alchemy/shading.png') repeat-x 0 -75px;
51
+ background: #00D827 url('shading.png') repeat-x 0 -75px;
52
52
  height: 16px;
53
53
  width: 0;
54
54
  }
55
55
 
56
56
  #uploadProgressContainer .progressBarError {
57
- background: #F00 image-url('alchemy/shading.png') repeat-x 0 -75px;
57
+ background: #F00 url('shading.png') repeat-x 0 -75px;
58
58
  height: 16px;
59
59
  width: 0;
60
60
  }
61
61
 
62
62
  #uploadProgressContainer .progressBarCanceled {
63
- background: #E4E4E4 image-url('alchemy/shading.png') repeat-x 0 -75px;
63
+ background: #E4E4E4 url('shading.png') repeat-x 0 -75px;
64
64
  height: 16px;
65
65
  width: 0;
66
66
  }
67
67
 
68
68
  #uploadProgressContainer .progressCancel {
69
- background: #f1f1f1 image-url('alchemy/icons.png') no-repeat -1px -72px;
69
+ background: #f1f1f1 url('icons.png') no-repeat -1px -72px;
70
70
  border: 1px solid #9e9e9e;
71
71
  @include rounded-corner;
72
72
  width: 15px;
@@ -46,7 +46,7 @@
46
46
  background: #888;
47
47
  top: 0;
48
48
  left: 0;
49
- @include opacity(50);
49
+ @include opacity(0.5);
50
50
  }
51
51
 
52
52
  .alchemy_modalBlocker {
@@ -56,7 +56,7 @@
56
56
  width: 100%;
57
57
  height: 100%;
58
58
  background-color: #f4f4f4;
59
- @include opacity(50);
59
+ @include opacity(0.5);
60
60
  display: none
61
61
  }
62
62
 
@@ -370,18 +370,14 @@ a.mceMove {
370
370
  /* Alert/Confirm */
371
371
 
372
372
  .alchemy .mceButton {
373
- @include button-styles;
373
+ @include default-button-style;
374
374
  bottom: 10px;
375
- width: 80px;
376
- height: 25px;
377
- line-height: 25px;
375
+ // width: 80px;
376
+ // height: 25px;
377
+ // line-height: 25px;
378
378
  vertical-align: middle;
379
379
  text-align: center;
380
380
  outline: 0;
381
-
382
- &:hover {
383
- @include button-hover-styles;
384
- }
385
381
  }
386
382
 
387
383
  .alchemy .mceMiddle .mceIcon {
@@ -24,9 +24,10 @@ module Alchemy
24
24
  end
25
25
 
26
26
  def create
27
- @attachment = Attachment.new(:uploaded_data => params[:Filedata])
28
- @attachment.name = @attachment.filename
29
- @attachment.save
27
+ @attachment = Attachment.create(
28
+ :uploaded_data => params[:Filedata],
29
+ :name => params[:Filedata].original_filename
30
+ )
30
31
  if in_overlay?
31
32
  @while_assigning = true
32
33
  @content = Content.find(params[:content_id], :select => 'id') if !params[:content_id].blank?
@@ -88,7 +89,7 @@ module Alchemy
88
89
  )
89
90
  end
90
91
 
91
- private
92
+ private
92
93
 
93
94
  def in_overlay?
94
95
  !params[:content_id].blank?