Replaced window.hash= by Element.scrollTo()
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1136 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
15ed53cf17
commit
93ef8b7f77
|
@ -59,7 +59,7 @@ module ApplicationHelper
|
||||||
def show_and_goto_link(name, id, options={})
|
def show_and_goto_link(name, id, options={})
|
||||||
onclick = "Element.show('#{id}'); "
|
onclick = "Element.show('#{id}'); "
|
||||||
onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
|
onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
|
||||||
onclick << "location.href='##{id}-anchor'; "
|
onclick << "Element.scrollTo('#{id}'); "
|
||||||
onclick << "return false;"
|
onclick << "return false;"
|
||||||
link_to(name, "#", options.merge(:onclick => onclick))
|
link_to(name, "#", options.merge(:onclick => onclick))
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
:method => 'post',
|
:method => 'post',
|
||||||
:update => 'preview',
|
:update => 'preview',
|
||||||
:with => 'Form.serialize("issue-form")',
|
:with => 'Form.serialize("issue-form")',
|
||||||
:complete => "location.hash='preview'"
|
:complete => "Element.scrollTo('preview')"
|
||||||
}, :accesskey => accesskey(:preview) %>
|
}, :accesskey => accesskey(:preview) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
:method => 'post',
|
:method => 'post',
|
||||||
:update => 'preview',
|
:update => 'preview',
|
||||||
:with => "Form.serialize('issue-form')",
|
:with => "Form.serialize('issue-form')",
|
||||||
:complete => "location.href='#preview-top'"
|
:complete => "Element.scrollTo('preview')"
|
||||||
}, :accesskey => accesskey(:preview) %>
|
}, :accesskey => accesskey(:preview) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<a name="preview-top"></a>
|
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
|
|
|
@ -89,7 +89,6 @@ end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if authorize_for('issues', 'edit') %>
|
<% if authorize_for('issues', 'edit') %>
|
||||||
<a name="update-anchor"></a>
|
|
||||||
<div id="update" style="display:none;">
|
<div id="update" style="display:none;">
|
||||||
<h3><%= l(:button_update) %></h3>
|
<h3><%= l(:button_update) %></h3>
|
||||||
<%= render :partial => 'edit' %>
|
<%= render :partial => 'edit' %>
|
||||||
|
|
|
@ -16,12 +16,11 @@
|
||||||
:method => 'post',
|
:method => 'post',
|
||||||
:update => 'preview',
|
:update => 'preview',
|
||||||
:with => "Form.serialize('wiki_form')",
|
:with => "Form.serialize('wiki_form')",
|
||||||
:complete => "location.href='#preview-top'"
|
:complete => "Element.scrollTo('preview')"
|
||||||
}, :accesskey => accesskey(:preview) %></p>
|
}, :accesskey => accesskey(:preview) %></p>
|
||||||
<%= wikitoolbar_for 'content_text' %>
|
<%= wikitoolbar_for 'content_text' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<a name="preview-top"></a>
|
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
|
|
Loading…
Reference in New Issue