summaryrefslogtreecommitdiffstats
path: root/askbot/templates
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-10 01:55:33 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-10 01:55:33 -0400
commite4e4e933f210f0ef6ca3f740da411574aa61ace1 (patch)
tree2d100ce46eea0299f328bc06daea204759f3248b /askbot/templates
parent9a3af6a290682a485e8ee05db40bd511eaab17a8 (diff)
downloadaskbot-e4e4e933f210f0ef6ca3f740da411574aa61ace1.tar.gz
askbot-e4e4e933f210f0ef6ca3f740da411574aa61ace1.tar.bz2
askbot-e4e4e933f210f0ef6ca3f740da411574aa61ace1.zip
made answer editor be folded by default
Diffstat (limited to 'askbot/templates')
-rw-r--r--askbot/templates/question/content.html20
-rw-r--r--askbot/templates/question/javascript.html7
-rw-r--r--askbot/templates/question/new_answer_form.html43
3 files changed, 41 insertions, 29 deletions
diff --git a/askbot/templates/question/content.html b/askbot/templates/question/content.html
index fe11d8e3..23286ce0 100644
--- a/askbot/templates/question/content.html
+++ b/askbot/templates/question/content.html
@@ -26,17 +26,17 @@
{% if new_answer_allowed %}
{% include "question/new_answer_form.html" %}
{% else %}
-<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 user is allowed){% endtrans %}</span>
- <div class="invisible">
- {# hidden because we still need js from the tinymce widget #}
- {% include "question/new_answer_form.html" %}
+ <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 user is allowed){% endtrans %}</span>
+ <div class="invisible">
+ {# hidden because we still need js from the tinymce widget #}
+ {% include "question/new_answer_form.html" %}
+ </div>
</div>
-</div>
{% endif %}
{% if question.closed == False and request.user == question.author %}{# this is outside the form on purpose #}
<input
diff --git a/askbot/templates/question/javascript.html b/askbot/templates/question/javascript.html
index d32e14c5..f58b4acc 100644
--- a/askbot/templates/question/javascript.html
+++ b/askbot/templates/question/javascript.html
@@ -84,4 +84,11 @@
CPValidator.getAnswerFormMessages()
);
}
+ (function() {
+ var editorBox = $('.folded-editor');
+ if (editorBox.length) {
+ var foldedEditor = new FoldedEditor();
+ foldedEditor.decorate(editorBox);
+ }
+ })();
</script>
diff --git a/askbot/templates/question/new_answer_form.html b/askbot/templates/question/new_answer_form.html
index 2235f4f4..b65e0e3d 100644
--- a/askbot/templates/question/new_answer_form.html
+++ b/askbot/templates/question/new_answer_form.html
@@ -35,25 +35,30 @@
{% endif %}
</p>
{% endif %}
- {{ macros.edit_post(
- answer,
- user = request.user,
- editor_type = settings.EDITOR_TYPE
- )
- }}
- <input id="add-answer-btn" type="submit" class="submit after-editor" style="float:left"/>
- <script type="text/javascript">
- askbot['functions']['renderAddAnswerButton']();
- </script>
- {% if settings.WIKI_ON %}
- {{ macros.checkbox_in_div(answer.wiki) }}
- {% endif %}
- {% if settings.GROUPS_ENABLED and
- request.user.is_authenticated() and
- request.user.can_make_group_private_posts()
- %}
- {{ macros.checkbox_in_div(answer.post_privately) }}
- {% endif %}
+ <div class="folded-editor" tabindex="6">
+ <p class="prompt"><a>{% trans %}Add answer{% endtrans %}</a></p>
+ <div class="editor-proper">
+ {{ macros.edit_post(
+ answer,
+ user = request.user,
+ editor_type = settings.EDITOR_TYPE
+ )
+ }}
+ <input id="add-answer-btn" type="submit" class="submit after-editor" style="float:left"/>
+ <script type="text/javascript">
+ askbot['functions']['renderAddAnswerButton']();
+ </script>
+ {% if settings.WIKI_ON %}
+ {{ macros.checkbox_in_div(answer.wiki) }}
+ {% endif %}
+ {% if settings.GROUPS_ENABLED and
+ request.user.is_authenticated() and
+ request.user.can_make_group_private_posts()
+ %}
+ {{ macros.checkbox_in_div(answer.post_privately) }}
+ {% endif %}
+ </div>
+ </div>
{% endif %}
{% endif %}
</form>