From 6bf0eabdd9d62477d65f4fccbd0e3cb0dcc13f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 27 Apr 2016 14:12:36 +0200 Subject: [PATCH] Remove various Prototype uses --- app/views/boards/show.html.erb | 4 ++-- app/views/news/show.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index 7bcc831651..d5ae3018d1 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -42,7 +42,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= styled_button_tag l(:button_create), class: '-highlight -with-icon icon-checkmark' %> <%= preview_link preview_board_topics_path(@board), 'message-form-preview' %> - <%= link_to l(:button_cancel), '', onclick: 'Element.hide("add-message")', class: 'button' %> + <%= link_to l(:button_cancel), '', onclick: 'jQuery("#add-message").hide();', class: 'button' %> <% end %>
<% end %> @@ -53,7 +53,7 @@ See doc/COPYRIGHT.rdoc for more details.
  • <%= link_to({ controller: '/messages', action: 'new', board_id: @board}, class: 'button -alt-highlight', - onclick: 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;') do %> + onclick: 'jQuery("#add-message").show(); jQuery("#message_subject").focus(); return false;') do %> <%= l(:label_message_new) %> <% end %> diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index 3a4014b00a..9851c642ee 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -60,7 +60,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= labelled_tabular_form_for @news, html: { id: 'news-form' } do |f| %> <%= render partial: 'form', locals: { f: f } %> <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %> - <%= link_to l(:button_cancel), "#", onclick: 'Element.hide("edit-news"); return false;', + <%= link_to l(:button_cancel), "#", onclick: 'jQuery("#edit-news").hide(); return false;', class: 'button'%> <%= preview_link preview_news_path(@news), 'news-form-preview' %> <% end %>