diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2011-11-22 10:58:56 -0300 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2011-11-22 10:58:56 -0300 |
commit | 01e342e9b7032538ff7c995f578425c575691222 (patch) | |
tree | c7c52ecc481e546252cd52608b4e008be14cd22d | |
parent | 9b8e514dd87b6ff8bf1e2fd8141b9bbbb63333fb (diff) | |
parent | 14fc18e71f598bb7548848ed0cb840693ae6b9fd (diff) | |
download | askbot-01e342e9b7032538ff7c995f578425c575691222.tar.gz askbot-01e342e9b7032538ff7c995f578425c575691222.tar.bz2 askbot-01e342e9b7032538ff7c995f578425c575691222.zip |
Merge branch 'master' of github.com:ASKBOT/askbot-devel
8 files changed, 18 insertions, 15 deletions
diff --git a/askbot/skins/common/media/js/post.js b/askbot/skins/common/media/js/post.js index ad33a929..6202347e 100644 --- a/askbot/skins/common/media/js/post.js +++ b/askbot/skins/common/media/js/post.js @@ -122,6 +122,7 @@ var CPValidator = function(){ }; }, getQuestionFormMessages: function(){ + //todo: here use pluralization function instead of replace return { tags: { required: " " + gettext('tags cannot be empty'), @@ -978,6 +979,9 @@ EditCommentForm.prototype.getCounterUpdater = function(){ length2 = Math.round(0.9*maxCommentLength); } + //todo: + //1) use class instead of color - move color def to css + //2) use pluralization and interpolation instead of string replacement var color = 'maroon'; if (length === 0){ var feedback = gettext('title minchars').replace('{0}', 10); diff --git a/askbot/skins/common/templates/widgets/search_bar.html b/askbot/skins/common/templates/widgets/search_bar.html index e4d2f488..d5a7859b 100644 --- a/askbot/skins/common/templates/widgets/search_bar.html +++ b/askbot/skins/common/templates/widgets/search_bar.html @@ -25,9 +25,9 @@ class="searchInputCancelableAuth" {% elif query %} class="searchInputCancelable" - {%elif request.user.is_authenticated()%} + {% elif request.user.is_authenticated() %} class="searchInputAuth" - {%else%} + {% else %} class="searchInput" {% endif %} type="text" diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less index 53ef8237..c2d366dd 100644 --- a/askbot/skins/default/media/style/style.less +++ b/askbot/skins/default/media/style/style.less @@ -146,6 +146,12 @@ h1 { padding: 10px 0 5px 0px; } +/* ----- Extra space above for messages ----- */ + +body.user-messages { + margin-top: 2.4em; +} + /* ----- Custom positions ----- */ .left{float:left} diff --git a/askbot/skins/default/templates/base.html b/askbot/skins/default/templates/base.html index f84e031d..9e44494b 100644 --- a/askbot/skins/default/templates/base.html +++ b/askbot/skins/default/templates/base.html @@ -14,7 +14,7 @@ {% endif %} </head> {% endspaceless %} - <body class="{% block body_class %}{% endblock %}{% if page_class %} {{page_class}}{% endif %}"> + <body class="{% block body_class %}{% endblock %}{% if user_messages %} user-messages{% endif %}{% if page_class %} {{page_class}}{% endif %}"> {% include "widgets/system_messages.html" %} {% include "custom_header.html" ignore missing %} {% include "widgets/header.html" %} {# Logo, user tool navigation and meta navitation #} diff --git a/askbot/skins/default/templates/main_page/javascript.html b/askbot/skins/default/templates/main_page/javascript.html index 03fae877..e35113dd 100644 --- a/askbot/skins/default/templates/main_page/javascript.html +++ b/askbot/skins/default/templates/main_page/javascript.html @@ -34,13 +34,13 @@ askbot['urls']['unmark_tag'] = scriptUrl + '{% url unmark_tag %}'; askbot['urls']['set_tag_filter_strategy'] = '{% url "set_tag_filter_strategy" %}'; askbot['urls']['questions'] = '{% url "questions" %}'; - {%if settings.ASKBOT_TRANSLATE_URL %} + {% if settings.ASKBOT_TRANSLATE_URL %} askbot['urls']['question_url_template'] = scriptUrl + '{% trans %}question/{% endtrans %}{{ "{{QuestionID}}/" }}'; askbot['urls']['user_url_template'] = scriptUrl + '{% trans %}users/{% endtrans %}{{ "{{user_id}}" }}/{{ "{{slug}}" }}/'; - {%else%} + {% else %} askbot['urls']['question_url_template'] = scriptUrl + 'question/{{ "{{QuestionID}}/" }}'; askbot['urls']['user_url_template'] = scriptUrl + 'users/{{ "{{user_id}}" }}/{{ "{{slug}}" }}/'; - {%endif%} + {% endif %} askbot['messages']['name_of_anonymous_user'] = '{{ name_of_anonymous_user }}'; </script> <script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> diff --git a/askbot/skins/default/templates/meta/bottom_scripts.html b/askbot/skins/default/templates/meta/bottom_scripts.html index 0693a3e4..0df25e7c 100644 --- a/askbot/skins/default/templates/meta/bottom_scripts.html +++ b/askbot/skins/default/templates/meta/bottom_scripts.html @@ -37,10 +37,8 @@ src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" {% endif %} ></script> -<script type='text/javascript' src="{{"/js/i18n.js"|media }}"></script> -<script type='text/javascript' src="{{"/js/jquery.i18n.js"|media }}"></script> <script type='text/javascript' src="{{"/js/utils.js"|media }}"></script> -<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300,400,700' rel='stylesheet' type='text/css'> +<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script> {% if settings.ENABLE_MATHJAX %} <script type='text/javascript' src="{{settings.MATHJAX_BASE_URL}}/MathJax.js"> MathJax.Hub.Config({ diff --git a/askbot/skins/default/templates/meta/html_head_javascript.html b/askbot/skins/default/templates/meta/html_head_javascript.html index 900b1191..f960d11d 100644 --- a/askbot/skins/default/templates/meta/html_head_javascript.html +++ b/askbot/skins/default/templates/meta/html_head_javascript.html @@ -5,7 +5,6 @@ askbot['settings'] = {}; askbot['messages'] = {}; </script> -<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script> {% block forejs %} {% endblock %} {# avoid adding javascript here so that pages load faster #} diff --git a/askbot/skins/default/templates/meta/html_head_stylesheets.html b/askbot/skins/default/templates/meta/html_head_stylesheets.html index c3d6a4c4..4e3f173b 100644 --- a/askbot/skins/default/templates/meta/html_head_stylesheets.html +++ b/askbot/skins/default/templates/meta/html_head_stylesheets.html @@ -4,6 +4,7 @@ {%else%} <link href="{{"/style/style.css"|media }}" rel="stylesheet" type="text/css" /> {%endif%} +<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300,400,700' rel='stylesheet' type='text/css'> {{ skin.get_extra_css_link() }} {% if settings.USE_CUSTOM_CSS %} <link @@ -12,8 +13,3 @@ type="text/css" /> {% endif %} -{% if user_messages %} -<style type="text/css"> - body { margin-top:2.4em; } -</style> -{% endif %} |