summaryrefslogtreecommitdiffstats
path: root/app/views/news/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/news/index.html.erb')
-rw-r--r--app/views/news/index.html.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb
index e62cce498..38eecd262 100644
--- a/app/views/news/index.html.erb
+++ b/app/views/news/index.html.erb
@@ -2,7 +2,7 @@
<%= link_to(l(:label_news_new),
new_project_news_path(@project),
:class => 'icon icon-add',
- :onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
+ :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
</div>
<div id="add-news" style="display:none;">
@@ -12,7 +12,7 @@
<%= render :partial => 'news/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
-<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
+<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
<% end if @project %>
<div id="preview" class="wiki"></div>
</div>