From 0ca7e110bad0c45f37f88354757bcea296dc03bc Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sun, 21 Apr 2013 01:28:54 -0400 Subject: improved responsive design of edit question and edit answer pages --- askbot/media/style/style.css | 16 ++++++++++++---- askbot/media/style/style.less | 28 ++++++++++++++++++++++------ askbot/templates/answer_edit.html | 13 ++++--------- askbot/templates/question_edit.html | 9 ++------- askbot/templates/widgets/edit_post.html | 5 +++-- 5 files changed, 43 insertions(+), 28 deletions(-) diff --git a/askbot/media/style/style.css b/askbot/media/style/style.css index 0f873790..fc2373db 100644 --- a/askbot/media/style/style.css +++ b/askbot/media/style/style.css @@ -1872,6 +1872,9 @@ ul#related-tags li { .edit-answer-page .retagger-buttons button { margin: 8px 10px 5px 0; } +.edit-answer-page .wmd-container { + margin-top: 13px; +} #editor { /* adjustment for editor preview */ @@ -1969,9 +1972,6 @@ ul#related-tags li { line-height: 13px; margin-bottom: 5px; } -.question-options label { - vertical-align: text-top; -} .edit-content-html { border-top: 1px dotted #D8D2A9; border-bottom: 1px dotted #D8D2A9; @@ -4087,15 +4087,20 @@ textarea.tipped-input { /* category selector */ .category-selector { border-spacing: 0; + width: 100%; } .category-selector ul.select-box { height: 150px; - width: 235px; + width: 100%; overflow: auto; border: #ccc 3px solid; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; } .category-selector td { vertical-align: top; + width: 33.333%; } .category-selector li { position: relative; @@ -4319,6 +4324,9 @@ textarea.tipped-input { .edit-question-page #fmedit #id_title { margin: 15px 0 0 0; } + .edit-answer-page .after-editor { + margin-top: 8px; + } .question-page .comment-votes { display: none; } diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less index 96b826cf..28b2ee67 100644 --- a/askbot/media/style/style.less +++ b/askbot/media/style/style.less @@ -1974,6 +1974,12 @@ ul#related-tags li { } } +.edit-answer-page { + .wmd-container { + margin-top: 13px; + } +} + #editor { /* adjustment for editor preview */ display: block; font-size: 100%; @@ -2083,10 +2089,6 @@ ul#related-tags li { color: #666; line-height: 13px; margin-bottom:5px; - - label { - vertical-align: text-top; - } } .edit-content-html { @@ -2095,7 +2097,9 @@ ul#related-tags li { margin: 5px 0 5px 0; } -.edit-question-page, #fmedit, .wmd-preview{ +.edit-question-page, +#fmedit, +.wmd-preview { color:@info-text-dark; #id_revision{ @@ -4271,14 +4275,20 @@ textarea.tipped-input { /* category selector */ .category-selector { border-spacing: 0; + width: 100%; + ul.select-box { height: 150px; - width: 235px; + width: 100%; overflow: auto; border: #ccc 3px solid; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; } td { vertical-align: top; + width: 33.333% } li { position: relative; @@ -4511,6 +4521,12 @@ textarea.tipped-input { } } + .edit-answer-page { + .after-editor { + margin-top: 8px; + } + } + .question-page { .comment-votes { display: none; diff --git a/askbot/templates/answer_edit.html b/askbot/templates/answer_edit.html index 875eec5b..042a63aa 100644 --- a/askbot/templates/answer_edit.html +++ b/askbot/templates/answer_edit.html @@ -6,19 +6,14 @@ {% endblock %} {% block content %} -

+
{% trans %}Edit answer{% endtrans %} [{% trans %}back{% endtrans %}] -

+
{% csrf_token %} -
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul() }}{% endif %} -
- {{ revision_form.revision }} -
+ {{ revision_form.revision }} + {{ macros.edit_post( form, post_html = revision.text, diff --git a/askbot/templates/question_edit.html b/askbot/templates/question_edit.html index ee979fb8..19808dae 100644 --- a/askbot/templates/question_edit.html +++ b/askbot/templates/question_edit.html @@ -8,14 +8,9 @@ {% block content %}
{% trans %}Edit question{% endtrans %} [{% trans %}back{% endtrans %}]
{% csrf_token %} - {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul() }}{% endif %} -
- {{ revision_form.revision }} -
+ {{ revision_form.revision }} +
{% endif %} -{% if 'summary' in post_form['fields'] %} +{#% if 'summary' in post_form['fields'] %} +
{{ post_form.summary.label_tag() }}
{{ post_form.summary }} @@ -61,7 +62,7 @@
{{ post_form.summary.errors }}
-{% endif %} +{% endif %#} {% if editor_type == 'markdown' %}
-- cgit v1.2.3-1-g7c22