alchemy_cms 2.2.rc13 → 2.2.rc14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. data/Rakefile +3 -0
  2. data/alchemy_cms.gemspec +1 -0
  3. data/app/assets/javascripts/alchemy/alchemy.base.js +95 -94
  4. data/app/assets/javascripts/alchemy/alchemy.buttons.js +15 -11
  5. data/app/assets/javascripts/alchemy/alchemy.datepicker.js +18 -18
  6. data/app/assets/javascripts/alchemy/alchemy.dirty.js +20 -20
  7. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +50 -44
  8. data/app/assets/javascripts/alchemy/alchemy.element_editor_selector.js +15 -12
  9. data/app/assets/javascripts/alchemy/alchemy.elements_window.js +47 -43
  10. data/app/assets/javascripts/alchemy/alchemy.file_progress.js +27 -17
  11. data/app/assets/javascripts/alchemy/alchemy.growler.js +19 -15
  12. data/app/assets/javascripts/alchemy/alchemy.html5.js +1 -2
  13. data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +10 -11
  14. data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +6 -6
  15. data/app/assets/javascripts/alchemy/alchemy.js_extensions.js +4 -6
  16. data/app/assets/javascripts/alchemy/alchemy.menubar.js +16 -20
  17. data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +18 -16
  18. data/app/assets/javascripts/alchemy/alchemy.preview.js +30 -30
  19. data/app/assets/javascripts/alchemy/alchemy.preview_window.js +50 -42
  20. data/app/assets/javascripts/alchemy/alchemy.routes.js.erb +11 -11
  21. data/app/assets/javascripts/alchemy/alchemy.swf_upload.js +83 -86
  22. data/app/assets/javascripts/alchemy/alchemy.uploader.js +106 -112
  23. data/app/assets/javascripts/alchemy/alchemy.windows.js +158 -130
  24. data/app/assets/stylesheets/alchemy/base.css.scss +7 -1
  25. data/app/assets/stylesheets/alchemy/buttons.css.scss +31 -25
  26. data/app/assets/stylesheets/alchemy/elements.css.scss +4 -0
  27. data/app/controllers/alchemy/admin/base_controller.rb +5 -1
  28. data/app/helpers/alchemy/admin/base_helper.rb +21 -13
  29. data/app/helpers/alchemy/admin/contents_helper.rb +52 -11
  30. data/app/helpers/alchemy/admin/elements_helper.rb +0 -1
  31. data/app/helpers/alchemy/admin/essences_helper.rb +5 -5
  32. data/app/helpers/alchemy/essences_helper.rb +1 -0
  33. data/app/models/alchemy/content.rb +102 -91
  34. data/app/models/alchemy/essence_boolean.rb +8 -0
  35. data/app/models/alchemy/essence_select.rb +7 -0
  36. data/app/sweepers/alchemy/content_sweeper.rb +2 -4
  37. data/app/views/alchemy/admin/clipboard/clear.js.erb +3 -2
  38. data/app/views/alchemy/admin/clipboard/index.html.erb +2 -2
  39. data/app/views/alchemy/admin/contents/create.js.erb +2 -0
  40. data/app/views/alchemy/admin/contents/destroy.js.coffee +4 -0
  41. data/app/views/alchemy/admin/contents/new.html.erb +1 -1
  42. data/app/views/alchemy/admin/elements/_element_foot.html.erb +3 -2
  43. data/app/views/alchemy/admin/elements/create.js.coffee +31 -0
  44. data/app/views/alchemy/admin/elements/fold.js.coffee +37 -0
  45. data/app/views/alchemy/admin/essence_pictures/assign.js.coffee +15 -0
  46. data/app/views/alchemy/admin/essence_pictures/destroy.js.coffee +19 -0
  47. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +12 -2
  48. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
  49. data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
  50. data/app/views/alchemy/admin/pages/destroy.js.coffee +19 -0
  51. data/app/views/alchemy/admin/pages/edit.html.erb +5 -5
  52. data/app/views/alchemy/admin/pages/update.js.coffee +36 -0
  53. data/app/views/alchemy/admin/resources/_form.html.erb +12 -1
  54. data/app/views/alchemy/admin/resources/_resource.html.erb +6 -3
  55. data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
  56. data/app/views/alchemy/admin/trash/clear.js.coffee +4 -0
  57. data/app/views/alchemy/admin/trash/index.html.erb +4 -4
  58. data/app/views/alchemy/elements/_article_editor.html.erb +4 -2
  59. data/app/views/alchemy/elements/_article_view.html.erb +7 -7
  60. data/app/views/alchemy/elements/_download_editor.html.erb +4 -1
  61. data/app/views/alchemy/elements/_download_view.html.erb +7 -3
  62. data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +1 -0
  63. data/app/views/alchemy/elements/_image_mosaic_view.html.erb +11 -9
  64. data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +14 -0
  65. data/app/views/alchemy/essences/_essence_boolean_view.html.erb +1 -0
  66. data/app/views/alchemy/essences/_essence_date_editor.html.erb +1 -1
  67. data/app/views/alchemy/essences/_essence_file_editor.html.erb +1 -0
  68. data/app/views/alchemy/essences/_essence_html_editor.html.erb +1 -1
  69. data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +1 -1
  70. data/app/views/alchemy/essences/_essence_select_editor.html.erb +35 -0
  71. data/app/views/alchemy/essences/_essence_select_view.html.erb +1 -0
  72. data/app/views/alchemy/essences/_essence_text_editor.html.erb +29 -77
  73. data/app/views/alchemy/essences/_essence_text_view.html.erb +2 -2
  74. data/config/alchemy/elements.yml +72 -44
  75. data/config/locales/alchemy.de.yml +46 -45
  76. data/config/locales/alchemy.en.yml +90 -89
  77. data/db/migrate/20120608085509_create_alchemy_essence_selects.rb +11 -0
  78. data/db/migrate/20120611221734_create_alchemy_essence_booleans.rb +11 -0
  79. data/lib/alchemy/authentication_helpers.rb +3 -7
  80. data/lib/alchemy/engine.rb +3 -4
  81. data/lib/alchemy/essence.rb +24 -16
  82. data/lib/alchemy/resource.rb +22 -3
  83. data/lib/alchemy/resources_helper.rb +8 -0
  84. data/lib/alchemy/seeder.rb +26 -1
  85. data/lib/alchemy/upgrader.rb +70 -1
  86. data/lib/alchemy/version.rb +1 -1
  87. data/lib/alchemy_cms.rb +1 -0
  88. data/spec/controllers/admin/clipboard_controller_spec.rb +16 -4
  89. data/spec/controllers/admin/contents_controller_spec.rb +21 -4
  90. data/spec/dummy/app/models/event.rb +1 -1
  91. data/spec/dummy/db/schema.rb +18 -1
  92. data/spec/helpers/admin/contents_helper_spec.rb +3 -2
  93. data/spec/models/clipboard_spec.rb +14 -3
  94. data/spec/models/essence_boolean_spec.rb +15 -0
  95. data/spec/models/essence_select_spec.rb +15 -0
  96. data/spec/models/resource_spec.rb +113 -0
  97. metadata +40 -12
  98. data/app/views/alchemy/admin/contents/destroy.js.erb +0 -7
  99. data/app/views/alchemy/admin/elements/create.js.erb +0 -36
  100. data/app/views/alchemy/admin/elements/fold.js.erb +0 -41
  101. data/app/views/alchemy/admin/essence_pictures/assign.js.erb +0 -16
  102. data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +0 -20
  103. data/app/views/alchemy/admin/pages/destroy.js.erb +0 -12
  104. data/app/views/alchemy/admin/pages/update.js.erb +0 -40
  105. data/app/views/alchemy/admin/trash/clear.js.erb +0 -3
  106. data/spec/dummy/app/models/.gitkeep +0 -0
