summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zielinski <tomasz.zielinski@pyconsultant.eu>2012-01-15 14:54:09 +0100
committerTomasz Zielinski <tomasz.zielinski@pyconsultant.eu>2012-01-15 14:54:09 +0100
commit27656d9c294915182bf07b6591be90e2eefefe0c (patch)
tree63a4367f827647103957593dcf253d79bff9a2fd
parent6b3f4f81d3617bbb3e4f77d7e6252e659037083e (diff)
downloadaskbot-27656d9c294915182bf07b6591be90e2eefefe0c.tar.gz
askbot-27656d9c294915182bf07b6591be90e2eefefe0c.tar.bz2
askbot-27656d9c294915182bf07b6591be90e2eefefe0c.zip
Minor edit in bottom_scripts.html, mostly re unescaping History.js URL hash
-rw-r--r--askbot/skins/default/templates/meta/bottom_scripts.html18
1 files changed, 5 insertions, 13 deletions
diff --git a/askbot/skins/default/templates/meta/bottom_scripts.html b/askbot/skins/default/templates/meta/bottom_scripts.html
index be9b69e1..24a79478 100644
--- a/askbot/skins/default/templates/meta/bottom_scripts.html
+++ b/askbot/skins/default/templates/meta/bottom_scripts.html
@@ -38,7 +38,7 @@
{% endif %}
></script>
<!-- History.js -->
-<script defer src="{{"/js/jquery.history.js"|media }}"></script>
+<script type='text/javascript' src="{{"/js/jquery.history.js"|media }}"></script>
<script type='text/javascript' src="{{"/js/utils.js"|media }}"></script>
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
{% if settings.ENABLE_MATHJAX %}
@@ -52,13 +52,13 @@
{% endif %}
<script type="text/javascript">
{% if active_tab != "tags" and active_tab != "users" %}
-{# start asking question with title from search query #}
$(document).ready(function(){
if (Modernizr.history) {
// history management works!
} else {
// no history support :(
- hash = unescape(window.location.hash).replace('#','').split("?")[0]
+ //hash = unescape(window.location.hash).replace('#','').split("?")[0]
+ hash = History.unescapeHash(window.location.hash).replace('#','').split("?")[0]
if (hash.substring(0,11)==askbot['urls']['questions']){
url = hash
}else{
@@ -68,16 +68,8 @@
window.location = 'http://'+window.location.host+url
}
}
-
- $('#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 #}
+
+ // focus input on the search bar endcomment
{% if active_tab != "ask" %}
$('#keywords').focus();
{% else %}