summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-07 05:56:27 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-07 05:56:27 -0400
commitc9b07025ceb5ff50dcae2d845bcdc63efb000d7d (patch)
tree9413dc741a44b032e00dacf9a316255d586d894d
parent67c5a4bb63a08c3620e6667f4b0c3a3c61cc61ce (diff)
downloadaskbot-c9b07025ceb5ff50dcae2d845bcdc63efb000d7d.tar.gz
askbot-c9b07025ceb5ff50dcae2d845bcdc63efb000d7d.tar.bz2
askbot-c9b07025ceb5ff50dcae2d845bcdc63efb000d7d.zip
css and bug fixes
-rw-r--r--askbot/models/post.py4
-rw-r--r--askbot/templates/question/content.html4
-rw-r--r--askbot/utils/markup.py2
3 files changed, 7 insertions, 3 deletions
diff --git a/askbot/models/post.py b/askbot/models/post.py
index 10003e57..42905f65 100644
--- a/askbot/models/post.py
+++ b/askbot/models/post.py
@@ -609,8 +609,10 @@ class Post(models.Model):
return markup.plain_text_input_converter
elif parser_type == 'markdown':
return markup.markdown_input_converter
- elif parser_type == 'tynymce':
+ elif parser_type == 'tinymce':
return markup.tinymce_input_converter
+ else:
+ raise NotImplementedError
def has_group(self, group):
"""true if post belongs to the group"""
diff --git a/askbot/templates/question/content.html b/askbot/templates/question/content.html
index bc08e789..d07c3727 100644
--- a/askbot/templates/question/content.html
+++ b/askbot/templates/question/content.html
@@ -24,15 +24,17 @@
{# buttons below cannot be cached yet #}
{% if user_already_gave_answer %}
+<div style="margin-top: 15px">
<a
class="button submit"
href="{% url "edit_answer" previous_answer.id %}"
>{% trans %}Edit Your Previous Answer{% endtrans %}</a>
<span>{% trans %}(only one answer per question is allowed){% endtrans %}</span>
- <div style="invisible">
+ <div class="invisible">
{# hidden because we still need js from the tinymce widget #}
{% include "question/new_answer_form.html" %}
</div>
+</div>
{% else %}
{% include "question/new_answer_form.html" %}
{% endif %}
diff --git a/askbot/utils/markup.py b/askbot/utils/markup.py
index 33d0522e..b96cf42d 100644
--- a/askbot/utils/markup.py
+++ b/askbot/utils/markup.py
@@ -202,7 +202,7 @@ def markdown_input_converter(text):
text = get_parser().convert(text)
return sanitize_html(text)
-def tinymce_input_parser(text):
+def tinymce_input_converter(text):
"""tinymce input to production html converter"""
text = urlize(text)
return strip_tags(text, ['script', 'style', 'link'])