diff options
Diffstat (limited to 'app/views/documents')
-rw-r--r-- | app/views/documents/index.html.erb | 4 | ||||
-rw-r--r-- | app/views/documents/show.html.erb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index fd47c3842..28fc74684 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -1,6 +1,6 @@ <div class="contextual"> <%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add', - :onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %> + :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %> </div> <div id="add-document" style="display:none;"> @@ -9,7 +9,7 @@ <%= render :partial => 'form', :locals => {:f => f} %> <p> <%= submit_tag l(:button_create) %> - <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-document")' %> + <%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %> </p> <% end %> </div> diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 2a430040d..c18bb07cb 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -17,7 +17,7 @@ <%= link_to_attachments @document %> <% if authorize_for('documents', 'add_attachment') %> -<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", +<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", :id => 'attach_files_link' %></p> <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> <div class="box"> |