Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data-index attribute to newly created page parts. #2063

Merged
merged 1 commit into from
Dec 5, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/app/assets/javascripts/refinery/admin.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,9 @@ var page_options = {
// Add a new tab for the new content section.
$('#page_part_editors').append(data);
page_options.tabs.tabs('add', '#page_part_new_' + $('#new_page_part_index').val(), part_title);
// this is here because of https://github.com/refinery/refinerycms/issues/2060
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this comment show up in the compiled version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I have no idea.

Should I remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run rake assets:precompile ;-)

$("#page-tabs #page_parts li").last().attr("data-index", $('#new_page_part_index').val());

page_options.tabs.tabs('select', $('#new_page_part_index').val());

// hook into wymeditor to instruct it to select this new tab again once it has loaded.
Expand Down