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.
- data/Rakefile +3 -0
- data/alchemy_cms.gemspec +1 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js +95 -94
- data/app/assets/javascripts/alchemy/alchemy.buttons.js +15 -11
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +18 -18
- data/app/assets/javascripts/alchemy/alchemy.dirty.js +20 -20
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +50 -44
- data/app/assets/javascripts/alchemy/alchemy.element_editor_selector.js +15 -12
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js +47 -43
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js +27 -17
- data/app/assets/javascripts/alchemy/alchemy.growler.js +19 -15
- data/app/assets/javascripts/alchemy/alchemy.html5.js +1 -2
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +10 -11
- data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +6 -6
- data/app/assets/javascripts/alchemy/alchemy.js_extensions.js +4 -6
- data/app/assets/javascripts/alchemy/alchemy.menubar.js +16 -20
- data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +18 -16
- data/app/assets/javascripts/alchemy/alchemy.preview.js +30 -30
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js +50 -42
- data/app/assets/javascripts/alchemy/alchemy.routes.js.erb +11 -11
- data/app/assets/javascripts/alchemy/alchemy.swf_upload.js +83 -86
- data/app/assets/javascripts/alchemy/alchemy.uploader.js +106 -112
- data/app/assets/javascripts/alchemy/alchemy.windows.js +158 -130
- data/app/assets/stylesheets/alchemy/base.css.scss +7 -1
- data/app/assets/stylesheets/alchemy/buttons.css.scss +31 -25
- data/app/assets/stylesheets/alchemy/elements.css.scss +4 -0
- data/app/controllers/alchemy/admin/base_controller.rb +5 -1
- data/app/helpers/alchemy/admin/base_helper.rb +21 -13
- data/app/helpers/alchemy/admin/contents_helper.rb +52 -11
- data/app/helpers/alchemy/admin/elements_helper.rb +0 -1
- data/app/helpers/alchemy/admin/essences_helper.rb +5 -5
- data/app/helpers/alchemy/essences_helper.rb +1 -0
- data/app/models/alchemy/content.rb +102 -91
- data/app/models/alchemy/essence_boolean.rb +8 -0
- data/app/models/alchemy/essence_select.rb +7 -0
- data/app/sweepers/alchemy/content_sweeper.rb +2 -4
- data/app/views/alchemy/admin/clipboard/clear.js.erb +3 -2
- data/app/views/alchemy/admin/clipboard/index.html.erb +2 -2
- data/app/views/alchemy/admin/contents/create.js.erb +2 -0
- data/app/views/alchemy/admin/contents/destroy.js.coffee +4 -0
- data/app/views/alchemy/admin/contents/new.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element_foot.html.erb +3 -2
- data/app/views/alchemy/admin/elements/create.js.coffee +31 -0
- data/app/views/alchemy/admin/elements/fold.js.coffee +37 -0
- data/app/views/alchemy/admin/essence_pictures/assign.js.coffee +15 -0
- data/app/views/alchemy/admin/essence_pictures/destroy.js.coffee +19 -0
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +12 -2
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/destroy.js.coffee +19 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +5 -5
- data/app/views/alchemy/admin/pages/update.js.coffee +36 -0
- data/app/views/alchemy/admin/resources/_form.html.erb +12 -1
- data/app/views/alchemy/admin/resources/_resource.html.erb +6 -3
- data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
- data/app/views/alchemy/admin/trash/clear.js.coffee +4 -0
- data/app/views/alchemy/admin/trash/index.html.erb +4 -4
- data/app/views/alchemy/elements/_article_editor.html.erb +4 -2
- data/app/views/alchemy/elements/_article_view.html.erb +7 -7
- data/app/views/alchemy/elements/_download_editor.html.erb +4 -1
- data/app/views/alchemy/elements/_download_view.html.erb +7 -3
- data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +1 -0
- data/app/views/alchemy/elements/_image_mosaic_view.html.erb +11 -9
- data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +14 -0
- data/app/views/alchemy/essences/_essence_boolean_view.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_html_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_select_editor.html.erb +35 -0
- data/app/views/alchemy/essences/_essence_select_view.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +29 -77
- data/app/views/alchemy/essences/_essence_text_view.html.erb +2 -2
- data/config/alchemy/elements.yml +72 -44
- data/config/locales/alchemy.de.yml +46 -45
- data/config/locales/alchemy.en.yml +90 -89
- data/db/migrate/20120608085509_create_alchemy_essence_selects.rb +11 -0
- data/db/migrate/20120611221734_create_alchemy_essence_booleans.rb +11 -0
- data/lib/alchemy/authentication_helpers.rb +3 -7
- data/lib/alchemy/engine.rb +3 -4
- data/lib/alchemy/essence.rb +24 -16
- data/lib/alchemy/resource.rb +22 -3
- data/lib/alchemy/resources_helper.rb +8 -0
- data/lib/alchemy/seeder.rb +26 -1
- data/lib/alchemy/upgrader.rb +70 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- data/spec/controllers/admin/clipboard_controller_spec.rb +16 -4
- data/spec/controllers/admin/contents_controller_spec.rb +21 -4
- data/spec/dummy/app/models/event.rb +1 -1
- data/spec/dummy/db/schema.rb +18 -1
- data/spec/helpers/admin/contents_helper_spec.rb +3 -2
- data/spec/models/clipboard_spec.rb +14 -3
- data/spec/models/essence_boolean_spec.rb +15 -0
- data/spec/models/essence_select_spec.rb +15 -0
- data/spec/models/resource_spec.rb +113 -0
- metadata +40 -12
- data/app/views/alchemy/admin/contents/destroy.js.erb +0 -7
- data/app/views/alchemy/admin/elements/create.js.erb +0 -36
- data/app/views/alchemy/admin/elements/fold.js.erb +0 -41
- data/app/views/alchemy/admin/essence_pictures/assign.js.erb +0 -16
- data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +0 -20
- data/app/views/alchemy/admin/pages/destroy.js.erb +0 -12
- data/app/views/alchemy/admin/pages/update.js.erb +0 -40
- data/app/views/alchemy/admin/trash/clear.js.erb +0 -3
- 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
|
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({
|
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
|
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
|
45
|
-
var $btn = $('<div class="button_with_label"></div>'),
|
46
|
-
|
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
|
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
|
-
|
70
|
-
|
71
|
-
|
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
|
-
|
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
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
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
|
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({
|
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
|
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
|
135
|
+
url: action_url,
|
136
|
+
success: function(data, textStatus, XMLHttpRequest) {
|
152
137
|
$dialog.html(data);
|
153
|
-
$dialog.css({
|
154
|
-
|
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
|
159
|
+
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
170
160
|
Alchemy.AjaxErrorHandler($dialog, XMLHttpRequest.status, textStatus, errorThrown);
|
171
161
|
},
|
172
|
-
complete:function
|
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
|
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({
|
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
|
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
|
212
|
+
url: url,
|
213
|
+
success: function(data, textStatus, XMLHttpRequest) {
|
221
214
|
$dialog.html(data);
|
222
215
|
},
|
223
|
-
error:function
|
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
|
236
|
-
var size_x = 380,
|
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({
|
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
|
250
|
-
title:title,
|
251
|
-
resizable:false,
|
252
|
-
show:"fade",
|
253
|
-
hide:"fade",
|
254
|
-
open:function
|
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
|
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({
|
258
|
+
$dialog.css({
|
259
|
+
overflow: 'visible'
|
260
|
+
}).dialog('widget').css({
|
261
|
+
overflow: 'visible'
|
262
|
+
});
|
263
|
+
Alchemy.overlayObserver('#alchemyTrashWindow');
|
262
264
|
},
|
263
|
-
error:function
|
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
|
276
|
+
refreshTrashWindow: function(page_id) {
|
275
277
|
if ($('#alchemyTrashWindow').length > 0) {
|
276
|
-
$('#alchemyTrashWindow').html(Alchemy.getOverlaySpinner({
|
277
|
-
|
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
|
-
&.
|
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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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,
|