summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-06 21:56:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-06 21:56:40 +0000
commit98a01d62c2bed5140358b471fd4b178f0d82aa0c (patch)
tree31e56808d0f4d5159f53e9d13725661a4999e0c4 /app
parent422677b9b7a6b5850080fb4c0bcc95f1a8d6ff70 (diff)
downloadredmine-98a01d62c2bed5140358b471fd4b178f0d82aa0c.tar.gz
redmine-98a01d62c2bed5140358b471fd4b178f0d82aa0c.zip
Automatically scroll down to the preview when previewing wiki page.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@712 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/views/wiki/edit.rhtml4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml
index 368ab098b..7579527c8 100644
--- a/app/views/wiki/edit.rhtml
+++ b/app/views/wiki/edit.rhtml
@@ -19,11 +19,13 @@
{ :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
:method => 'post',
:update => 'preview',
- :with => "Form.serialize('wiki_form')"
+ :with => "Form.serialize('wiki_form')",
+ :complete => "location.href='#preview-top'"
} %></p>
<%= wikitoolbar_for 'content_text' %>
<% end %>
+<a name="preview-top"></a>
<div id="preview" class="wiki"></div>
<% content_for :header_tags do %>