summaryrefslogtreecommitdiffstats
path: root/askbot/skins
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-08-29 12:09:23 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-08-29 12:09:23 -0400
commit610e7e34b8d9d01d7f6c0ffa02e2b20e5378e587 (patch)
tree7df313b21e7b74a44fc39d20fac1a338927d569e /askbot/skins
parent0fc3d2fb075195290e6b363e1e0b2fac8dd26a00 (diff)
downloadaskbot-610e7e34b8d9d01d7f6c0ffa02e2b20e5378e587.tar.gz
askbot-610e7e34b8d9d01d7f6c0ffa02e2b20e5378e587.tar.bz2
askbot-610e7e34b8d9d01d7f6c0ffa02e2b20e5378e587.zip
attempt to fix posting comments in IE
Diffstat (limited to 'askbot/skins')
-rw-r--r--askbot/skins/default/templates/main_page/javascript.html21
-rw-r--r--askbot/skins/default/templates/meta/bottom_scripts.html20
2 files changed, 21 insertions, 20 deletions
diff --git a/askbot/skins/default/templates/main_page/javascript.html b/askbot/skins/default/templates/main_page/javascript.html
index 10f8ede2..f1e0fb44 100644
--- a/askbot/skins/default/templates/main_page/javascript.html
+++ b/askbot/skins/default/templates/main_page/javascript.html
@@ -1,4 +1,5 @@
<script type="text/javascript">
+ /*<![CDATA[*/
var sortMethod = '{{sort}}';
var showSortByRelevance = {% if show_sort_by_relevance %}true{% else %}false{% endif %};
var minSearchWordLength = {{settings.MIN_SEARCH_WORD_LENGTH}};
@@ -22,6 +23,26 @@
askbot['urls']['set_tag_filter_strategy'] = '{% url "set_tag_filter_strategy" %}';
askbot['urls']['questions'] = '{% url "questions" %}';
askbot['urls']['question_url_template'] = scriptUrl + '{{'question/'|transurl}}{{ "{{QuestionID}}/" }}';
+
+ if (Modernizr.history) {
+ // history management works!
+ } else {
+ // no history support :(
+ //hash = unescape(window.location.hash).replace('#','').split("?")[0]
+ {# todo: fix this evil code!!! #}
+ var hash = History.unescapeHash(window.location.hash).replace('#','').split("?")[0];
+ var questions_url = askbot['urls']['questions'];
+ if (hash.substring(0, questions_url.length) === questions_url) {
+ var url = hash;
+ } else {
+ var url = questions_url + hash;
+ }
+ if (hash !== '' && hash !== undefined && url !== undefined){
+ {# was this causing strange redirects in IE??? #}
+ window.location = 'http://' + window.location.host + url;
+ }
+ }
+ /*]]>*/
</script>
<script type='text/javascript' src='{{"/js/editor.js"|media}}'></script>
{% if request.user.is_authenticated() %}
diff --git a/askbot/skins/default/templates/meta/bottom_scripts.html b/askbot/skins/default/templates/meta/bottom_scripts.html
index 989b1bd4..76bef90b 100644
--- a/askbot/skins/default/templates/meta/bottom_scripts.html
+++ b/askbot/skins/default/templates/meta/bottom_scripts.html
@@ -50,26 +50,6 @@
<script type="text/javascript">
/*<![CDATA[*/
$(document).ready(function(){
- {% if active_tab == 'questions' %}
- if (Modernizr.history) {
- // history management works!
- } else {
- // no history support :(
- //hash = unescape(window.location.hash).replace('#','').split("?")[0]
- {# todo: fix this evil code!!! #}
- var hash = History.unescapeHash(window.location.hash).replace('#','').split("?")[0];
- var questions_url = askbot['urls']['questions'];
- if (hash.substring(0, questions_url.length) === questions_url) {
- var url = hash;
- } else {
- var url = questions_url + hash;
- }
- if (hash !== '' && hash !== undefined && url !== undefined){
- {# was this causing strange redirects in IE??? #}
- window.location = 'http://' + window.location.host + url;
- }
- }
- {% endif %}
// focus input on the search bar endcomment
{% if active_tab in ('users', 'questions', 'tags') %}
$('#keywords').focus();