Changesets can be listed by changeset number.
The Git repository is here.
Changeset 52
Further layout improvements for page editing, rollback and creation.
Always renders at least the static shared sidebar in the default layout
now. Changed engines.rb to work around a RedCloth 3.0.4 problem that
showed up when Rails 1.1.4 was introduced concurrently. A mailing list
query has been lodged about it. In the mean time, newlines in textile
input will not produce line breaks in the HTML output and HTML in the
textile input is being manually escaped by simply replacing "<" and ">"
with HTML entities. Fixes Ticket #34.
- Comitted by: adh
- Date: Friday August 04 16:19:44 2006 (over 18 years ago)
Affected files:
- rool/rails/instiki/trunk/app/views/layouts/default.rhtml (diff)
- rool/rails/instiki/trunk/app/views/wiki/edit.rhtml (diff)
- rool/rails/instiki/trunk/app/views/wiki/new.rhtml (diff)
- rool/rails/instiki/trunk/app/views/wiki/rollback.rhtml (diff)
- rool/rails/instiki/trunk/lib/chunks/engines.rb (diff)
- rool/rails/instiki/trunk/public/stylesheets/instiki.css (diff)
rool/rails/instiki/trunk/app/views/layouts/default.rhtml:
prev. | current | |
<td width="25%"> | ||
<div id="sidebar"> | ||
71 | ||
71 | <%= if (@web.nil? || @hide_navigation) then render 'shared/fixed_sidebar' else render 'navigation' end %> | |
</div> | ||
</td> | ||
</tr> |
rool/rails/instiki/trunk/app/views/wiki/edit.rhtml:
prev. | current | |
@hide_navigation = true | ||
%> | ||
7 | ||
8 | | |
9 | | |
10 | ||
7 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> | |
8 | <tr valign="top"> | |
9 | <td align="left"> | |
10 | <%= form_tag({ :action => 'save', :web => @web.address, :id => @page.name}, | |
11 | {'id' => 'editForm', 'method' => 'post', 'onSubmit' => 'cleanAuthorName()'}) | |
12 | %> | |
12 | ||
13 | | |
14 | ||
14 | <textarea name="content" id="content" cols="48" rows="24"><%= h(@flash[:content] || @page.content) %></textarea> | |
16 | ||
17 | | |
18 | ||
19 | ||
20 | | |
21 | | |
22 | | |
23 | | |
24 | | |
25 | | |
26 | | |
27 | | |
28 | | |
29 | ||
30 | ||
16 | <p> | |
17 | <input type="submit" value="Submit" accesskey="s"/> as | |
18 | <%= text_field_tag :author, @author, | |
19 | :onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;", | |
20 | :onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %> | |
21 | | | |
22 | <%= link_to('Cancel', {:web => @web.address, :action => 'cancel_edit', :id => @page.name}, | |
23 | {:accesskey => 'c'}) | |
24 | %> | |
25 | <small>(unlocks page)</small> | |
26 | </p> | |
27 | <%= end_form_tag %> | |
28 | </td> | |
29 | <td align="left"> | |
30 | <div id="MarkupHelp"> | |
31 | <%= render("#{@web.markup}_help") %> | |
32 | <%= render('wiki_words_help') %> | |
33 | </div> | |
34 | </td> | |
35 | </tr> | |
36 | </table> | |
<script language="JavaScript1.2"> | ||
function cleanAuthorName() { |
rool/rails/instiki/trunk/app/views/wiki/new.rhtml:
prev. | current | |
1 | ||
1 | <% | |
@title = "Creating #{WikiWords.separate(@page_name)}" | ||
@content_width = 720 | ||
@hide_navigation = true | ||
%> | ||
7 | ||
8 | | |
9 | | |
10 | ||
7 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> | |
8 | <tr valign="top"> | |
9 | <td align="left"> | |
10 | <%= form_tag({ :action => 'save', :web => @web.address, :id => @page_name}, | |
11 | {'id' => 'editForm', 'method' => 'post', 'onSubmit' => 'cleanAuthorName();'}) | |
12 | %> | |
13 | <textarea name="content" id="content" cols="48" rows="24"><%= h(@flash[:content] || '') %></textarea> | |
12 | ||
13 | | |
14 | ||
15 | <p> | |
16 | <input type="submit" value="Submit" accesskey="s"/> as | |
17 | <%= text_field_tag :author, @author, | |
18 | :onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;", | |
19 | :onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %> | |
20 | </p> | |
21 | <%= end_form_tag %> | |
22 | </td> | |
23 | <td align="left"> | |
24 | <div id="MarkupHelp"> | |
25 | <%= render("#{@web.markup}_help") %> | |
26 | <%= render('wiki_words_help') %> | |
27 | </div> | |
28 | </td> | |
29 | </tr> | |
30 | </table> | |
16 | ||
17 | | |
18 | ||
19 | ||
20 | | |
21 | | |
22 | | |
23 | | |
24 | ||
25 | ||
26 | ||
<script language="JavaScript1.2"> | ||
function cleanAuthorName() { | ||
if (document.getElementById('authorName').value == "") { |
rool/rails/instiki/trunk/app/views/wiki/rollback.rhtml:
prev. | current | |
1 | ||
1 | <% | |
@title = "Rollback to #{@page.plain_name} Rev ##{@revision_number}" | ||
@content_width = 720 | ||
@hide_navigation = true | ||
... | ... | |
<%= "<p style='color:red'>Please correct the error that caused this error in rendering:<br/><small>#{@params["msg"]}</small></p>" if @params["msg"] %> | ||
9 | ||
10 | | |
11 | ||
12 | ||
13 | | |
14 | ||
15 | ||
16 | | |
17 | | |
18 | | |
19 | | |
20 | | |
21 | | |
22 | | |
23 | | |
24 | | |
25 | ||
26 | ||
9 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> | |
10 | <tr valign="top"> | |
11 | <td align="left"> | |
12 | <%= form_tag({:web => @web.address, :action => 'save', :id => @page.name}, | |
13 | {:id => 'editForm', :method => 'post', :onSubmit => 'cleanAuthorName();'}) | |
14 | %> | |
15 | <textarea name="content" id="content" cols="48" rows="24"><%= @revision.content %></textarea> | |
28 | ||
17 | <p> | |
18 | <input type="submit" value="Update" accesskey="u" /> as | |
19 | <input type="text" name="author" id="authorName" value="<%= @author %>" | |
20 | onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" /> | |
21 | | | |
22 | <%= link_to('Cancel', | |
23 | {:web => @web.address, :action => 'cancel_edit', :id => @page.name}, | |
24 | {:accesskey => 'c'}) | |
25 | %> | |
26 | <small>(unlocks page)</small> | |
27 | </p> | |
28 | <%= end_form_tag %> | |
29 | </td> | |
30 | <td align="left"> | |
31 | <div id="MarkupHelp"> | |
32 | <%= render("#{@web.markup}_help") if @web %> | |
33 | <%= render('wiki_words_help') if @web %> | |
34 | </div> | |
35 | </td> | |
36 | </tr> | |
37 | </table> | |
<script language="JavaScript1.2"> | ||
function cleanAuthorName() { |
rool/rails/instiki/trunk/lib/chunks/engines.rb:
prev. | current | |
class Textile < AbstractEngine | ||
def mask | ||
require_dependency 'redcloth' | ||
29 | | |
29 | ||
30 | # 2006-08-04 (ADH): Hacks to work around RedCloth 3.0.4 | |
31 | # appearing to malfunction - filter_html doesn't work (though | |
32 | # Instiki had it turned off anyway) and hard_breaks really | |
33 | # breaks things badly. | |
34 | ||
35 | # Was: redcloth = RedCloth.new(@content, [:hard_breaks] + @content.options[:engine_opts]) | |
36 | ||
37 | redcloth = RedCloth.new(@content.to_s.gsub(/</, '<').gsub(/>/, '>'), @content.options[:engine_opts]) | |
38 | redcloth.hard_breaks = false | |
39 | ||
redcloth.filter_html = false | ||
redcloth.no_span_caps = false | ||
redcloth.to_html(:textile) |
rool/rails/instiki/trunk/public/stylesheets/instiki.css:
prev. | current | |
div.fieldWithErrors input { border: 1px solid #900; } | ||
div.info { color: #060; background-color: #BFBFBF; padding: 0.5em; margin-top: 0.5em; font-weight: bold; width: 100%; } | ||
95 | ||
95 | /* div#MarkupHelp { float: right; width: 20%; } */ | |
96 | div#MarkupHelp { margin-left: 10px; } | |
div#MarkupHelp table { margin-bottom: 0; border-top: 3px solid #999; border-left: 3px solid #999; | ||
border-right: 3px solid #BBB; border-bottom: 3px solid #BBB} | ||
div#MarkupHelp td { font-size: 80%; padding: 0.2em; margin: 0; border: 1px solid #999; border-width: 1px 0 1px 0; |