radiant-clipped-extension-add-group 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. data/LICENSE +22 -0
  2. data/README.md +184 -0
  3. data/Rakefile +109 -0
  4. data/app/controllers/admin/assets_controller.rb +66 -0
  5. data/app/controllers/admin/page_attachments_controller.rb +18 -0
  6. data/app/helpers/admin/assets_helper.rb +16 -0
  7. data/app/helpers/admin/page_attachments_helper.rb +2 -0
  8. data/app/models/asset.rb +237 -0
  9. data/app/models/asset_type.rb +241 -0
  10. data/app/models/old_page_attachment.rb +26 -0
  11. data/app/models/page_attachment.rb +20 -0
  12. data/app/views/admin/assets/_asset.html.haml +12 -0
  13. data/app/views/admin/assets/_asset_table.html.haml +33 -0
  14. data/app/views/admin/assets/_errors.html.haml +3 -0
  15. data/app/views/admin/assets/_form.html.haml +25 -0
  16. data/app/views/admin/assets/_page_assets.html.haml +12 -0
  17. data/app/views/admin/assets/_search.html.haml +17 -0
  18. data/app/views/admin/assets/_search_results.html.haml +17 -0
  19. data/app/views/admin/assets/edit.html.haml +41 -0
  20. data/app/views/admin/assets/index.html.haml +19 -0
  21. data/app/views/admin/assets/new.html.haml +24 -0
  22. data/app/views/admin/assets/refresh.html.haml +14 -0
  23. data/app/views/admin/assets/remove.html.haml +16 -0
  24. data/app/views/admin/configuration/_clipped_edit.html.haml +8 -0
  25. data/app/views/admin/configuration/_clipped_show.html.haml +12 -0
  26. data/app/views/admin/page_attachments/_attachment.html.haml +25 -0
  27. data/app/views/admin/page_parts/_page_part.html.haml +21 -0
  28. data/app/views/admin/pages/_asset_popups.html.haml +42 -0
  29. data/app/views/admin/pages/_assets.html.haml +11 -0
  30. data/app/views/admin/removed/_assets_bucket.html.haml +8 -0
  31. data/app/views/admin/removed/_assets_container.html.haml +58 -0
  32. data/app/views/admin/removed/_bucket.html.haml +11 -0
  33. data/app/views/admin/removed/_bucket_asset.html.haml +9 -0
  34. data/app/views/admin/removed/_show_bucket_link.html.haml +4 -0
  35. data/app/views/admin/removed/_upload_to_page.html.haml +12 -0
  36. data/app/views/admin/removed/bucket/_iframe.html.haml +1 -0
  37. data/artwork/icons.png +0 -0
  38. data/clipped_extension.rb +52 -0
  39. data/config/initializers/interpolation.rb +6 -0
  40. data/config/initializers/processors.rb +43 -0
  41. data/config/initializers/radiant_config.rb +65 -0
  42. data/config/locales/de.yml +109 -0
  43. data/config/locales/en.yml +110 -0
  44. data/config/locales/nl.yml +107 -0
  45. data/config/locales/ru.yml +110 -0
  46. data/config/routes.rb +8 -0
  47. data/cucumber.yml +1 -0
  48. data/db/migrate/001_create_assets.rb +12 -0
  49. data/db/migrate/002_create_paperclip_attributes.rb +13 -0
  50. data/db/migrate/003_create_user_observer.rb +13 -0
  51. data/db/migrate/004_create_page_attachments.rb +19 -0
  52. data/db/migrate/005_rename_users.rb +13 -0
  53. data/db/migrate/20110513205050_asset_uuid.rb +11 -0
  54. data/db/migrate/20110606111250_update_configuration.rb +34 -0
  55. data/db/migrate/20110609101438_dimensions.rb +13 -0
  56. data/db/migrate/20121024064452_add_group_to_assets.rb +9 -0
  57. data/features/support/env.rb +11 -0
  58. data/features/support/paths.rb +22 -0
  59. data/lib/asset_tags.rb +350 -0
  60. data/lib/clipped_admin_ui.rb +32 -0
  61. data/lib/cloud.rb +41 -0
  62. data/lib/generators/templates/clipped_config.rb +53 -0
  63. data/lib/page_asset_associations.rb +13 -0
  64. data/lib/paperclip/frame_grab.rb +73 -0
  65. data/lib/paperclip/geometry_transformation.rb +80 -0
  66. data/lib/radiant-clipped-extension.rb +8 -0
  67. data/lib/tasks/clipped_extension_tasks.rake +124 -0
  68. data/lib/tasks/paperclip_tasks.rake +79 -0
  69. data/public/flash/ZeroClipboard.swf +0 -0
  70. data/public/images/admin/assets/add.png +0 -0
  71. data/public/images/admin/assets/archive_icon.png +0 -0
  72. data/public/images/admin/assets/audio_icon.png +0 -0
  73. data/public/images/admin/assets/audio_thumbnail.png +0 -0
  74. data/public/images/admin/assets/c_icon.png +0 -0
  75. data/public/images/admin/assets/copy.png +0 -0
  76. data/public/images/admin/assets/css_icon.png +0 -0
  77. data/public/images/admin/assets/database_icon.png +0 -0
  78. data/public/images/admin/assets/delete.png +0 -0
  79. data/public/images/admin/assets/document_icon.png +0 -0
  80. data/public/images/admin/assets/document_thumbnail.png +0 -0
  81. data/public/images/admin/assets/flash_icon.png +0 -0
  82. data/public/images/admin/assets/flash_thumbnail.png +0 -0
  83. data/public/images/admin/assets/font_icon.png +0 -0
  84. data/public/images/admin/assets/gzip_icon.png +0 -0
  85. data/public/images/admin/assets/html_icon.png +0 -0
  86. data/public/images/admin/assets/image_icon.png +0 -0
  87. data/public/images/admin/assets/image_thumbnail.png +0 -0
  88. data/public/images/admin/assets/java_icon.png +0 -0
  89. data/public/images/admin/assets/page_edit.png +0 -0
  90. data/public/images/admin/assets/perl_icon.png +0 -0
  91. data/public/images/admin/assets/php_icon.png +0 -0
  92. data/public/images/admin/assets/presentation_icon.png +0 -0
  93. data/public/images/admin/assets/python_icon.png +0 -0
  94. data/public/images/admin/assets/reorder_assets.png +0 -0
  95. data/public/images/admin/assets/ruby_icon.png +0 -0
  96. data/public/images/admin/assets/script_icon.png +0 -0
  97. data/public/images/admin/assets/spreadsheet_icon.png +0 -0
  98. data/public/images/admin/assets/tar_icon.png +0 -0
  99. data/public/images/admin/assets/unknown_icon.png +0 -0
  100. data/public/images/admin/assets/unknown_thumbnail.png +0 -0
  101. data/public/images/admin/assets/video_icon.png +0 -0
  102. data/public/images/admin/assets/video_thumbnail.png +0 -0
  103. data/public/images/admin/assets/xml_icon.png +0 -0
  104. data/public/images/admin/assets/zip_icon.png +0 -0
  105. data/public/javascripts/admin/assets.js +297 -0
  106. data/public/stylesheets/sass/admin/assets.sass +224 -0
  107. data/radiant-clipped-extension.gemspec +29 -0
  108. data/spec/ci/before_script +23 -0
  109. data/spec/ci/script +2 -0
  110. data/spec/controllers/admin/assets_controller_spec.rb +50 -0
  111. data/spec/controllers/admin/page_attachments_controller_spec.rb +50 -0
  112. data/spec/datasets/assets_dataset.rb +36 -0
  113. data/spec/fixtures/5k.png +0 -0
  114. data/spec/fixtures/test.flv +0 -0
  115. data/spec/lib/asset_tags_spec.rb +107 -0
  116. data/spec/lib/frame_grab_spec.rb +17 -0
  117. data/spec/lib/geometry_transformation_spec.rb +63 -0
  118. data/spec/models/asset_spec.rb +72 -0
  119. data/spec/models/asset_type_spec.rb +70 -0
  120. data/spec/models/post_processing_spec.rb +62 -0
  121. data/spec/spec.opts +7 -0
  122. data/spec/spec_helper.rb +36 -0
  123. data/wireframes/edit-page-assets-2.bmml +453 -0
  124. data/wireframes/edit-page-assets-2.png +0 -0
  125. data/wireframes/edit-page-assets-3.bmml +454 -0
  126. data/wireframes/edit-page-assets-3.png +0 -0
  127. data/wireframes/edit-page-assets.bmml +433 -0
  128. data/wireframes/edit-page-assets.png +0 -0
  129. data/wireframes/edit-page.bmml +174 -0
  130. data/wireframes/edit-page.png +0 -0
  131. metadata +281 -0
