diff options
Diffstat (limited to 'askbot/skins')
-rw-r--r-- | askbot/skins/default/media/js/live_search.js | 5 | ||||
-rw-r--r-- | askbot/skins/default/templates/macros.html | 4 | ||||
-rw-r--r-- | askbot/skins/default/templates/main_page/javascript.html | 16 |
3 files changed, 19 insertions, 6 deletions
diff --git a/askbot/skins/default/media/js/live_search.js b/askbot/skins/default/media/js/live_search.js index 1a46e338..473ab56a 100644 --- a/askbot/skins/default/media/js/live_search.js +++ b/askbot/skins/default/media/js/live_search.js @@ -97,11 +97,10 @@ var liveSearch = function(){ var render_title = function(result){ return '<h2>' + - '<a title="' + result['summary'] + '" ' + - 'href="' + + '<a href="' + askbot['urls']['question_url_template'] .replace('{{QuestionID}}', result['id']) + - '">' + + '" onmouseover="load_question_body(this,' + result['id'] + ')">' + result['title'] + '</a>' + '</h2>'; diff --git a/askbot/skins/default/templates/macros.html b/askbot/skins/default/templates/macros.html index 282553e4..b868be38 100644 --- a/askbot/skins/default/templates/macros.html +++ b/askbot/skins/default/templates/macros.html @@ -459,12 +459,12 @@ poor design of the data or methods on data objects #} {% if question.is_anonymous %} <span class="anonymous">{{ question.last_activity_by.get_anonymous_name() }}</span> {% else %} - <a href="{% url user_profile question.last_activity_by.id, question.last_activity_by.username|slugify %}">{{question.last_activity_by.username}}</a>{{ user_country_flag(question.last_activity_by) }} + <a href="{% url user_profile question.last_activity_by.id, question.last_activity_by.username|slugify %}" >{{question.last_activity_by.username}}</a>{{ user_country_flag(question.last_activity_by) }} {#{user_score_and_badge_summary(question.last_activity_by)}#} {% endif %} </div> </div> - <h2><a title="{{question.summary|escape}}" href="{{ question.get_absolute_url() }}">{{question.get_question_title()|escape}}</a></h2> + <h2><a href="{{ question.get_absolute_url() }}" onmouseover="load_question_body(this, {{question.id}})">{{question.get_question_title()|escape}}</a></h2> {{ tag_list_widget(question.get_tag_names()) }} </div> {%- endmacro -%} diff --git a/askbot/skins/default/templates/main_page/javascript.html b/askbot/skins/default/templates/main_page/javascript.html index baccefc9..deef318c 100644 --- a/askbot/skins/default/templates/main_page/javascript.html +++ b/askbot/skins/default/templates/main_page/javascript.html @@ -14,7 +14,21 @@ $.getJSON('{% url user_update_has_custom_avatar %}?t=' + today.getTime()); {% endif %} }); - $(window).bind('hashchange', animate_hashes); + + askbot['data']['questions-titles'] = {}; + function load_question_body(element, question_id){ + var key = 'question-' + question_id; + if ( askbot['data']['questions-titles'][key] == null){ + $.getJSON('{% url get_question_body %}', function(data){ + askbot['data']['questions-titles'] = data['questions-titles']; + console.debug(data); + element.title = askbot['data']['questions-titles'][key];//repeated due to async + }); + } else { + element.title = askbot['data']['questions-titles'][key]; + } + } + askbot['urls']['mark_interesting_tag'] = scriptUrl + '{% url mark_interesting_tag %}'; askbot['urls']['mark_ignored_tag'] = scriptUrl + '{% url mark_ignored_tag %}'; askbot['urls']['unmark_tag'] = scriptUrl + '{% url unmark_tag %}'; |