diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2011-07-01 20:35:13 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2011-07-01 20:35:13 -0400 |
commit | d8a3d68f6d5980d8a59c4952daf1f71f198a1bb8 (patch) | |
tree | 92f1dcb429b1cb758dd6838d6f827294265f937d | |
parent | 46c23f3a06040c52142414f260a7f5aff314c2bb (diff) | |
download | askbot-d8a3d68f6d5980d8a59c4952daf1f71f198a1bb8.tar.gz askbot-d8a3d68f6d5980d8a59c4952daf1f71f198a1bb8.tar.bz2 askbot-d8a3d68f6d5980d8a59c4952daf1f71f198a1bb8.zip |
fixed a bug in the live search where question list was not redrawn correctly
-rw-r--r-- | askbot/skins/default/media/js/live_search.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/askbot/skins/default/media/js/live_search.js b/askbot/skins/default/media/js/live_search.js index d367ceac..f9f03453 100644 --- a/askbot/skins/default/media/js/live_search.js +++ b/askbot/skins/default/media/js/live_search.js @@ -9,7 +9,6 @@ var liveSearch = function(){ var process_query = function(){}; var render_result = function(){}; - var refresh_x_button = function(){ if ($.trim(query.val()).length > 0){ if (query.attr('class') === 'searchInput'){ @@ -432,12 +431,13 @@ var liveSearch = function(){ var old_list = $('#' + q_list_sel); var new_list = $('<div></div>').hide(); if (data['questions'].length > 0){ + old_list.stop(true); + new_list.html(render_question_list(data['questions'])); //old_list.hide(); old_list.after(new_list); //old_list.remove(); //rename new div to old - new_list.attr('id', q_list_sel); render_paginator(data['paginator']); set_question_count(data['question_counter']); render_search_tags(data['query_data']['tags']); @@ -446,11 +446,12 @@ var liveSearch = function(){ render_relevance_sort_tab(); set_active_sort_tab(sortMethod); query.focus(); - + //show new div with a fadeIn effect old_list.fadeOut(200, function() { old_list.remove(); - new_list.fadeIn(400); + new_list.attr('id', q_list_sel); + new_list.fadeIn(400); }); } } |