Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#556] [BUG FIX] Same block can appear twice.
* Issue: CKeditor would not work if the same block appeared twice, meaning you couldn't remove, edit or move either block. * Fix: Generate unique ids for each block, so CKeditor could bind to them. Their ids are meaningless anyway, as data attributes are used.
- Loading branch information
Showing
3 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<%= content_tag 'div', class: 'connector', | ||
data: { move_up: cms.move_up_connector_path(connector, format: :json), | ||
move_down: cms.move_down_connector_path(connector, format: :json), | ||
remove: cms.connector_path(connector, format: :json), | ||
edit_path: edit_cms_connectable_path(connectable, :_redirect_to => @page.path) | ||
data: {move_up: cms.move_up_connector_path(connector, format: :json), | ||
move_down: cms.move_down_connector_path(connector, format: :json), | ||
remove: cms.connector_path(connector, format: :json), | ||
edit_path: edit_cms_connectable_path(connectable, :_redirect_to => @page.path) | ||
} do %> | ||
<%= link_to(image_tag('cms/pencil.png', class: 'cms-edit-content-link'), edit_cms_connectable_path(connectable, :_redirect_to => @page.path), title: "Edit this content.") %> | ||
<%= render_connectable connectable %> | ||
<%= link_to(image_tag('cms/pencil.png', class: 'cms-edit-content-link'), | ||
edit_cms_connectable_path(connectable, :_redirect_to => @page.path), | ||
title: "Edit this content.") %> | ||
<%= render_connectable connectable %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters