##// END OF EJS Templates
Replaced window.hash= by Element.scrollTo()...
Jean-Philippe Lang -
r1122:93ef8b7f77ec
parent child
Show More
@@ -59,7 +59,7 module ApplicationHelper
59 def show_and_goto_link(name, id, options={})
59 def show_and_goto_link(name, id, options={})
60 onclick = "Element.show('#{id}'); "
60 onclick = "Element.show('#{id}'); "
61 onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
61 onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
62 onclick << "location.href='##{id}-anchor'; "
62 onclick << "Element.scrollTo('#{id}'); "
63 onclick << "return false;"
63 onclick << "return false;"
64 link_to(name, "#", options.merge(:onclick => onclick))
64 link_to(name, "#", options.merge(:onclick => onclick))
65 end
65 end
@@ -32,7 +32,7
32 :method => 'post',
32 :method => 'post',
33 :update => 'preview',
33 :update => 'preview',
34 :with => 'Form.serialize("issue-form")',
34 :with => 'Form.serialize("issue-form")',
35 :complete => "location.hash='preview'"
35 :complete => "Element.scrollTo('preview')"
36 }, :accesskey => accesskey(:preview) %>
36 }, :accesskey => accesskey(:preview) %>
37 <% end %>
37 <% end %>
38
38
@@ -12,9 +12,8
12 :method => 'post',
12 :method => 'post',
13 :update => 'preview',
13 :update => 'preview',
14 :with => "Form.serialize('issue-form')",
14 :with => "Form.serialize('issue-form')",
15 :complete => "location.href='#preview-top'"
15 :complete => "Element.scrollTo('preview')"
16 }, :accesskey => accesskey(:preview) %>
16 }, :accesskey => accesskey(:preview) %>
17 <% end %>
17 <% end %>
18
18
19 <a name="preview-top"></a>
20 <div id="preview" class="wiki"></div>
19 <div id="preview" class="wiki"></div>
@@ -89,7 +89,6 end %>
89 <% end %>
89 <% end %>
90
90
91 <% if authorize_for('issues', 'edit') %>
91 <% if authorize_for('issues', 'edit') %>
92 <a name="update-anchor"></a>
93 <div id="update" style="display:none;">
92 <div id="update" style="display:none;">
94 <h3><%= l(:button_update) %></h3>
93 <h3><%= l(:button_update) %></h3>
95 <%= render :partial => 'edit' %>
94 <%= render :partial => 'edit' %>
@@ -16,12 +16,11
16 :method => 'post',
16 :method => 'post',
17 :update => 'preview',
17 :update => 'preview',
18 :with => "Form.serialize('wiki_form')",
18 :with => "Form.serialize('wiki_form')",
19 :complete => "location.href='#preview-top'"
19 :complete => "Element.scrollTo('preview')"
20 }, :accesskey => accesskey(:preview) %></p>
20 }, :accesskey => accesskey(:preview) %></p>
21 <%= wikitoolbar_for 'content_text' %>
21 <%= wikitoolbar_for 'content_text' %>
22 <% end %>
22 <% end %>
23
23
24 <a name="preview-top"></a>
25 <div id="preview" class="wiki"></div>
24 <div id="preview" class="wiki"></div>
26
25
27 <% content_for :header_tags do %>
26 <% content_for :header_tags do %>
General Comments 0
You need to be logged in to leave comments. Login now