diff options
-rw-r--r-- | askbot/media/style/style.css | 42 | ||||
-rw-r--r-- | askbot/media/style/style.less | 20 | ||||
-rw-r--r-- | askbot/search/haystack/__init__.py | 8 |
3 files changed, 64 insertions, 6 deletions
diff --git a/askbot/media/style/style.css b/askbot/media/style/style.css index 5854b850..0a60c6a1 100644 --- a/askbot/media/style/style.css +++ b/askbot/media/style/style.css @@ -4607,8 +4607,46 @@ body.anon.lang-es #searchBar { } body.lang-zh .box .inputs #interestingTagInput, +body.lang-zh_CN .box .inputs #interestingTagInput, +body.lang-zh_TW .box .inputs #interestingTagInput, body.lang-zh .box .inputs #ignoredTagInput, +body.lang-zh_CN .box .inputs #ignoredTagInput, +body.lang-zh_TW .box .inputs #ignoredTagInput, body.lang-zh .box .inputs #subscribedTagInput, -body.lang-zh .box .inputs #ab-tag-search { - width: 125px; +body.lang-zh_CN .box .inputs #subscribedTagInput, +body.lang-zh_TW .box .inputs #subscribedTagInput, +body.lang-zh .box .inputs #ab-tag-search, +body.lang-zh_CN .box .inputs #ab-tag-search, +body.lang-zh_TW .box .inputs #ab-tag-search { + width: 142px; +} +body.lang-zh button, +body.lang-zh_CN button, +body.lang-zh_TW button, +body.lang-zh input[type="submit"], +body.lang-zh_CN input[type="submit"], +body.lang-zh_TW input[type="submit"], +body.lang-zh input[type="button"], +body.lang-zh_CN input[type="button"], +body.lang-zh_TW input[type="button"], +body.lang-zh input[type="reset"], +body.lang-zh_CN input[type="reset"], +body.lang-zh_TW input[type="reset"], +body.lang-zh .button, +body.lang-zh_CN .button, +body.lang-zh_TW .button { + line-height: 24px; +} +body.lang-zh .box a.followed, +body.lang-zh_CN .box a.followed, +body.lang-zh_TW .box a.followed, +body.lang-zh .box a.follow, +body.lang-zh_CN .box a.follow, +body.lang-zh_TW .box a.follow { + line-height: 34px !important; +} +body.lang-zh.question-page a.submit, +body.lang-zh_CN.question-page a.submit, +body.lang-zh_TW.question-page a.submit { + line-height: 30px !important; } diff --git a/askbot/media/style/style.less b/askbot/media/style/style.less index ccc2cbbf..94125b47 100644 --- a/askbot/media/style/style.less +++ b/askbot/media/style/style.less @@ -4811,13 +4811,29 @@ body.anon.lang-es { } } -body.lang-zh { +body.lang-zh, +body.lang-zh_CN, +body.lang-zh_TW { .box .inputs { #interestingTagInput, #ignoredTagInput, #subscribedTagInput, #ab-tag-search { - width: 125px; + width: 142px; } } + button, + input[type="submit"], + input[type="button"], + input[type="reset"], + .button { + line-height: 24px; + } + .box a.followed, + .box a.follow { + line-height: 34px !important; + } + &.question-page a.submit { + line-height: 30px !important; + } } diff --git a/askbot/search/haystack/__init__.py b/askbot/search/haystack/__init__.py index 9b99ef28..481f2d72 100644 --- a/askbot/search/haystack/__init__.py +++ b/askbot/search/haystack/__init__.py @@ -34,17 +34,21 @@ class PostIndex(indexes.SearchIndex, indexes.Indexable): author = indexes.CharField() thread_id = indexes.IntegerField(model_attr='thread__pk') + def get_model(self): from askbot.models import Post return Post def index_queryset(self, using=None): + ALLOWED_TYPES = ('question', 'answer', 'comment') if getattr(settings, 'ASKBOT_MULTILINGUAL', True): lang_code = get_language()[:2] return self.get_model().objects.filter(language_code__startswith=lang_code, - deleted=False) + deleted=False, + post_type__in=ALLOWED_TYPES) else: - return self.get_model().objects.filter(deleted=False) + return self.get_model().objects.filter(deleted=False, + post_type__in=ALLOWED_TYPES) class UserIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) |