wiki: Add formatting help to edit page.

This commit is contained in:
Andre D
2013-05-20 19:34:51 -07:00
committed by Neil Williams
parent 57c573903f
commit 3bc028c712
3 changed files with 21 additions and 0 deletions

View File

@@ -168,6 +168,13 @@
}
}
.markhelp {
max-width: 500px;
font-size: 1.2em;
padding: 4px;
margin: 5px 0;
}
}
// Page title

View File

@@ -142,5 +142,14 @@ r.wiki = {
url += '&v2=' + v2
}
window.location = url
},
helpon: function(elem) {
$(elem).parents("form").children(".markhelp:first").show();
},
helpoff: function(elem) {
$(elem).parents("form").children(".markhelp:first").hide();
}
}

View File

@@ -24,6 +24,9 @@
from r2.lib.filters import keep_space
%>
<%namespace file="printablebuttons.html" import="toggle_button" />
<%namespace file="usertext.html" import="markhelp" />
<div style="display: none;" id="wiki_edit_conflict">
<h2 class="error">there was a conflict editing</h2>
<h1>${_("your edit")}</h1>
@@ -40,6 +43,8 @@
<form method="post" id="editform" onsubmit="r.wiki.submitEdit(event)">
<textarea name="content" rows="20" cols="20" style="width: 100%" id="wiki_page_content">${keep_space(thing.page_content)}</textarea>
${toggle_button("help-toggle", _("formatting help"), _("hide help"), "r.wiki.helpon", "r.wiki.helpoff")}
${markhelp()}
<br/><br/>
<label for="reason">${_("reason for revision")}</label><br/>
<input type="text" name="reason" maxlength="256" id="wiki_revision_reason" />