summaryrefslogtreecommitdiffstats
path: root/askbot/skins/old/templates/main_page/javascript.html
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/skins/old/templates/main_page/javascript.html')
-rw-r--r--askbot/skins/old/templates/main_page/javascript.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/askbot/skins/old/templates/main_page/javascript.html b/askbot/skins/old/templates/main_page/javascript.html
new file mode 100644
index 00000000..14dfe3cd
--- /dev/null
+++ b/askbot/skins/old/templates/main_page/javascript.html
@@ -0,0 +1,30 @@
+<script type="text/javascript">
+ var sortMethod = '{{sort}}';
+ var showSortByRelevance = {% if show_sort_by_relevance %}true{% else %}false{% endif %};
+ var minSearchWordLength = {{settings.MIN_SEARCH_WORD_LENGTH}};
+ $(document).ready(function(){
+ /*var on_tab = '#nav_questions';
+ $(on_tab).attr('className','on');*/
+ liveSearch().init('main_page');
+ Hilite.exact = false;
+ Hilite.elementid = "question-list";
+ Hilite.debug_referrer = location.href;
+ {% if update_avatar_data == True %}
+ var today = new Date();{#add timestamp to prevent browser caching #}
+ $.getJSON('{% url user_update_has_custom_avatar %}?t=' + today.getTime());
+ {% endif %}
+ });
+ 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 %}';
+ askbot['urls']['set_tag_filter_strategy'] = '{% url "set_tag_filter_strategy" %}';
+ askbot['urls']['questions'] = '{% url "questions" %}';
+ askbot['urls']['question_url_template'] = scriptUrl + '{% trans %}question/{% endtrans %}{{ "{{QuestionID}}/" }}';
+ askbot['urls']['user_url_template'] = scriptUrl + '{% trans %}users/{% endtrans %}{{ "{{user_id}}" }}/{{ "{{slug}}" }}/';
+ askbot['messages']['name_of_anonymous_user'] = '{{ name_of_anonymous_user }}';
+</script>
+<script type='text/javascript' src='{{"/js/editor.js"|media}}'></script>
+{% if request.user.is_authenticated() %}
+<script type='text/javascript' src='{{"/js/tag_selector.js"|media}}'></script>
+{% endif %}
+<script type="text/javascript" src="{{"/js/live_search.js"|media}}"></script>