Binary file
Binary file
Binary file
@@ -0,0 +1,297 @@
1
+ var Asset = {};
2
+
3
+ Asset.Upload = Behavior.create({
4
+ onsubmit: function (e) {
5
+ if (e) e.stop();
6
+ var uuid = Asset.GenerateUUID();
7
+ var ulframe = document.createElement('iframe');
8
+ ulframe.setAttribute('name', uuid); // this doesn't work on ie7: will need bodging
9
+ $('upload_holders').insert(ulframe);
10
+
11
+ var form = this.element;
12
+ var title = form.down('input.textbox').value || form.down('input.file').value;
13
+ var placeholder = Asset.AddPlaceholder(title);
14
+
15
+ form.setAttribute('target', uuid);
16
+ ulframe.observe('load', function (e) {
17
+ if (e) e.stop();
18
+ var response = ulframe.contentDocument.body.innerHTML;
19
+ if (response && response != "") {
20
+ placeholder.remove();
21
+ Asset.AddToList(response);
22
+ ulframe.remove();
23
+ }
24
+ });
25
+
26
+ form.submit();
27
+ $('upload_asset').closePopup();
28
+
29
+ // Small delay is required here to let safari assemble the payload
30
+ // form.down('input').clear().defer();
31
+ // form.down('input.file').clear().defer();
32
+ }
33
+ });
34
+
35
+
36
+ // this local attachment method works and is much quicker, but it's fragile and doesn't notice radiant configuration changes
37
+ // better to bounce off the server, provided it can be made responsive enough.
38
+
39
+ // Asset.Attach = Behavior.create({
40
+ // onclick: function (e) {
41
+ // if (e) e.stop();
42
+ // var container = this.element.up('li.asset');
43
+ // container.addClassName('waiting');
44
+ // var title = container.down('div.title').innerHTML;
45
+ // var image = container.down('img');
46
+ // var uuid = Asset.GenerateUUID();
47
+ // var asset_id = this.element.getAttribute('rel').split('_').last();
48
+ // var attachment_field = document.createElement('input');
49
+ // attachment_field.setAttribute('type', 'hidden');
50
+ // attachment_field.setAttribute('id', 'page_page_attachments_attributes_' + uuid + '_asset_id');
51
+ // attachment_field.setAttribute('name', 'page[page_attachments_attributes][' + uuid + '][asset_id]');
52
+ // attachment_field.value = asset_id;
53
+ // var placeholder = Asset.AddPlaceholder(title, image, attachment_field);
54
+ // container.removeClassName('waiting');
55
+ // placeholder.removeClassName('waiting');
56
+ // }
57
+ // });
58
+
59
+ // ajax-based page attachment is a slightly slower but probably more robust option
60
+ //
61
+ Asset.Attach = Behavior.create({
62
+ onclick: function (e) {
63
+ if (e) e.stop();
64
+ var container = this.element.up('li.asset');
65
+ var title = container.down('div.title').innerHTML;
66
+ var image = container.down('img');
67
+ var placeholder = Asset.AddPlaceholder(title, image);
68
+ container.addClassName('waiting');
69
+ new Ajax.Request(this.element.href, {
70
+ asynchronous: true,
71
+ evalScripts: false,
72
+ method: 'get',
73
+ onSuccess: function(transport) {
74
+ container.removeClassName('waiting');
75
+ placeholder.remove();
76
+ Asset.AddToList(transport.responseText);
77
+ }
78
+ });
79
+ }
80
+ });
81
+
82
+ Asset.Detach = Behavior.create({
83
+ onclick: function (e) {
84
+ if (e) e.stop();
85
+ Asset.RemoveFromList(this.element.up('li.asset'));
86
+ }
87
+ });
88
+
89
+ Asset.Insert = Behavior.create({
90
+ onclick: function(e) {
91
+ if (e) e.stop();
92
+ var part_name = TabControlBehavior.instances[0].controller.selected.caption.toLowerCase();
93
+ if (part_name.indexOf(' ')) part_name = part_name.replace(' ', '-');
94
+ var textbox = $('part_' + part_name + '_content');
95
+ var tag_parts = this.element.getAttribute('rel').split('_');
96
+ var tag_name = tag_parts[0];
97
+ var asset_size = tag_parts[1];
98
+ var asset_id = tag_parts[2];
99
+ var radius_tag = '<r:asset:' + tag_name;
100
+ if (asset_size != '') radius_tag = radius_tag + ' size="' + asset_size + '"';
101
+ radius_tag = radius_tag +' id="' + asset_id + '" />';
102
+ Asset.InsertAtCursor(textbox, radius_tag);
103
+ }
104
+ });
105
+
106
+ Asset.Sortable = Behavior.create({
107
+ initialize: function (e) {
108
+ this.sorter = Asset.MakeSortable(this.element);
109
+ }
110
+ });
111
+
112
+ // Asset-filter and search functions are available wherever the asset_table partial is displayed
113
+
114
+ Asset.DeselectFileTypes = Behavior.create({
115
+ onclick: function(e){
116
+ e.stop();
117
+ var element = this.element;
118
+ if(!element.hasClassName('pressed')) {
119
+ $$('a.selective').each(function(el) { el.removeClassName('pressed'); });
120
+ $$('input.selective').each(function(el) { el.removeAttribute('checked'); });
121
+ element.addClassName('pressed');
122
+ Asset.UpdateTable(true);
123
+ }
124
+ }
125
+ });
126
+
127
+ Asset.SelectFileType = Behavior.create({
128
+ onclick: function(e){
129
+ e.stop();
130
+ var element = this.element;
131
+ var type_id = element.readAttribute("rel");
132
+ var type_check = $(type_id + '-check');
133
+ if(element.hasClassName('pressed')) {
134
+ element.removeClassName('pressed');
135
+ type_check.removeAttribute('checked');
136
+ if ($$('a.selective.pressed').length == 0) $('select_all').addClassName('pressed');
137
+ } else {
138
+ element.addClassName('pressed');
139
+ $$('a.deselective').each(function(el) { el.removeClassName('pressed'); });
140
+ type_check.setAttribute('checked', 'checked');
141
+ }
142
+ Asset.UpdateTable(true);
143
+ }
144
+ });
145
+
146
+ Asset.SearchForm = Behavior.create({
147
+ initialize: function () {
148
+ this.observer = new Form.Element.Observer(this.element.down('input.search'), 2, Asset.UpdateTable);
149
+ },
150
+ onsubmit: function (e) {
151
+ if (e) e.stop();
152
+ Asset.UpdateTable(true);
153
+ }
154
+ });
155
+
156
+ Asset.Pagination = Behavior.create({
157
+ onclick: function (e) {
158
+ if (e) e.stop();
159
+ var url = this.element.readAttribute('href');
160
+ var pagination = url.toQueryParams();
161
+ var search_form = $('filesearchform');
162
+ search_form.down('#p').value = pagination['p'];
163
+ Asset.UpdateTable(false);
164
+ }
165
+ });
166
+
167
+ Asset.MakeSortable = function (element) {
168
+ var sorter = Sortable.create(element, {
169
+ overlap: 'horizontal',
170
+ constraint: false,
171
+ handle: 'back',
172
+ onChange: function (e) {
173
+ Asset.SetPositions();
174
+ Asset.Notify('Assets reordered. Save page to commit changes.');
175
+ }
176
+ });
177
+ element.addClassName('sortable');
178
+ Asset.SetPositions();
179
+ return sorter;
180
+ }
181
+
182
+ Asset.SetPositions = function () {
183
+ $('attachment_fields').select('input.pos').each(function (input, index) {
184
+ input.value = index;
185
+ });
186
+ }
187
+
188
+ // originally taken from phpMyAdmin
189
+ Asset.InsertAtCursor = function(field, insertion) {
190
+ if (document.selection) { // ie
191
+ field.focus();
192
+ var sel = document.selection.createRange();
193
+ sel.text = insertion;
194
+ }
195
+ else if (field.selectionStart || field.selectionStart == '0') { // moz
196
+ var startPos = field.selectionStart;
197
+ var endPos = field.selectionEnd;
198
+ field.value = field.value.substring(0, startPos) + insertion + field.value.substring(endPos, field.value.length);
199
+ field.selectionStart = field.selectionEnd = startPos + insertion.length;
200
+ } else {
201
+ field.value += value;
202
+ }
203
+ }
204
+
205
+ Asset.GenerateUUID = function () {
206
+ // http://www.ietf.org/rfc/rfc4122.txt
207
+ var s = [];
208
+ var hexDigits = "0123456789ABCDEF";
209
+ for (var i = 0; i < 32; i++) { s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); }
210
+ s[12] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
211
+ s[16] = hexDigits.substr((s[16] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
212
+ return s.join('');
213
+ };
214
+
215
+ Asset.UpdateTable = function (depaginate) {
216
+ var search_form = $('filesearchform');
217
+ if (depaginate && search_form.down('#p')) search_form.down('#p').value = 1;
218
+ Asset.AllWaiting();
219
+ new Ajax.Updater('assets_table', search_form.action, {
220
+ asynchronous: true,
221
+ evalScripts: false,
222
+ parameters: Form.serialize(search_form),
223
+ method: 'get'
224
+ });
225
+ }
226
+
227
+ Asset.AddToList = function (html) {
228
+ var list = $('attachment_fields');
229
+ list.insert(html);
230
+ Asset.ShowListIfHidden();
231
+ Asset.Notify('Save page to commit changes');
232
+ Event.addBehavior.reload(); // #TODO something a bit more specific would be nice here
233
+ Asset.MakeSortable(list);
234
+ }
235
+
236
+ Asset.RemoveFromList = function (container) {
237
+ var el = null;
238
+ if (!!(el = container.down('input.attacher'))) el.remove();
239
+ if (!!(el = container.down('input.pos'))) el.remove();
240
+ if (!!(el = container.down('input.destroyer'))) el.value = 1;
241
+ container.dropOut({afterFinish: Asset.HideListIfEmpty});
242
+ container.addClassName('detached');
243
+ }
244
+
245
+ Asset.AddPlaceholder = function (title, image, contents) {
246
+ var placeholder = document.createElement('li').addClassName('asset').addClassName('waiting');
247
+ if (contents) placeholder.insert(contents);
248
+ var front = document.createElement('div').addClassName('front');
249
+ if (image) front.insert(document.createElement('div').addClassName('thumbnail').insert(image.clone()));
250
+ placeholder.insert(front);
251
+ if (!title) title = 'please wait';
252
+ var back = document.createElement('div').addClassName('back').insert(document.createElement('div').addClassName('title').update(title));
253
+ placeholder.insert(back);
254
+ $('attachment_fields').insert(placeholder);
255
+ Asset.ShowListIfHidden();
256
+ return placeholder;
257
+ }
258
+
259
+ Asset.AllWaiting = function (container) {
260
+ if (!container) container = $('assets_table');
261
+ container.select('li.asset').each(function (el) { el.addClassName('waiting'); });
262
+ }
263
+
264
+ Asset.Notify = function (message) {
265
+ $('attachment_list').down('span.message').update(message).addClassName('important');
266
+ }
267
+
268
+ Asset.ShowListIfHidden = function () {
269
+ var list = $('attachment_fields');
270
+ if (list.hasClassName('empty')) {
271
+ list.removeClassName('empty');
272
+ // list.slideDown();
273
+ }
274
+ }
275
+
276
+ Asset.HideListIfEmpty = function () {
277
+ var list = $('attachment_fields');
278
+ if (!list.down('li.asset:not(.detached)')) {
279
+ list.addClassName('empty');
280
+ // list.slideUp();
281
+ Asset.Notify('All assets detached. Save page to commit changes');
282
+ } else {
283
+ Asset.Notify('Assets detached. Save page to commit changes');
284
+ }
285
+ }
286
+
287
+ Event.addBehavior({
288
+ 'ul#attachment_fields': Asset.Sortable,
289
+ 'form.upload_asset': Asset.Upload,
290
+ 'a.attach_asset': Asset.Attach,
291
+ 'a.detach_asset': Asset.Detach,
292
+ 'a.insert_asset': Asset.Insert,
293
+ 'a.deselective': Asset.DeselectFileTypes,
294
+ 'a.selective': Asset.SelectFileType,
295
+ 'form.search': Asset.SearchForm,
296
+ '#assets_table .pagination a': Asset.Pagination
297
+ });
@@ -0,0 +1,224 @@
1
+ @import "base"
2
+
3
+ p.asset
4
+ img.preview
5
+ border: 5px solid white
6
+ +box-shadow
7
+
8
+ .asset_filters
9
+ float: left
10
+ padding: 2px 0
11
+ a
12
+ +border-radius(100px)
13
+ color: #555
14
+ padding: 3px 8px
15
+ text-decoration: none
16
+ font-size: 12px
17
+ &:hover
18
+ background: #ccc
19
+ &.pressed
20
+ background: #888
21
+ +box-shadow(0, 1px, 1px, #333, inset)
22
+ color: white
23
+ text-shadow: 0 1px 0 #333
24
+ &:hover
25
+ background: #888
26
+ +box-shadow(0, 1px, 1px, #333, inset)
27
+ color: white
28
+ text-shadow: 0 1px 0 #333
29
+
30
+ .popup
31
+ div.toolbar
32
+ background: white
33
+ +background-image(linear-gradient(white,#ddd))
34
+ border-bottom: 1px solid #ccc
35
+ +single-box-shadow(white, 0, 1px, 0)
36
+ margin: -20px -20px 0
37
+ padding: 6px 10px 3px 10px
38
+ font-size: 95%
39
+ height: 30px
40
+ +clearfix
41
+ .right
42
+ float: right
43
+ form.search
44
+ padding: 4px 2px 0
45
+ input[type=search]
46
+ font-size: 12px
47
+ +border-radius(100px)
48
+ border: 1px solid #ccc
49
+ border-top-color: #999
50
+ border-left-color: #b0b0b0
51
+ border-right-color: #bbb
52
+ background: white image_url('admin/search.png') 4px center no-repeat
53
+ +box-shadow(rgba(black, 0.2), 0, 1px, 0, inset)
54
+ width: 180px
55
+ padding: 2px 8px 2px 20px
56
+
57
+ #assets_table.assets
58
+ overflow: auto
59
+
60
+
61
+ #upload_holders
62
+ display: none
63
+
64
+ #attach_asset
65
+ .viewport
66
+ overflow-x: hidden
67
+ width: 610px
68
+ height: 310px
69
+
70
+ .attachment_actions
71
+ text-align: right
72
+ margin-bottom: -1em
73
+ ul
74
+ +inline-list
75
+ li
76
+ padding-left: 1em
77
+ a
78
+ color: white !important
79
+ text-shadow: 1px 1px 0 #888
80
+
81
+ .assets
82
+ padding-left: 5px
83
+ padding-right: 5px
84
+ ul
85
+ li.asset
86
+ display: block
87
+ float: left
88
+ margin: 8px 0 0 8px
89
+ width: 110px
90
+ height: 110px
91
+ position: relative
92
+ line-height: 1.2em
93
+ .front, .back
94
+ display: block
95
+ background: #e6eaed
96
+ border: 5px solid white
97
+ position: absolute
98
+ width: 100px
99
+ height: 100px
100
+ text-align: center
101
+ .front
102
+ +box-shadow
103
+ text-align: center
104
+ .back
105
+ color: #333
106
+ overflow: hidden
107
+ +opacity(0)
108
+ .title
109
+ color: #333
110
+ font-size: 10px
111
+ overflow: hidden
112
+ margin: 10px 4px
113
+ height: 15px
114
+ line-height: 15px
115
+ text-overflow: ellipsis
116
+ .icon
117
+ height: 63px
118
+ line-height: 63px
119
+ img
120
+ vertical-align: bottom
121
+ ul.actions
122
+ li
123
+ margin: 5px 0
124
+ padding: 0 10px
125
+ font-size: 10px
126
+ a
127
+ background: #666
128
+ background: rgba(black, 0.8)
129
+ +border-radius
130
+ color: #ddd
131
+ display: block
132
+ padding: 2px 10px
133
+ text-decoration: none
134
+ &:hover
135
+ background: #999
136
+ background: rgba(black, 0.6)
137
+ color: white
138
+ &.unsaved
139
+ .front
140
+ opacity: 0.4
141
+ &:hover
142
+ .back
143
+ +opacity(1)
144
+ background: rgba(white, 0.6)
145
+ &.waiting
146
+ background-color: #E6EAED
147
+ .back
148
+ display: none
149
+ .front
150
+ background: transparent url(/images/admin/spinner.gif) no-repeat center center
151
+ img
152
+ opacity: 0.2
153
+
154
+ #attachment_list.assets
155
+ background: #7e7e7e
156
+ +border-bottom-radius
157
+ margin: -1em 0.5em 1em 0.5em
158
+ overflow-y: hidden
159
+ overflow-x: auto
160
+ ul.empty
161
+ display: none
162
+ p.note
163
+ font-size: 80%
164
+ margin: 0
165
+ padding: 8px
166
+ clear: left
167
+ span.message
168
+ float: right
169
+ color: #aaa
170
+ &.important
171
+ color: #d99
172
+ ul.sortable
173
+ li.asset
174
+ div.back
175
+ cursor: move
176
+
177
+ #assets_table.assets
178
+ position: relative
179
+ font-size: 75%
180
+ p
181
+ padding: 40px
182
+ top: 45px
183
+ color: silver
184
+ text-align: center
185
+ font-style: oblique
186
+ ul
187
+ clear: both
188
+ li.asset
189
+ input
190
+ display: none
191
+ div.pagination
192
+ position: relative
193
+ overflow: hidden
194
+ clear: left
195
+ width: 100%
196
+ height: 3em
197
+ padding: 0.5em 0
198
+ span, a
199
+ display: block
200
+ float: left
201
+ padding: 0.25em
202
+ margin: 1em 2px 1em 0
203
+ +border-radius(2px)
204
+ text-decoration: none
205
+ span.current
206
+ color: #000
207
+ font-weight: bold
208
+ span.disabled
209
+ background-color: #eee
210
+ color: #ccc
211
+ a
212
+ background-color: #eee
213
+ color: #444
214
+ &:hover
215
+ background-color: #c00
216
+ color: #fff
217
+
218
+ span
219
+ color: #888
220
+ span, a
221
+ display: block
222
+ float: left
223
+ padding: 2px 6px
224
+ line-height: 1.5em