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
@@ -1,41 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
|
3
|
-
var $el = $('.element_editor[data-element-id="<%= @element.id %>"]');
|
4
|
-
|
5
|
-
<%- if @error -%>
|
6
|
-
|
7
|
-
$("#element_<%= @element.id -%>_folder_spinner").replaceWith("<span class='error_icon' title='<%= @error -%>'>!</span>");
|
8
|
-
|
9
|
-
<%- else -%>
|
10
|
-
|
11
|
-
$el = $el.replaceWith('<%= escape_javascript render(:partial => "element", :object => @element) -%>');
|
12
|
-
$('#element_area .sortable_cell').sortable('refresh');
|
13
|
-
Alchemy.ElementEditorSelector.reinit('.element_editor[data-element-id="<%= @element.id %>"]');
|
14
|
-
|
15
|
-
<%- if @element.folded -%>
|
16
|
-
|
17
|
-
<%- @element.rtf_contents.each do |content| -%>
|
18
|
-
rtf_<%= content.id -%> = tinymce.get('<%= content.form_field_id -%>');
|
19
|
-
if (rtf_<%= content.id -%>) {
|
20
|
-
rtf_<%= content.id -%>.remove();
|
21
|
-
};
|
22
|
-
delete rtf_<%= content.id -%>;
|
23
|
-
<%- end -%>
|
24
|
-
|
25
|
-
<%- else -%>
|
26
|
-
|
27
|
-
$el.trigger('Alchemy.SelectElementEditor');
|
28
|
-
Alchemy.SelectBox('select', $el);
|
29
|
-
|
30
|
-
<%- @element.rtf_contents.each do |content| -%>
|
31
|
-
Alchemy.Tinymce.addEditor('<%= content.form_field_id -%>');
|
32
|
-
<%- end -%>
|
33
|
-
|
34
|
-
Alchemy.ElementDirtyObserver($el);
|
35
|
-
Alchemy.Datepicker('input[type="date"]', $el);
|
36
|
-
Alchemy.ButtonObserver('button.button', $el);
|
37
|
-
<%- end -%>
|
38
|
-
|
39
|
-
<%- end -%>
|
40
|
-
|
41
|
-
})(jQuery);
|
@@ -1,16 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
|
3
|
-
$('#picture_to_assign_<%= @picture.id %> a').attr('href', '#').off('click');
|
4
|
-
$('#<%= content_dom_id(@content) -%>').replaceWith('<%= escape_javascript(
|
5
|
-
render(
|
6
|
-
:partial => "alchemy/essences/essence_picture_editor",
|
7
|
-
:locals => {:content => @content, :options => @options}
|
8
|
-
)
|
9
|
-
) -%>');
|
10
|
-
<%- if @content.siblings.essence_pictures.count > 1 -%>
|
11
|
-
Alchemy.SortableContents('#<%= @content.element.id -%>_contents', '<%= form_authenticity_token -%>');
|
12
|
-
<%- end -%>
|
13
|
-
Alchemy.closeCurrentWindow();
|
14
|
-
Alchemy.setElementDirty('#element_<%= @content.element.id -%>');
|
15
|
-
|
16
|
-
})(jQuery);
|
@@ -1,20 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
|
3
|
-
$('#essence_picture_<%= @content_id -%>').remove();
|
4
|
-
Alchemy.SortableContents('#element_<%= @element.id -%>_contents', '<%= form_authenticity_token -%>');
|
5
|
-
|
6
|
-
<%- if max_image_count.blank? || (@essence_pictures.length < max_image_count) -%>
|
7
|
-
$('#element_<%= @element.id -%>_contents').append('<%= escape_javascript(
|
8
|
-
render(
|
9
|
-
:partial => "alchemy/admin/elements/add_content",
|
10
|
-
:locals => {
|
11
|
-
:element => @element,
|
12
|
-
:options => @options
|
13
|
-
}
|
14
|
-
)
|
15
|
-
) -%>');
|
16
|
-
<%- end -%>
|
17
|
-
|
18
|
-
Alchemy.reloadPreview();
|
19
|
-
|
20
|
-
})(jQuery);
|
@@ -1,12 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
$('#locked_page_<%= @page_id -%>').remove();
|
3
|
-
<%- if @layoutpage -%>
|
4
|
-
window.location.replace('<%= alchemy.admin_layoutpages_path -%>')
|
5
|
-
<%- elsif @page_root -%>
|
6
|
-
$('#sitemap').replaceWith('<%= escape_javascript(render(:partial => "sitemap")) -%>');
|
7
|
-
Alchemy.growl('<%= @message -%>');
|
8
|
-
Alchemy.Tooltips();
|
9
|
-
<%- else -%>
|
10
|
-
window.location.replace('<%= alchemy.admin_pages_path -%>');
|
11
|
-
<%- end -%>
|
12
|
-
})(jQuery);
|
@@ -1,40 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
|
3
|
-
Alchemy.closeCurrentWindow();
|
4
|
-
|
5
|
-
<%- if @while_page_edit -%>
|
6
|
-
|
7
|
-
Alchemy.reloadPreview();
|
8
|
-
$('#page_<%= @page.id -%>_status').replaceWith('<%= escape_javascript(render(:partial => "page_status")) -%>');
|
9
|
-
|
10
|
-
<%- else -%>
|
11
|
-
|
12
|
-
$('#page_<%= @page.id -%> > .sitemap_page > .sitemap_sitename .sitemap_pagename_link').text('<%= @page.name -%>');
|
13
|
-
|
14
|
-
<%- if @page.locked? && @page.locker == current_user -%>
|
15
|
-
|
16
|
-
$('#locked_page_<%= @page.id -%> > a').text('<%= @page.name -%>');
|
17
|
-
|
18
|
-
<%- end -%>
|
19
|
-
|
20
|
-
$('#page_<%= @page.id -%>_infos').html('<%= escape_javascript(render(:partial => "page_infos", :locals => {:page => @page})) -%>');
|
21
|
-
|
22
|
-
<%- if @page.restricted? -%>
|
23
|
-
|
24
|
-
$('#page_<%= @page.id -%> .page_status:nth-child(3)').addClass('restricted', 'not_restricted').removeClass('not_restricted');
|
25
|
-
|
26
|
-
<%- elsif @page.redirects_to_external? -%>
|
27
|
-
|
28
|
-
$('#page_<%= @page.id -%> span.redirect_url').html('» <%= t("Redirects to") %>: <%= h @page.urlname %>');
|
29
|
-
|
30
|
-
<%- else -%>
|
31
|
-
|
32
|
-
$('#page_<%= @page.id -%> .page_status:nth-child(3)').addClass('not_restricted').removeClass('restricted');
|
33
|
-
|
34
|
-
<%- end -%>
|
35
|
-
|
36
|
-
<%- end -%>
|
37
|
-
|
38
|
-
Alchemy.growl("<%= @notice -%>");
|
39
|
-
|
40
|
-
})(jQuery);
|
File without changes
|