def show_and_goto_link(name, id, options={})
onclick = "Element.show('#{id}'); "
onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
- onclick << "location.href='##{id}-anchor'; "
+ onclick << "Element.scrollTo('#{id}'); "
onclick << "return false;"
link_to(name, "#", options.merge(:onclick => onclick))
end
:method => 'post',
:update => 'preview',
:with => 'Form.serialize("issue-form")',
- :complete => "location.hash='preview'"
+ :complete => "Element.scrollTo('preview')"
}, :accesskey => accesskey(:preview) %>
<% end %>
:method => 'post',
:update => 'preview',
:with => "Form.serialize('issue-form')",
- :complete => "location.href='#preview-top'"
+ :complete => "Element.scrollTo('preview')"
}, :accesskey => accesskey(:preview) %>
<% end %>
-<a name="preview-top"></a>
<div id="preview" class="wiki"></div>
<% end %>
<% if authorize_for('issues', 'edit') %>
- <a name="update-anchor"></a>
<div id="update" style="display:none;">
<h3><%= l(:button_update) %></h3>
<%= render :partial => 'edit' %>
:method => 'post',
:update => 'preview',
:with => "Form.serialize('wiki_form')",
- :complete => "location.href='#preview-top'"
+ :complete => "Element.scrollTo('preview')"
}, :accesskey => accesskey(:preview) %></p>
<%= wikitoolbar_for 'content_text' %>
<% end %>
-<a name="preview-top"></a>
<div id="preview" class="wiki"></div>
<% content_for :header_tags do %>