diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-23 04:50:35 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-23 04:50:35 -0400 |
commit | eb66f4abedb11e8a1db5cedf680ae3b7a0ae45a9 (patch) | |
tree | 1c0348b21eb8c1857addedc23dcacef2b3fb11f6 | |
parent | 3069578e30a20ae96bd260a0ff97555533bd9b08 (diff) | |
download | askbot-eb66f4abedb11e8a1db5cedf680ae3b7a0ae45a9.tar.gz askbot-eb66f4abedb11e8a1db5cedf680ae3b7a0ae45a9.tar.bz2 askbot-eb66f4abedb11e8a1db5cedf680ae3b7a0ae45a9.zip |
fixed the display of search tags when the tag search box is used
-rw-r--r-- | askbot/skins/common/media/js/tag_selector.js | 6 | ||||
-rw-r--r-- | askbot/skins/default/templates/main_page/headline.html | 24 | ||||
-rw-r--r-- | askbot/views/commands.py | 3 |
3 files changed, 18 insertions, 15 deletions
diff --git a/askbot/skins/common/media/js/tag_selector.js b/askbot/skins/common/media/js/tag_selector.js index d5482992..25ff7e23 100644 --- a/askbot/skins/common/media/js/tag_selector.js +++ b/askbot/skins/common/media/js/tag_selector.js @@ -120,10 +120,14 @@ function pickedTags(){ url = askbot['urls']['unmark_tag']; } + var data = JSON.stringify({ + tagnames: tagnames, + reason: reason + }); var call_settings = { type:'POST', url:url, - data: JSON.stringify({tagnames: tagnames}), + data: data, dataType: 'json' }; if (callback !== false){ diff --git a/askbot/skins/default/templates/main_page/headline.html b/askbot/skins/default/templates/main_page/headline.html index cc6f47a5..11f638e1 100644 --- a/askbot/skins/default/templates/main_page/headline.html +++ b/askbot/skins/default/templates/main_page/headline.html @@ -7,19 +7,17 @@ {% endif %} </h1> <div class="clearfix"></div> - {% if search_tags %} - <div id="listSearchTags"> - <span class="left">{% trans %}Tagged{% endtrans %}</span> - {{ macros.tag_list_widget( - search_tags, - id = 'searchTags', - deletable = True, - make_links = False, - search_state = search_state - ) - }} - </div> - {% endif %} + <div id="listSearchTags" {% if not search_tags %}style="display: none;"{% endif %}> + <span class="left">{% trans %}Tagged{% endtrans %}</span> + {{ macros.tag_list_widget( + search_tags, + id = 'searchTags', + deletable = True, + make_links = False, + search_state = search_state + ) + }} + </div> {#% if author_name or search_tags or query %} <p class="search-tips"><b>{% trans %}Search tips:{% endtrans %}</b> {% if reset_method_count > 1 %} diff --git a/askbot/views/commands.py b/askbot/views/commands.py index 6fd493cc..6c06e77c 100644 --- a/askbot/views/commands.py +++ b/askbot/views/commands.py @@ -424,7 +424,8 @@ def mark_tag(request, **kwargs):#tagging system action = kwargs['action'] post_data = simplejson.loads(request.raw_post_data) raw_tagnames = post_data['tagnames'] - reason = kwargs.get('reason', None) + reason = post_data['reason'] + assert reason in ('good', 'bad', 'subscribed') #separate plain tag names and wildcard tags tagnames, wildcards = forms.clean_marked_tagnames(raw_tagnames) |