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.
- data/.gitignore +1 -1
- data/.travis.yml +3 -4
- data/Gemfile +1 -0
- data/README.md +10 -6
- data/alchemy_cms.gemspec +5 -2
- data/app/assets/images/alchemy/icons.png +0 -0
- data/app/assets/images/sassy-ie-overlay.png +0 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js +50 -59
- data/app/assets/javascripts/alchemy/alchemy.buttons.js +14 -4
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +8 -2
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js +11 -3
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.link_overlay.js.coffee +14 -1
- data/app/assets/javascripts/alchemy/alchemy.preview.js +1 -1
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js +12 -4
- data/app/assets/javascripts/alchemy/alchemy.uploader.js +4 -1
- data/app/assets/javascripts/alchemy/alchemy.windows.js +18 -8
- data/app/assets/stylesheets/alchemy/_defaults.scss +84 -120
- data/app/assets/stylesheets/alchemy/alchemy.css +2 -2
- data/app/assets/stylesheets/alchemy/archive.css.scss +288 -0
- data/app/assets/stylesheets/alchemy/base.css.scss +95 -390
- data/app/assets/stylesheets/alchemy/dashboard.css.scss +4 -4
- data/app/assets/stylesheets/alchemy/elements.css.scss +83 -118
- data/app/assets/stylesheets/alchemy/flash.css.scss +1 -1
- data/app/assets/stylesheets/alchemy/form_elements.css.scss +528 -0
- data/app/assets/stylesheets/alchemy/frame.css.scss +13 -39
- data/app/assets/stylesheets/alchemy/icons.css.scss +217 -228
- data/app/assets/stylesheets/alchemy/jquery-ui.alchemy.css.scss +48 -50
- data/app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss +1 -1
- data/app/assets/stylesheets/alchemy/login.css.scss +1 -5
- data/app/assets/stylesheets/alchemy/menubar.css.scss +19 -29
- data/app/assets/stylesheets/alchemy/pagination.css.scss +3 -4
- data/app/assets/stylesheets/alchemy/sitemap.css.scss +81 -81
- data/app/assets/stylesheets/alchemy/tables.css.scss +63 -57
- data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +57 -57
- data/app/assets/stylesheets/alchemy/upload.css.scss +6 -6
- data/app/assets/stylesheets/tiny_mce/plugins/inlinepopups/skins/alchemy/window.css.scss +6 -10
- data/app/controllers/alchemy/admin/attachments_controller.rb +5 -4
- data/app/controllers/alchemy/admin/base_controller.rb +1 -9
- data/app/controllers/alchemy/admin/contents_controller.rb +4 -6
- data/app/controllers/alchemy/admin/elements_controller.rb +2 -2
- data/app/controllers/alchemy/admin/pages_controller.rb +2 -2
- data/app/controllers/alchemy/admin/pictures_controller.rb +74 -15
- data/app/controllers/alchemy/attachments_controller.rb +8 -2
- data/app/controllers/alchemy/base_controller.rb +47 -5
- data/app/controllers/alchemy/elements_controller.rb +1 -1
- data/app/controllers/alchemy/messages_controller.rb +12 -12
- data/app/controllers/alchemy/pages_controller.rb +5 -1
- data/app/controllers/alchemy/pictures_controller.rb +9 -4
- data/app/controllers/alchemy/user_sessions_controller.rb +2 -4
- data/app/helpers/alchemy/admin/base_helper.rb +98 -19
- data/app/helpers/alchemy/admin/contents_helper.rb +2 -2
- data/app/helpers/alchemy/admin/elements_helper.rb +2 -3
- data/app/helpers/alchemy/base_helper.rb +6 -5
- data/app/helpers/alchemy/elements_helper.rb +2 -2
- data/app/helpers/alchemy/essences_helper.rb +4 -5
- data/app/helpers/alchemy/pages_helper.rb +15 -79
- data/app/helpers/alchemy/url_helper.rb +67 -0
- data/app/mailers/alchemy/messages.rb +1 -1
- data/app/mailers/alchemy/notifications.rb +1 -1
- data/app/models/alchemy/attachment.rb +11 -2
- data/app/models/alchemy/cell.rb +20 -10
- data/app/models/alchemy/content.rb +4 -3
- data/app/models/alchemy/element.rb +170 -178
- data/app/models/alchemy/language/code.rb +4 -1
- data/app/models/alchemy/message.rb +19 -3
- data/app/models/alchemy/page.rb +45 -40
- data/app/models/alchemy/picture.rb +24 -2
- data/app/models/alchemy/user.rb +2 -3
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +12 -12
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/create.js.erb +1 -0
- data/app/views/alchemy/admin/attachments/edit.html.erb +9 -3
- data/app/views/alchemy/admin/attachments/index.html.erb +3 -2
- data/app/views/alchemy/admin/contents/_missing.html.erb +1 -1
- data/app/views/alchemy/admin/contents/create.js.erb +54 -0
- data/app/views/alchemy/admin/contents/new.html.erb +9 -4
- data/app/views/alchemy/admin/elements/{_add_content.html.erb → _add_picture.html.erb} +4 -4
- data/app/views/alchemy/admin/elements/_elements_select.html.erb +2 -1
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +1 -1
- data/app/views/alchemy/admin/elements/{_picture_editor.html.erb → _picture_gallery_editor.html.erb} +7 -11
- data/app/views/alchemy/admin/elements/fold.js.erb +46 -0
- data/app/views/alchemy/admin/elements/index.html.erb +24 -24
- data/app/views/alchemy/admin/elements/list.js.erb +11 -9
- data/app/views/alchemy/admin/essence_files/assign.js.erb +3 -1
- data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +28 -0
- data/app/views/alchemy/admin/pages/_contactform_links.html.erb +8 -6
- data/app/views/alchemy/admin/pages/_external_link.html.erb +11 -9
- data/app/views/alchemy/admin/pages/_file_link.html.erb +10 -8
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +14 -10
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page_for_links.html.erb +32 -21
- data/app/views/alchemy/admin/pages/configure.html.erb +2 -2
- data/app/views/alchemy/admin/pages/configure_external.html.erb +13 -13
- data/app/views/alchemy/admin/pages/edit.html.erb +2 -2
- data/app/views/alchemy/admin/pages/index.html.erb +26 -24
- data/app/views/alchemy/admin/pages/link.html.erb +2 -5
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +28 -12
- data/app/views/alchemy/admin/pictures/_archive.html.erb +54 -0
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +10 -7
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +21 -22
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +31 -0
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +9 -0
- data/app/views/alchemy/admin/pictures/_picture.html.erb +36 -6
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +27 -0
- data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +3 -1
- data/app/views/alchemy/admin/pictures/create.js.erb +4 -5
- data/app/views/alchemy/admin/pictures/edit.html.erb +26 -0
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +39 -0
- data/app/views/alchemy/admin/pictures/index.html.erb +81 -70
- data/app/views/alchemy/admin/pictures/index.js.erb +3 -0
- data/app/views/alchemy/admin/pictures/new.html.erb +1 -0
- data/app/views/alchemy/admin/resources/index.html.erb +3 -1
- data/app/views/alchemy/admin/users/_table.html.erb +1 -1
- data/app/views/alchemy/admin/users/index.html.erb +27 -23
- data/app/views/alchemy/elements/_article_editor.html.erb +7 -2
- data/app/views/alchemy/elements/_bild_editor.html.erb +1 -1
- data/app/views/alchemy/elements/_bild_text_editor.html.erb +6 -1
- data/app/views/alchemy/elements/_bild_text_view.html.erb +3 -3
- data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +1 -1
- data/app/views/alchemy/elements/_image_mosaic_view.html.erb +2 -2
- data/app/views/alchemy/elements/_intro_image_text_view.html.erb +4 -4
- data/app/views/alchemy/elements/_searchresult_editor.html.erb +4 -1
- data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +2 -3
- data/app/views/alchemy/essences/_essence_picture_tools.html.erb +1 -1
- data/app/views/alchemy/search/_form.html.erb +8 -0
- data/app/views/alchemy/search/_result.html.erb +3 -2
- data/app/views/alchemy/search/_results.html.erb +28 -0
- data/app/views/alchemy/user_sessions/leave.html.erb +4 -4
- data/app/views/alchemy/user_sessions/login.html.erb +1 -2
- data/app/views/layouts/alchemy/admin.html.erb +30 -10
- data/app/views/layouts/alchemy/login.html.erb +2 -39
- data/config/alchemy/elements.yml +1 -2
- data/config/alchemy/page_layouts.yml +8 -5
- data/config/authorization_rules.rb +27 -18
- data/config/initializers/localeapp.rb +9 -0
- data/config/locales/alchemy.de.yml +93 -56
- data/config/locales/alchemy.en.yml +73 -50
- data/config/routes.rb +3 -1
- data/db/migrate/20120704181529_add_upload_hash_to_alchemy_picture.rb +5 -0
- data/db/migrate/20120705214247_acts_as_taggable_on_migration.rb +28 -0
- data/db/migrate/20120728185830_add_cached_tag_list_to_alchemy_pictures.rb +5 -0
- data/db/migrate/20120831135441_set_alchemy_languages_country_code_default_to_empty_string.rb +9 -0
- data/lib/alchemy/capistrano.rb +2 -2
- data/lib/alchemy/essence.rb +14 -0
- data/lib/alchemy/page_layout.rb +0 -6
- data/lib/alchemy/resource.rb +9 -15
- data/lib/alchemy/upgrader.rb +18 -3
- data/lib/alchemy/version.rb +5 -1
- data/lib/alchemy_cms.rb +4 -1
- data/lib/rails/generators/alchemy/deploy_script/deploy_script_generator.rb +16 -6
- data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +17 -3
- data/lib/rails/generators/alchemy/elements/elements_generator.rb +6 -1
- data/lib/rails/generators/alchemy/elements/templates/editor.html.erb +10 -1
- data/lib/rails/generators/alchemy/elements/templates/view.html.erb +17 -18
- data/lib/rails/generators/alchemy/scaffold/files/pages.html.erb +4 -2
- data/lib/tasks/fleximage.rake +2 -2
- data/spec/controllers/admin/contents_controller_spec.rb +2 -2
- data/spec/controllers/admin/elements_controller_spec.rb +30 -1
- data/spec/controllers/admin/pages_controller_spec.rb +35 -18
- data/spec/controllers/admin/trash_controller_spec.rb +40 -16
- data/spec/controllers/attachments_controller_spec.rb +62 -0
- data/spec/controllers/base_controller_spec.rb +43 -42
- data/spec/controllers/elements_controller_spec.rb +30 -0
- data/spec/controllers/pages_controller_spec.rb +22 -5
- data/spec/controllers/pictures_controller_spec.rb +82 -0
- data/spec/dummy/app/models/event.rb +2 -1
- data/spec/dummy/config/database.yml +3 -2
- data/spec/dummy/db/schema.rb +51 -27
- data/spec/factories.rb +29 -8
- data/spec/helpers/admin/base_helper_spec.rb +134 -21
- data/spec/helpers/admin/contents_helper_spec.rb +2 -2
- data/spec/helpers/admin/elements_helper_spec.rb +17 -9
- data/spec/helpers/admin/essences_helper_spec.rb +7 -6
- data/spec/helpers/essences_helper_spec.rb +8 -7
- data/spec/helpers/pages_helper_spec.rb +208 -325
- data/spec/helpers/url_helper_spec.rb +171 -0
- data/spec/integration/admin/link_overlay_spec.rb +53 -0
- data/spec/integration/admin/modules_integration_spec.rb +22 -26
- data/spec/integration/admin/pages_controller_spec.rb +10 -19
- data/spec/integration/admin/picture_library_integration_spec.rb +52 -0
- data/spec/integration/admin/resources_integration_spec.rb +68 -75
- data/spec/integration/pages_controller_spec.rb +70 -61
- data/spec/integration/security_spec.rb +3 -5
- data/spec/integration/translation_integration_spec.rb +56 -0
- data/spec/libraries/essence_spec.rb +18 -0
- data/spec/libraries/resource_spec.rb +101 -79
- data/spec/libraries/resources_helper_spec.rb +3 -0
- data/spec/models/content_spec.rb +63 -60
- data/spec/models/element_spec.rb +203 -93
- data/spec/models/language_spec.rb +90 -65
- data/spec/models/page_layout_spec.rb +37 -0
- data/spec/models/page_spec.rb +181 -113
- data/spec/models/picture_spec.rb +73 -26
- data/spec/models/resource_spec.rb +52 -23
- data/spec/support/alchemy/specs_helpers.rb +2 -0
- data/spec/support/image.png +0 -0
- data/spec/{helpers/url_helpers_spec.rb → url_helpers_spec.rb} +0 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.selectBoxIt.js +1909 -0
- data/vendor/assets/javascripts/jquery_plugins/preloadCssImages.jQuery_v5.js +152 -0
- metadata +106 -33
- data/app/assets/stylesheets/alchemy/buttons.css.scss +0 -361
- data/app/assets/stylesheets/alchemy/jquery.sb.css.scss +0 -260
- data/app/views/alchemy/admin/contents/create.js.coffee +0 -49
- data/app/views/alchemy/admin/elements/fold.js.coffee +0 -37
- data/app/views/alchemy/admin/essence_pictures/destroy.js.coffee +0 -19
- data/app/views/alchemy/admin/pictures/_pictures_list.html.erb +0 -16
- data/app/views/alchemy/admin/pictures/update.js.erb +0 -3
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/locales/fo.yml +0 -5
- data/spec/page_layout_spec.rb +0 -35
- data/vendor/assets/javascripts/jquery_plugins/jquery.in-place-edit.js +0 -172
- data/vendor/assets/javascripts/jquery_plugins/jquery.sb.min.js +0 -14
@@ -1,13 +1,13 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="add_picture" id="add_picture_<%= element.id %>">
|
2
2
|
<%= link_to_overlay_window(
|
3
|
-
render_icon('
|
3
|
+
render_icon('add'),
|
4
4
|
alchemy.admin_pictures_path(
|
5
5
|
:element_id => element,
|
6
6
|
:options => options
|
7
7
|
),
|
8
8
|
{
|
9
|
-
:title => t('
|
10
|
-
:size => '
|
9
|
+
:title => t('add_image_to_element'),
|
10
|
+
:size => '780x580',
|
11
11
|
:resizable => true
|
12
12
|
}
|
13
13
|
) %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
'name',
|
18
18
|
@page.can_have_cells? ? grouped_elements_for_select(@elements) : elements_for_select(@elements),
|
19
19
|
{ :prompt => t('select_element') },
|
20
|
-
{ :class => "alchemy_selectbox" }
|
20
|
+
{ :class => "alchemy_selectbox", :autofocus => true }
|
21
21
|
) -%>
|
22
22
|
</td>
|
23
23
|
</tr>
|
data/app/views/alchemy/admin/elements/{_picture_editor.html.erb → _picture_gallery_editor.html.erb}
RENAMED
@@ -1,27 +1,23 @@
|
|
1
1
|
<%- max_image_count = options[:maximum_amount_of_images] || options[:max_images] -%>
|
2
|
-
<div class="content_editor">
|
2
|
+
<div class="content_editor picture_gallery_editor">
|
3
3
|
<label><%= t("picture_gallery_editor.#{element.name}", :default => t('picture_gallery_editor')) %></label>
|
4
4
|
<div class="picture_gallery_images" id="element_<%= element.id %>_contents">
|
5
|
-
<%-
|
6
|
-
<%= render_essence_editor(
|
7
|
-
:dragable => (picture_contents.size > 1)
|
8
|
-
}.merge(options)) %>
|
5
|
+
<%- pictures.each do |picture| -%>
|
6
|
+
<%= render_essence_editor(picture, {:dragable => (pictures.size > 1)}.merge(options)) %>
|
9
7
|
<%- end -%>
|
10
|
-
<%- if max_image_count.blank? ||
|
8
|
+
<%- if max_image_count.blank? || pictures.length < max_image_count.to_i -%>
|
11
9
|
<%= render(
|
12
|
-
:partial => 'alchemy/admin/elements/
|
10
|
+
:partial => 'alchemy/admin/elements/add_picture',
|
13
11
|
:locals => {
|
14
12
|
:element => element,
|
15
|
-
:essence_type => "Alchemy::EssencePicture",
|
16
|
-
:link_text => t("add_image_to_element"),
|
17
13
|
:options => options,
|
18
|
-
:dragable => (
|
14
|
+
:dragable => (pictures.size > 1)
|
19
15
|
}
|
20
16
|
) %>
|
21
17
|
<%- end -%>
|
22
18
|
</div>
|
23
19
|
</div>
|
24
|
-
<%- if
|
20
|
+
<%- if pictures.size > 1 -%>
|
25
21
|
<script type="text/javascript" charset="utf-8">
|
26
22
|
Alchemy.SortableContents('#element_<%= element.id %>_contents', '<%= form_authenticity_token %>');
|
27
23
|
</script>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
(function($) {
|
2
|
+
|
3
|
+
var $el = $('.element_editor[data-element-id="<%= @element.id %>"]');
|
4
|
+
|
5
|
+
function removeTinyMCEs(ids) {
|
6
|
+
for (var i = ids.length - 1; i >= 0; i--) {
|
7
|
+
tinymce.get(ids[i]).remove();
|
8
|
+
};
|
9
|
+
}
|
10
|
+
|
11
|
+
<% if @error %>
|
12
|
+
|
13
|
+
$("#element_<%= @element.id -%>_folder_spinner").replaceWith("<span class='error_icon' title='<%= @error -%>'>!</span>");
|
14
|
+
|
15
|
+
<% else %>
|
16
|
+
|
17
|
+
$el.replaceWith('<%= escape_javascript render(:partial => "element", :object => @element) -%>');
|
18
|
+
$el = $('#element_<%= @element.id %>');
|
19
|
+
$('#element_area .sortable_cell').sortable('refresh');
|
20
|
+
Alchemy.ElementEditorSelector.reinit($el);
|
21
|
+
|
22
|
+
<% if @element.folded %>
|
23
|
+
|
24
|
+
<% if @element.rtf_contents.any? %>
|
25
|
+
removeTinyMCEs(<%=raw @element.rtf_contents.collect(&:form_field_id).to_json %>);
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% else %>
|
29
|
+
|
30
|
+
$el.trigger('Alchemy.SelectElementEditor');
|
31
|
+
Alchemy.SelectBox($el);
|
32
|
+
|
33
|
+
<% @element.rtf_contents.each do |content| %>
|
34
|
+
Alchemy.Tinymce.addEditor('<%= content.form_field_id -%>');
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
Alchemy.ElementDirtyObserver($el);
|
38
|
+
Alchemy.Datepicker('input[type="date"]', $el);
|
39
|
+
Alchemy.ButtonObserver('button.button', $el);
|
40
|
+
Alchemy.overlayObserver("#element_<%= @element.id -%>");
|
41
|
+
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
})(jQuery);
|
@@ -1,28 +1,28 @@
|
|
1
1
|
<div id="element_area">
|
2
|
-
<% if @cells.any?
|
3
|
-
|
4
|
-
|
2
|
+
<% if @cells.any? %>
|
3
|
+
<div id="cells">
|
4
|
+
<ul>
|
5
|
+
<li><a href="#cell_for_other_elements"><%= t(:main_content) %></a></li>
|
6
|
+
<% @elements.each do |cell, elements| %>
|
7
|
+
<li>
|
8
|
+
<a href="#cell_<%= cell.name %>">
|
9
|
+
<%= t(cell.name, :scope => :cell_names) %>
|
10
|
+
</a>
|
11
|
+
</li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
<div id="cell_for_other_elements" class="sortable_cell for_other_elements_cell">
|
15
|
+
<%= render :partial => 'alchemy/admin/elements/element', :collection => @page.elements.not_trashed.not_in_cell, :locals => {:draggable => true} %>
|
16
|
+
</div>
|
5
17
|
<% @elements.each do |cell, elements| -%>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
</a>
|
11
|
-
</li>
|
12
|
-
<% end -%>
|
13
|
-
<% end -%>
|
14
|
-
</ul>
|
15
|
-
<% @elements.each do |cell, elements| -%>
|
16
|
-
<% if elements.any? -%>
|
17
|
-
<div id="cell_<%= cell.name %>" class="sortable_cell <%= cell.name %>_cell" data-cell-id="<%= cell.id %>">
|
18
|
-
<%= render :partial => 'alchemy/admin/elements/element', :collection => elements, :locals => {:draggable => true} %>
|
18
|
+
<div id="cell_<%= cell.name %>" class="sortable_cell <%= cell.name %>_cell" data-cell-id="<%= cell.id %>">
|
19
|
+
<%= render :partial => 'alchemy/admin/elements/element', :collection => elements, :locals => {:draggable => true} %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
19
22
|
</div>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<%= render :partial => 'alchemy/admin/elements/element', :collection => @elements, :locals => {:draggable => true} %>
|
26
|
-
</div>
|
27
|
-
<% end -%>
|
23
|
+
<% else %>
|
24
|
+
<div class="sortable_cell for_other_elements_cell" id="cell_for_other_elements">
|
25
|
+
<%= render :partial => 'alchemy/admin/elements/element', :collection => @elements, :locals => {:draggable => true} %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
28
|
</div>
|
@@ -1,20 +1,22 @@
|
|
1
1
|
(function($) {
|
2
2
|
|
3
|
-
$('
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
.
|
9
|
-
|
10
|
-
|
3
|
+
var close = $('<a class="close_elements_from_page_selector" title="<%= t(:remove) -%>">–</a>');
|
4
|
+
$('#elements_for_page_<%= @page_id -%>').html('<%= escape_javascript(render("elements_select")) %>');
|
5
|
+
$('#elements_for_page_<%= @page_id -%>').append(close);
|
6
|
+
|
7
|
+
close.on('click', function() {
|
8
|
+
Alchemy.LinkOverlay.hideElementsSelect(<%= @page_id -%>);
|
9
|
+
});
|
10
|
+
|
11
11
|
<%- unless @elements.first.blank? -%>
|
12
12
|
$('#page_anchor').val('#<%= @elements.first.dom_id -%>');
|
13
13
|
<%- end -%>
|
14
|
+
|
14
15
|
<%- if params[:internal_anchor] -%>
|
15
16
|
$('select.elements_from_page_selector').val('#<%= params[:internal_anchor] -%>');
|
16
17
|
$('#page_anchor').val('#<%= params[:internal_anchor] -%>');
|
17
18
|
<%- end -%>
|
18
|
-
|
19
|
+
|
20
|
+
Alchemy.SelectBox('#alchemyLinkOverlay');
|
19
21
|
|
20
22
|
})(jQuery);
|
@@ -1,8 +1,10 @@
|
|
1
1
|
(function($) {
|
2
2
|
|
3
|
+
var $el = $('#element_<%= @content.element.id %>');
|
3
4
|
$('#<%= content_dom_id(@content) %>').replaceWith('<%= escape_javascript(render(:partial => "alchemy/essences/essence_file_editor", :formats => [:html], :locals => {:content => @content, :options => @options})) %>');
|
4
5
|
Alchemy.closeCurrentWindow();
|
5
6
|
Alchemy.reloadPreview();
|
6
|
-
Alchemy.setElementDirty(
|
7
|
+
Alchemy.setElementDirty($el);
|
8
|
+
Alchemy.overlayObserver($el);
|
7
9
|
|
8
10
|
})(jQuery);
|
@@ -0,0 +1,28 @@
|
|
1
|
+
(function() {
|
2
|
+
var $picture_editor;
|
3
|
+
|
4
|
+
$('#essence_picture_<%= @content_id -%>').remove();
|
5
|
+
|
6
|
+
<% if max_image_count.present? && @essence_pictures.length < max_image_count.to_i %>
|
7
|
+
|
8
|
+
$picture_editor = $('#element_<%= @element.id -%>_contents');
|
9
|
+
|
10
|
+
if ($('div.add_picture', $picture_editor).length === 0) {
|
11
|
+
$('#element_<%= @element.id -%>_contents').append('<%= escape_javascript(
|
12
|
+
render(
|
13
|
+
:partial => "alchemy/admin/elements/add_picture",
|
14
|
+
:locals => {
|
15
|
+
:element => @element,
|
16
|
+
:options => @options
|
17
|
+
}
|
18
|
+
)
|
19
|
+
) %>');
|
20
|
+
}
|
21
|
+
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
Alchemy.SortableContents('#element_<%= @element.id -%>_contents', '<%= form_authenticity_token -%>');
|
25
|
+
Alchemy.reloadPreview();
|
26
|
+
Alchemy.pleaseWaitOverlay(false);
|
27
|
+
|
28
|
+
})()
|
@@ -50,11 +50,13 @@
|
|
50
50
|
<%= text_field_tag "contactform_link_title", {}, :class => 'thin_border auto_resize link_title' %>
|
51
51
|
</td>
|
52
52
|
</tr>
|
53
|
+
<tr>
|
54
|
+
<td class="submit" colspan="2">
|
55
|
+
<%= link_to(t(:apply), '#', {
|
56
|
+
:onclick => "Alchemy.LinkOverlay.createLink('contact', jQuery('#contactform_url').val() + '?subject=' + encodeURIComponent(jQuery('#contactform_subject').val()) + '&mail_to=' + encodeURIComponent(jQuery('#contactform_mailto').val()) + '&body=' + encodeURIComponent(jQuery('#contactform_body').val()), jQuery('#contactform_link_title').val(), null); Alchemy.LinkOverlay.close()",
|
57
|
+
:class => 'button'
|
58
|
+
}) %>
|
59
|
+
</td>
|
60
|
+
</tr>
|
53
61
|
</table>
|
54
|
-
<p>
|
55
|
-
<%= link_to(t(:apply), '#', {
|
56
|
-
:onclick => "Alchemy.LinkOverlay.createLink('contact', jQuery('#contactform_url').val() + '?subject=' + encodeURIComponent(jQuery('#contactform_subject').val()) + '&mail_to=' + encodeURIComponent(jQuery('#contactform_mailto').val()) + '&body=' + encodeURIComponent(jQuery('#contactform_body').val()), jQuery('#contactform_link_title').val(), null); Alchemy.LinkOverlay.close()",
|
57
|
-
:class => 'button'
|
58
|
-
}) %>
|
59
|
-
</p>
|
60
62
|
</div>
|
@@ -19,17 +19,19 @@
|
|
19
19
|
</tr>
|
20
20
|
<tr>
|
21
21
|
<td class="label long">
|
22
|
-
<label for="
|
22
|
+
<label for="external_link_target"><%= t("Open Link in") %>:</label>
|
23
23
|
</td>
|
24
|
-
<td>
|
25
|
-
<%= select_tag '
|
24
|
+
<td class="select left">
|
25
|
+
<%= select_tag 'external_link_target', options_for_select(Alchemy::Page.link_target_options), :class => 'alchemy_selectbox link_target medium' %>
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
<tr>
|
29
|
+
<td class="submit" colspan="2">
|
30
|
+
<%= link_to(t(:apply), '#', {
|
31
|
+
:onclick => "Alchemy.LinkOverlay.createLink('external', jQuery('#external_url').val(), jQuery('#extern_link_title').val(), jQuery('#external_link_target').val()); Alchemy.LinkOverlay.close()",
|
32
|
+
:class => 'button'
|
33
|
+
}) %>
|
26
34
|
</td>
|
27
35
|
</tr>
|
28
36
|
</table>
|
29
|
-
<p>
|
30
|
-
<%= link_to(t(:apply), '#', {
|
31
|
-
:onclick => "Alchemy.LinkOverlay.createLink('external', jQuery('#external_url').val(), jQuery('#extern_link_title').val(), jQuery('#link_target').val()); Alchemy.LinkOverlay.close()",
|
32
|
-
:class => 'button'
|
33
|
-
}) %>
|
34
|
-
</p>
|
35
37
|
</div>
|
@@ -29,15 +29,17 @@
|
|
29
29
|
<td class="label long">
|
30
30
|
<label for="file_link_target"><%= t("Open Link in") %>:</label>
|
31
31
|
</td>
|
32
|
-
<td>
|
33
|
-
<%= select_tag 'file_link_target', options_for_select(
|
32
|
+
<td class="select left">
|
33
|
+
<%= select_tag 'file_link_target', options_for_select(Alchemy::Page.link_target_options), :class => 'alchemy_selectbox link_target medium' %>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td class="submit" colspan="2">
|
38
|
+
<%= link_to(t(:apply), '#', {
|
39
|
+
:onclick => "Alchemy.LinkOverlay.createLink('file', jQuery('#public_filename').val(), jQuery('#file_link_title').val(), jQuery('#file_link_target').val()); Alchemy.LinkOverlay.close()",
|
40
|
+
:class => 'button'
|
41
|
+
}) %>
|
34
42
|
</td>
|
35
43
|
</tr>
|
36
44
|
</table>
|
37
|
-
<p>
|
38
|
-
<%= link_to(t(:apply), '#', {
|
39
|
-
:onclick => "Alchemy.LinkOverlay.createLink('file', jQuery('#public_filename').val(), jQuery('#file_link_title').val(), jQuery('#file_link_target').val()); Alchemy.LinkOverlay.close()",
|
40
|
-
:class => 'button'
|
41
|
-
}) %>
|
42
|
-
</p>
|
43
45
|
</div>
|
@@ -4,9 +4,11 @@
|
|
4
4
|
<tr>
|
5
5
|
<td colspan="2">
|
6
6
|
<div id="page_selector_container">
|
7
|
+
<% if @page_root %>
|
7
8
|
<ul id="sitemap">
|
8
9
|
<%= render :partial => 'page_for_links', :object => @page_root, :locals => {:area_name => @area_name} %>
|
9
10
|
</ul>
|
11
|
+
<% end %>
|
10
12
|
</div>
|
11
13
|
</td>
|
12
14
|
</tr>
|
@@ -22,17 +24,19 @@
|
|
22
24
|
<td class="label long">
|
23
25
|
<label for="internal_link_target"><%= t("Open Link in") %>:</label>
|
24
26
|
</td>
|
25
|
-
<td>
|
26
|
-
<%= select_tag 'internal_link_target', options_for_select(
|
27
|
+
<td class="select left">
|
28
|
+
<%= select_tag 'internal_link_target', options_for_select(Alchemy::Page.link_target_options), :class => 'alchemy_selectbox link_target medium' %>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td class="submit" colspan="2">
|
33
|
+
<%= hidden_field_tag(:internal_urlname) %>
|
34
|
+
<%= hidden_field_tag(:page_anchor) %>
|
35
|
+
<%= link_to(t(:apply), '#', {
|
36
|
+
:onclick => "Alchemy.LinkOverlay.createLink('internal', jQuery('#internal_urlname').val() + jQuery('#page_anchor').val(), jQuery('#internal_link_title').val(), jQuery('#internal_link_target').val()); Alchemy.LinkOverlay.close()",
|
37
|
+
:class => 'button'
|
38
|
+
}) %>
|
27
39
|
</td>
|
28
40
|
</tr>
|
29
41
|
</table>
|
30
|
-
<p>
|
31
|
-
<%= hidden_field_tag(:internal_urlname) %>
|
32
|
-
<%= hidden_field_tag(:page_anchor) %>
|
33
|
-
<%= link_to(t(:apply), '#', {
|
34
|
-
:onclick => "Alchemy.LinkOverlay.createLink('internal', jQuery('#internal_urlname').val() + jQuery('#page_anchor').val(), jQuery('#internal_link_title').val(), jQuery('#internal_link_target').val()); Alchemy.LinkOverlay.close()",
|
35
|
-
:class => 'button'
|
36
|
-
}) %>
|
37
|
-
</p>
|
38
42
|
</div>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= f.label :page_layout %>
|
9
9
|
</td>
|
10
10
|
<td class="select">
|
11
|
-
<%= f.select('page_layout', @page_layouts, {}, { :class => 'alchemy_selectbox' }) %>
|
11
|
+
<%= f.select('page_layout', @page_layouts, {}, { :class => 'alchemy_selectbox', :autofocus => true }) %>
|
12
12
|
</td>
|
13
13
|
</tr>
|
14
14
|
<tr>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
alchemy.configure_admin_page_path(page),
|
32
32
|
{
|
33
33
|
:title => t('edit_page_properties'),
|
34
|
-
:size => page.redirects_to_external? ? '410x270' : '
|
34
|
+
:size => page.redirects_to_external? ? '410x270' : '410x660'
|
35
35
|
},
|
36
36
|
:class => '',
|
37
37
|
:title => t('edit_page_properties')
|
@@ -4,17 +4,21 @@
|
|
4
4
|
<span class="site_status <%= page_for_links.locked ? ' locked' : '' %>" ></span>
|
5
5
|
</div>
|
6
6
|
<div class="sitemap_right_tools">
|
7
|
-
|
8
|
-
"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
<% unless page_for_links.redirects_to_external? %>
|
8
|
+
<%= link_to("",
|
9
|
+
alchemy.list_admin_elements_path(:page_id => page_for_links.id),
|
10
|
+
:remote => true,
|
11
|
+
:data => {
|
12
|
+
'page-id' => page_for_links.id,
|
13
|
+
:url => @url_prefix + page_for_links.urlname
|
14
|
+
},
|
15
|
+
:class => "show_elements_to_link",
|
16
|
+
:title => t('show_elements_from_page')
|
17
|
+
) %>
|
18
|
+
<div id="elements_for_page_<%= page_for_links.id %>" style="display: none" class="elements_for_page">
|
19
|
+
<%= image_tag("alchemy/ajax_loader.gif", :alt => '') %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
18
22
|
</div>
|
19
23
|
<div class="page_infos">
|
20
24
|
<span class="page_status <%= page_for_links.public ? 'public' : 'not_public' %>" title="<%= page_for_links.public ? t('Page public') : t('Page not public') %>"></span>
|
@@ -22,16 +26,23 @@
|
|
22
26
|
<span class="page_status <%= page_for_links.restricted ? 'restricted' : 'not_restricted' %>" title="<%= page_for_links.restricted ? t('Page restricted') : t('Page not restricted') %>"></span>
|
23
27
|
</div>
|
24
28
|
<div class="sitemap_sitename" id="sitemap_sitename_<%= page_for_links.id %>" name="<%= parse_sitemap_name(page_for_links) %>">
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
29
|
+
<% if page_for_links.redirects_to_external? %>
|
30
|
+
<span class="sitemap_pagename_link inactive"><%= page_for_links.name %></span>
|
31
|
+
<% else %>
|
32
|
+
<%= link_to(page_for_links.name, '', {
|
33
|
+
:data => {
|
34
|
+
'page-id' => page_for_links.id,
|
35
|
+
:url => @url_prefix + page_for_links.urlname
|
36
|
+
},
|
37
|
+
:title => t('page_for_links.choose_page', :name => page_for_links.name),
|
38
|
+
:class => "sitemap_pagename_link #{cycle('even', 'odd')}"
|
39
|
+
}) %>
|
40
|
+
<% end %>
|
30
41
|
</div>
|
31
42
|
</div>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
43
|
+
<% if !page_for_links.children.empty? %>
|
44
|
+
<ul id="page_<%= page_for_links.id %>_children">
|
45
|
+
<%= render :partial => 'page_for_links', :collection => page_for_links.children, :locals => {:area_name => @area_name} %>
|
46
|
+
</ul>
|
47
|
+
<% end %>
|
37
48
|
</li>
|