@@ -2,32 +2,35 @@ if (typeof(Alchemy) === 'undefined') {
2
2
  var Alchemy = {};
3
3
  }
4
4
 
5
- (function ($) {
5
+ (function($) {
6
6
 
7
7
  $.extend(Alchemy, {
8
8
 
9
- getOverlaySpinner:function (options) {
9
+ getOverlaySpinner: function(options) {
10
10
  var defaults = {
11
- x:'400',
12
- y:'300'
11
+ x: '400',
12
+ y: '300'
13
13
  };
14
14
  var settings = $.extend({}, defaults, options);
15
- var $spinner_container = $('<div class="spinner_container"/>').css({width:settings.x, height:settings.y});
15
+ var $spinner_container = $('<div class="spinner_container"/>').css({
16
+ width: settings.x,
17
+ height: settings.y
18
+ });
16
19
  var $spinner = $('<img src="/assets/alchemy/ajax_loader.gif" />');
17
20
  $spinner_container.append($spinner);
18
21
  $spinner.css({
19
- position:'absolute',
20
- width:32,
21
- height:32,
22
- left:'50%',
23
- top:'50%',
24
- marginLeft:'-16px',
25
- marginTop:'-16px'
22
+ position: 'absolute',
23
+ width: 32,
24
+ height: 32,
25
+ left: '50%',
26
+ top: '50%',
27
+ marginLeft: '-16px',
28
+ marginTop: '-16px'
26
29
  });
27
30
  return $spinner_container;
28
31
  },
29
32
 
30
- AjaxErrorHandler:function ($dialog, status, textStatus, errorThrown) {
33
+ AjaxErrorHandler: function($dialog, status, textStatus, errorThrown) {
31
34
  var $div = $('<div class="with_padding" />');
32
35
  var $errorDiv = $('<div id="errorExplanation" />');
33
36
  $dialog.html($div);
@@ -41,9 +44,12 @@ if (typeof(Alchemy) === 'undefined') {
41
44
  }
42
45
  },
43
46
 
44
- ToolbarButton:function (options) {
45
- var $btn = $('<div class="button_with_label"></div>'), $lnk;
46
- if (options.buttonId) $btn.attr({'id':options.buttonId});
47
+ ToolbarButton: function(options) {
48
+ var $btn = $('<div class="button_with_label"></div>'),
49
+ $lnk;
50
+ if (options.buttonId) $btn.attr({
51
+ 'id': options.buttonId
52
+ });
47
53
  $lnk = $('<a title="' + options.buttonTitle + '" class="icon_button"></a>');
48
54
  $lnk.click(options.onClick);
49
55
  $lnk.append('<span class="icon ' + options.iconClass + '"></span>');
@@ -52,82 +58,58 @@ if (typeof(Alchemy) === 'undefined') {
52
58
  return $btn;
53
59
  },
54
60
 
55
- openConfirmWindow:function (options) {
61
+ openConfirmWindow: function(options) {
56
62
  var $confirmation = $('<div style="display:none" id="alchemyConfirmation"></div>');
57
63
  $confirmation.appendTo('body');
58
64
  $confirmation.html('<p>' + options.message + '</p>');
59
65
  Alchemy.ConfirmationWindow = $confirmation.dialog({
60
- resizable:false,
61
- minHeight:100,
62
- minWidth:300,
63
- modal:true,
64
- title:options.title,
65
- show:"fade",
66
- hide:"fade",
67
- buttons:[
68
- {
69
- text:options.cancelLabel,
70
- click:function () {
71
- $(this).dialog("close");
72
- }
73
- },
74
- {
75
- text:options.okLabel,
76
- click:function () {
77
- $(this).dialog("close");
78
- options.okCallback();
79
- }
66
+ resizable: false,
67
+ minHeight: 100,
68
+ minWidth: 300,
69
+ modal: true,
70
+ title: options.title,
71
+ show: "fade",
72
+ hide: "fade",
73
+ buttons: [{
74
+ text: options.cancelLabel,
75
+ click: function() {
76
+ $(this).dialog("close");
77
+ Alchemy.enableButton('.disabled.button');
80
78
  }
81
- ],
82
- open:function () {
79
+ }, {
80
+ text: options.okLabel,
81
+ click: function() {
82
+ $(this).dialog("close");
83
+ options.okCallback();
84
+ }
85
+ }],
86
+ open: function() {
83
87
  Alchemy.ButtonObserver('#alchemyConfirmation .button');
84
88
  },
85
- close:function () {
89
+ close: function() {
86
90
  $('#alchemyConfirmation').remove();
87
91
  }
88
92
  });
89
93
  },
90
94
 
91
- confirmToDeleteWindow:function (url, title, message, okLabel, cancelLabel) {
92
- var $confirmation = $('<div style="display:none" id="alchemyConfirmation"></div>');
93
- $confirmation.appendTo('body');
94
- $confirmation.html('<p>' + message + '</p>');
95
- Alchemy.ConfirmationWindow = $confirmation.dialog({
96
- resizable:false,
97
- minHeight:100,
98
- minWidth:300,
99
- modal:true,
100
- title:title,
101
- show:"fade",
102
- hide:"fade",
103
- buttons:[
104
- {
105
- text:cancelLabel,
106
- click:function () {
107
- $(this).dialog("close");
108
- }
109
- },
110
- {
111
- text:okLabel,
112
- click:function () {
113
- $(this).dialog("close");
114
- $.ajax({
115
- url:url,
116
- type:'DELETE'
117
- });
118
- }
119
- }
120
- ],
121
- open:function () {
122
- Alchemy.ButtonObserver('#alchemyConfirmation .button');
123
- },
124
- close:function () {
125
- $('#alchemyConfirmation').remove();
95
+ confirmToDeleteWindow: function(url, title, message, okLabel, cancelLabel) {
96
+ Alchemy.openConfirmWindow({
97
+ message: message,
98
+ title: title,
99
+ okLabel: okLabel,
100
+ cancelLabel: cancelLabel,
101
+ okCallback: function() {
102
+ $(this).dialog("close");
103
+ Alchemy.pleaseWaitOverlay();
104
+ $.ajax({
105
+ url: url,
106
+ type: 'DELETE'
107
+ });
126
108
  }
127
109
  });
128
110
  },
129
111
 
130
- openWindow:function (action_url, title, size_x, size_y, resizable, modal, overflow) {
112
+ openWindow: function(action_url, title, size_x, size_y, resizable, modal, overflow) {
131
113
  overflow == undefined ? overflow = false : overflow = overflow;
132
114
  if (size_x === 'fullscreen') {
133
115
  size_x = $(window).width() - 50;
@@ -135,55 +117,63 @@ if (typeof(Alchemy) === 'undefined') {
135
117
  }
136
118
  var $dialog = $('<div style="display:none" id="alchemyOverlay"></div>');
137
119
  $dialog.appendTo('body');
138
- $dialog.html(Alchemy.getOverlaySpinner({x:size_x === 'auto' ? 400 : size_x, y:size_y === 'auto' ? 300 : size_y}));
120
+ $dialog.html(Alchemy.getOverlaySpinner({
121
+ x: size_x === 'auto' ? 400 : size_x,
122
+ y: size_y === 'auto' ? 300 : size_y
123
+ }));
139
124
  Alchemy.CurrentWindow = $dialog.dialog({
140
- modal:modal,
141
- minWidth:size_x === 'auto' ? 400 : size_x,
142
- minHeight:size_y === 'auto' ? 300 : size_y,
143
- title:title,
144
- resizable:resizable,
145
- show:"fade",
146
- hide:"fade",
147
- width:size_x,
148
- open:function (event, ui) {
125
+ modal: modal,
126
+ minWidth: size_x === 'auto' ? 400 : size_x,
127
+ minHeight: size_y === 'auto' ? 300 : size_y,
128
+ title: title,
129
+ resizable: resizable,
130
+ show: "fade",
131
+ hide: "fade",
132
+ width: size_x,
133
+ open: function(event, ui) {
149
134
  $.ajax({
150
- url:action_url,
151
- success:function (data, textStatus, XMLHttpRequest) {
135
+ url: action_url,
136
+ success: function(data, textStatus, XMLHttpRequest) {
152
137
  $dialog.html(data);
153
- $dialog.css({overflow:overflow ? 'visible' : 'auto'});
154
- $dialog.dialog('widget').css({overflow:overflow ? 'visible' : 'hidden'});
138
+ $dialog.css({
139
+ overflow: overflow ? 'visible' : 'auto'
140
+ });
141
+ $dialog.dialog('widget').css({
142
+ overflow: overflow ? 'visible' : 'hidden'
143
+ });
155
144
  if (size_x === 'auto') {
156
145
  $dialog.dialog('widget').css({
157
- left:(($(window).width() / 2) - ($dialog.width() / 2))
146
+ left: (($(window).width() / 2) - ($dialog.width() / 2))
158
147
  });
159
148
  }
160
149
  if (size_y === 'auto') {
161
150
  $dialog.dialog('widget').css({
162
- top:($(window).height() - $dialog.dialog('widget').height()) / 2
151
+ top: ($(window).height() - $dialog.dialog('widget').height()) / 2
163
152
  });
164
153
  }
165
154
  Alchemy.SelectBox('#alchemyOverlay select.alchemy_selectbox');
166
155
  Alchemy.Datepicker('#alchemyOverlay input.date, #alchemyOverlay input[type="date"]');
167
156
  Alchemy.ButtonObserver('#alchemyOverlay .button');
157
+ Alchemy.overlayObserver('#alchemyOverlay');
168
158
  },
169
- error:function (XMLHttpRequest, textStatus, errorThrown) {
159
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
170
160
  Alchemy.AjaxErrorHandler($dialog, XMLHttpRequest.status, textStatus, errorThrown);
171
161
  },
172
- complete:function (jqXHR, textStatus) {
162
+ complete: function(jqXHR, textStatus) {
173
163
  Alchemy.enableButton('.disabled.button');
174
164
  }
175
165
  });
176
166
  },
177
- beforeClose:function () {
167
+ beforeClose: function() {
178
168
  $(".sb.open").triggerAll("close");
179
169
  },
180
- close:function () {
170
+ close: function() {
181
171
  $dialog.remove();
182
172
  }
183
173
  });
184
174
  },
185
175
 
186
- closeCurrentWindow:function () {
176
+ closeCurrentWindow: function() {
187
177
  if (Alchemy.CurrentWindow) {
188
178
  Alchemy.CurrentWindow.dialog('close');
189
179
  Alchemy.CurrentWindow = null;
@@ -193,7 +183,7 @@ if (typeof(Alchemy) === 'undefined') {
193
183
  return true;
194
184
  },
195
185
 
196
- zoomImage:function (url, title, width, height) {
186
+ zoomImage: function(url, title, width, height) {
197
187
  var window_height = height;
198
188
  var window_width = width;
199
189
  var $doc_width = $(window).width();
@@ -206,79 +196,117 @@ if (typeof(Alchemy) === 'undefined') {
206
196
  }
207
197
  var $dialog = $('<div style="display:none" id="alchemyOverlay"></div>');
208
198
  $dialog.appendTo('body');
209
- $dialog.html(Alchemy.getOverlaySpinner({x:width, y:height}));
199
+ $dialog.html(Alchemy.getOverlaySpinner({
200
+ x: width,
201
+ y: height
202
+ }));
210
203
  $dialog.dialog({
211
- modal:false,
212
- minWidth:window_width < 320 ? 320 : window_width,
213
- minHeight:window_height < 240 ? 240 : window_height,
214
- title:title,
215
- show:"fade",
216
- hide:"fade",
217
- open:function (event, ui) {
204
+ modal: false,
205
+ minWidth: window_width < 320 ? 320 : window_width,
206
+ minHeight: window_height < 240 ? 240 : window_height,
207
+ title: title,
208
+ show: "fade",
209
+ hide: "fade",
210
+ open: function(event, ui) {
218
211
  $.ajax({
219
- url:url,
220
- success:function (data, textStatus, XMLHttpRequest) {
212
+ url: url,
213
+ success: function(data, textStatus, XMLHttpRequest) {
221
214
  $dialog.html(data);
222
215
  },
223
- error:function (XMLHttpRequest, textStatus, errorThrown) {
216
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
224
217
  Alchemy.AjaxErrorHandler($dialog, XMLHttpRequest.status, textStatus, errorThrown);
225
218
  }
226
219
  });
227
220
  },
228
- close:function () {
221
+ close: function() {
229
222
  $dialog.remove();
230
223
  }
231
224
  });
232
225
  return false;
233
226
  },
234
227
 
235
- openTrashWindow:function (page_id, title) {
236
- var size_x = 380, size_y = 270;
228
+ openTrashWindow: function(page_id, title) {
229
+ var size_x = 380,
230
+ size_y = 270;
237
231
  if (size_x === 'fullscreen') {
238
232
  size_x = $(window).width() - 50;
239
233
  size_y = $(window).height() - 50;
240
234
  }
241
235
  var $dialog = $('<div style="display:none" id="alchemyTrashWindow"></div>');
242
236
  $dialog.appendTo('body');
243
- $dialog.html(Alchemy.getOverlaySpinner({x:size_x, y:size_y}));
237
+ $dialog.html(Alchemy.getOverlaySpinner({
238
+ x: size_x,
239
+ y: size_y
240
+ }));
244
241
 
245
242
  Alchemy.trashWindow = $dialog.dialog({
246
- modal:false,
247
- width:380,
248
- minHeight:450,
249
- maxHeight:$(window).height() - 50,
250
- title:title,
251
- resizable:false,
252
- show:"fade",
253
- hide:"fade",
254
- open:function (event, ui) {
243
+ modal: false,
244
+ width: 380,
245
+ minHeight: 450,
246
+ maxHeight: $(window).height() - 50,
247
+ title: title,
248
+ resizable: false,
249
+ show: "fade",
250
+ hide: "fade",
251
+ open: function(event, ui) {
255
252
  $.ajax({
256
- url:Alchemy.routes.admin_trash_path(page_id),
257
- success:function (data, textStatus, XMLHttpRequest) {
253
+ url: Alchemy.routes.admin_trash_path(page_id),
254
+ success: function(data, textStatus, XMLHttpRequest) {
258
255
  $dialog.html(data);
259
256
  // Need this for DragnDrop elements into elements window.
260
257
  // Badly this is screwing up maxHeight option
261
- $dialog.css({overflow:'visible'}).dialog('widget').css({overflow:'visible'});
258
+ $dialog.css({
259
+ overflow: 'visible'
260
+ }).dialog('widget').css({
261
+ overflow: 'visible'
262
+ });
263
+ Alchemy.overlayObserver('#alchemyTrashWindow');
262
264
  },
263
- error:function (XMLHttpRequest, textStatus, errorThrown) {
265
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
264
266
  Alchemy.AjaxErrorHandler($dialog, XMLHttpRequest.status, textStatus, errorThrown);
265
267
  }
266
268
  });
267
269
  },
268
- close:function () {
270
+ close: function() {
269
271
  $dialog.remove();
270
272
  }
271
273
  });
272
274
  },
273
275
 
274
- refreshTrashWindow:function (page_id) {
276
+ refreshTrashWindow: function(page_id) {
275
277
  if ($('#alchemyTrashWindow').length > 0) {
276
- $('#alchemyTrashWindow').html(Alchemy.getOverlaySpinner({x:380, y:270}));
277
- $.get(Alchemy.routes.admin_trash_path(page_id), function (html) {
278
+ $('#alchemyTrashWindow').html(Alchemy.getOverlaySpinner({
279
+ x: 380,
280
+ y: 270
281
+ }));
282
+ $.get(Alchemy.routes.admin_trash_path(page_id), function(html) {
278
283
  $('#alchemyTrashWindow').html(html);
279
284
  });
280
285
  }
286
+ },
287
+
288
+ overlayObserver: function(scope) {
289
+ $('a[data-alchemy-overlay]', scope).on('click', function(event) {
290
+ var $this = $(this);
291
+ var options = $this.data('alchemy-overlay');
292
+ event.preventDefault();
293
+ Alchemy.openWindow($this.attr('href'), options.title, options.size_x, options.size_y, options.resizable, options.overflow);
294
+ return false;
295
+ });
296
+
297
+ $('a[data-alchemy-confirm]', scope).on('click', function(event) {
298
+ var $this = $(this);
299
+ var options = $this.data('alchemy-confirm');
300
+ event.preventDefault();
301
+ Alchemy.confirmToDeleteWindow($this.attr('href'), options.title, options.message, options.ok_label, options.cancel_label);
302
+ return false;
303
+ });
281
304
  }
282
305
 
283
306
  });
307
+
308
+ $(document).ready(function() {
309
+ Alchemy.overlayObserver();
310
+ });
311
+
284
312
  })(jQuery);
@@ -1459,7 +1459,7 @@ div#overlay_toolbar a.button:active {
1459
1459
  border: $default-border;
1460
1460
  background-color: white;
1461
1461
  @include rounded-corner;
1462
- &.element {
1462
+ &.elements {
1463
1463
  background-color: #E5DCCA;
1464
1464
  border: 1px solid #BBA589;
1465
1465
  }
@@ -1467,6 +1467,12 @@ div#overlay_toolbar a.button:active {
1467
1467
  }
1468
1468
  }
1469
1469
 
1470
+ #trash_items {
1471
+ height: 310px;
1472
+ overflow-x: hidden;
1473
+ overflow-y: auto;
1474
+ }
1475
+
1470
1476
  .mceEditor table {
1471
1477
  border-spacing: 0 !important;
1472
1478
  }
@@ -1,37 +1,43 @@
1
1
  @import "alchemy/defaults";
2
2
 
3
- a.button.small.cloned-button img {
4
- display: inline-block;
5
- float: none;
6
- position: relative;
7
- height: 16px;
8
- width: 16px;
9
- top: -1px;
10
- }
11
-
12
3
  a.button {
13
4
  padding: 5px 8px;
14
5
  text-decoration: none;
15
6
  float: left;
16
7
  line-height: 13px;
17
- }
18
8
 
19
- a.button.small {
20
- height: 14px;
21
- padding-top: 2px;
22
- padding-bottom: 2px;
23
- border-radius: 10px;
24
- -o-border-radius: 10px;
25
- -ms-border-radius: 10px;
26
- -moz-border-radius: 10px;
27
- -webkit-border-radius: 10px;
28
- }
9
+ &.small {
10
+ height: 14px;
11
+ padding-top: 2px;
12
+ padding-bottom: 2px;
13
+ border-radius: 10px;
14
+ -o-border-radius: 10px;
15
+ -ms-border-radius: 10px;
16
+ -moz-border-radius: 10px;
17
+ -webkit-border-radius: 10px;
18
+
19
+ &.cloned-button img {
20
+ display: inline-block;
21
+ float: none;
22
+ position: relative;
23
+ height: 16px;
24
+ width: 16px;
25
+ top: -1px;
26
+ }
29
27
 
30
- a.small.button.with_icon span.icon {
31
- margin-top: -5px;
32
- position: relative;
33
- top: 3px;
34
- left: -1px;
28
+ &.with_icon span.icon {
29
+ margin-top: -5px;
30
+ position: relative;
31
+ top: 3px;
32
+ left: -1px;
33
+ }
34
+ }
35
+
36
+ span.icon {
37
+ vertical-align: -2px;
38
+ margin-bottom: -2px;
39
+ margin-left: -4px;
40
+ }
35
41
  }
36
42
 
37
43
  input.button,