summaryrefslogtreecommitdiffstats
path: root/askbot/skins/default/templates/base.html
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/skins/default/templates/base.html')
-rw-r--r--askbot/skins/default/templates/base.html58
1 files changed, 26 insertions, 32 deletions
diff --git a/askbot/skins/default/templates/base.html b/askbot/skins/default/templates/base.html
index f6d7d5a3..228d76cc 100644
--- a/askbot/skins/default/templates/base.html
+++ b/askbot/skins/default/templates/base.html
@@ -20,7 +20,6 @@
{% endif %}
<link rel="shortcut icon" href="{{ "/images/favicon.gif"|media }}" />
<link href="{{"/style/style.css"|media }}" rel="stylesheet" type="text/css" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var i18nLang = '{{settings.LANGUAGE_CODE}}';
var scriptUrl = '/{{settings.ASKBOT_URL}}'
@@ -31,6 +30,7 @@
var enableMathJax = false;
{% endif %}
</script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" type="text/javascript"></script>
<script type='text/javascript' src='{{"/js/com.cnprog.i18n.js"|media }}'></script>
<script type='text/javascript' src='{{"/js/jquery.i18n.js"|media }}'></script>
<script type='text/javascript' src='{{"/js/com.cnprog.utils.js"|media }}'></script>
@@ -47,37 +47,6 @@
<style type="text/css">
body { margin-top:2.4em; }
</style>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#validate_email_alert').click(function(){notify.close(true)})
- notify.show();
- });
- </script>
- {% endif %}
- {% if active_tab != "tags" and active_tab != "users" %}
- {# start asking question with title from search query #}
- <script type="text/javascript">
- $(document).ready(function(){
- $('#nav_ask').click(
- function(){
- var starting_title = $('#keywords').attr('value');
- var new_url = $(this).attr('href') + '?title=' + encodeURIComponent(starting_title);
- window.location.href = new_url;
- return false;
- }
- );
- });
- </script>
- {# focus input on the search bar endcomment #}
- <script type="text/javascript">
- $(document).ready(function() {
- {% if active_tab != "ask" %}
- $('#keywords').focus();
- {% else %}
- $('#id_title').focus();
- {% endif %}
- });
- </script>
{% endif %}
{% block forejs %}
{% endblock %}
@@ -118,6 +87,31 @@
{% include "footer.html" %}
{% block endjs %}
{% endblock %}
+ <script type="text/javascript">
+ {% if active_tab != "tags" and active_tab != "users" %}
+ {# start asking question with title from search query #}
+ $(document).ready(function(){
+ $('#nav_ask').click(
+ function(){
+ var starting_title = $('#keywords').attr('value');
+ var new_url = $(this).attr('href') + '?title=' + encodeURIComponent(starting_title);
+ window.location.href = new_url;
+ return false;
+ }
+ );
+ //{# focus input on the search bar endcomment #}
+ {% if active_tab != "ask" %}
+ $('#keywords').focus();
+ {% else %}
+ $('#id_title').focus();
+ {% endif %}
+ });
+ {% endif %}
+ {% if user_messages %}
+ $('#validate_email_alert').click(function(){notify.close(true)})
+ notify.show();
+ {% endif %}
+ </script>
</body>
</html>
<!-- end template base.html -->