##// END OF EJS Templates
Fixed: wiki preview doesn't work on long entries....
Jean-Philippe Lang -
r652:72714d86f6b3
parent child
Show More
@@ -1,41 +1,27
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
2 <%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
3 </div>
3 </div>
4
4
5 <h2><%= @page.pretty_title %></h2>
5 <h2><%= @page.pretty_title %></h2>
6
6
7 <% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %>
7 <% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %>
8 <%= f.hidden_field :version %>
8 <%= f.hidden_field :version %>
9 <%= error_messages_for 'content' %>
9 <%= error_messages_for 'content' %>
10 <div class="contextual">
10 <div class="contextual">
11 <%= l(:setting_text_formatting) %>:
11 <%= l(:setting_text_formatting) %>:
12 <%= link_to l(:label_help), {:controller => 'help', :ctrl => 'wiki', :page => 'syntax' },
12 <%= link_to l(:label_help), {:controller => 'help', :ctrl => 'wiki', :page => 'syntax' },
13 :onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
13 :onclick => "window.open('#{ url_for :controller => 'help', :ctrl => 'wiki', :page => 'syntax' }', '', 'resizable=yes, location=no, width=300, height=500, menubar=no, status=no, scrollbars=yes'); return false;" %>
14 </div>
14 </div>
15 <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p>
15 <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit' %></p>
16 <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
16 <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
17 <p><%= submit_tag l(:button_save) %>
17 <p><%= submit_tag l(:button_save) %>
18 <%= link_to_remote l(:label_preview),
18 <%= link_to_remote l(:label_preview),
19 { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
19 { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
20 :method => 'get',
20 :method => 'post',
21 :update => 'preview',
21 :update => 'preview',
22 :with => "Form.serialize('wiki_form')"
22 :with => "Form.serialize('wiki_form')"
23 } %></p>
23 } %></p>
24
24 <%= wikitoolbar_for 'content_text' %>
25 <% end %>
26
27 <% if Setting.text_formatting == 'textile' %>
28 <%= javascript_include_tag 'jstoolbar' %>
29 <script type="text/javascript">
30 //<![CDATA[
31 if (document.getElementById) {
32 if (document.getElementById('content_text')) {
33 var commentTb = new jsToolBar(document.getElementById('content_text'));
34 commentTb.draw();
35 }
36 }
37 //]]>
38 </script>
39 <% end %>
25 <% end %>
40
26
41 <div id="preview" class="wiki"></div> No newline at end of file
27 <div id="preview" class="wiki"></div>
General Comments 0
You need to be logged in to leave comments. Login now