Skip to content

Commit

Permalink
add logic for editor/toolbar partial publiclab#8478
Browse files Browse the repository at this point in the history
  • Loading branch information
noi5e committed Jan 12, 2021
1 parent f43f615 commit b7ffcc1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ def get_large_dropzone_id(location, reply_to)
end
end

# used in views/editor/_toolbar.html.erb
def get_toolbar_element_id(location, reply_to, comment_id)
case location
when :main
'main'
when :reply
'reply-' + reply_to.to_s
when :edit
'edit-' + comment_id
when :responses
'responses'
end
end

# used in views/comments/_form.html.erb
def get_textarea_id(location, reply_to)
case location
Expand Down

0 comments on commit b7ffcc1

Please sign in to comment.