summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/templates/authopenid/logout.html2
-rw-r--r--askbot/templates/authopenid/providers_javascript.html2
-rw-r--r--askbot/templates/base.html1
-rw-r--r--askbot/templates/embed/ask_by_widget.html6
-rwxr-xr-xaskbot/templates/embed/askbot_widget.js6
-rw-r--r--askbot/templates/embed/list_widgets.html21
-rw-r--r--askbot/templates/main_page/javascript.html2
-rw-r--r--askbot/templates/meta/fonts.html23
-rw-r--r--askbot/templates/meta/html_head_stylesheets.html7
-rw-r--r--askbot/templates/question/javascript.html2
-rw-r--r--askbot/templates/widgets/markdown_help.html2
11 files changed, 39 insertions, 35 deletions
diff --git a/askbot/templates/authopenid/logout.html b/askbot/templates/authopenid/logout.html
index 1ac6705c..e3e1363f 100644
--- a/askbot/templates/authopenid/logout.html
+++ b/askbot/templates/authopenid/logout.html
@@ -7,7 +7,7 @@
<p>{% trans %}However, you still may be logged in to your OpenID provider. Please logout of your provider if you wish to do so.{% endtrans %}</p>
{% if settings.FACEBOOK_KEY and settings.FACEBOOK_SECRET %}
<div id="fb-root"></div>
- <script src="http://connect.facebook.net/en_US/all.js"></script>
+ <script src="//connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: '{{settings.FACEBOOK_KEY}}', status: true, cookie: true, xfbml: true});
</script>
diff --git a/askbot/templates/authopenid/providers_javascript.html b/askbot/templates/authopenid/providers_javascript.html
index cd9f56b6..b0ee0ae2 100644
--- a/askbot/templates/authopenid/providers_javascript.html
+++ b/askbot/templates/authopenid/providers_javascript.html
@@ -39,7 +39,7 @@
</script>
{% if settings.FACEBOOK_KEY and settings.FACEBOOK_SECRET %}
<div id="fb-root"></div>
-<script src="http://connect.facebook.net/en_US/all.js"></script>
+<script src="//connect.facebook.net/en_US/all.js"></script>
<script>
$(document).ready(function(){
if (typeof FB != 'undefined'){
diff --git a/askbot/templates/base.html b/askbot/templates/base.html
index a5607fc4..4646a3a0 100644
--- a/askbot/templates/base.html
+++ b/askbot/templates/base.html
@@ -14,6 +14,7 @@
<link rel="shortcut icon" href="{{ settings.SITE_FAVICON|media }}" />
{% block before_css %}{% endblock %}
{% include "meta/html_head_stylesheets.html" %}
+ {% include "meta/fonts.html" %}
{% block forestyle %}{% endblock %}
{% include "meta/html_head_javascript.html" %}
{% block forejs %}{% endblock %}
diff --git a/askbot/templates/embed/ask_by_widget.html b/askbot/templates/embed/ask_by_widget.html
index ef139d1c..dc3db806 100644
--- a/askbot/templates/embed/ask_by_widget.html
+++ b/askbot/templates/embed/ask_by_widget.html
@@ -6,11 +6,7 @@
{%else %}
<link href="{{'/bootstrap/css/bootstrap.css'|media}}" rel="stylesheet" type="text/css" />
{%endif%}
- {% if settings.USE_LOCAL_FONTS %}
- {% include "meta/fonts.html" %}
- {% else %}
- <link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:400,700&amp;subset=latin,cyrillic-ext,latin-ext' rel='stylesheet' type='text/css' />
- {% endif %}
+ {% include "meta/fonts.html" %}
<style type="text/css" media="screen">
body{
font-family: Verdana, Arial, Helvetica, sans-serif;
diff --git a/askbot/templates/embed/askbot_widget.js b/askbot/templates/embed/askbot_widget.js
index 8c358855..300d3dd8 100755
--- a/askbot/templates/embed/askbot_widget.js
+++ b/askbot/templates/embed/askbot_widget.js
@@ -10,8 +10,10 @@ var {{variable_name}} = {
toHtml: function() {
var html = {{variable_name}}.createButton();
var link = document.createElement('link');
+ var protocol = document.location.protocol;
+
link.setAttribute("rel", "stylesheet");
- link.setAttribute("href", 'http://{{host}}{%url render_ask_widget_css widget.id%}');
+ link.setAttribute("href", protocol + '//{{host}}{%url render_ask_widget_css widget.id%}');
//creating the div
var motherDiv = document.createElement('div');
@@ -36,7 +38,7 @@ var {{variable_name}} = {
containerDiv.appendChild(closeButton);
var iframe = document.createElement('iframe');
- iframe.setAttribute('src', 'http://{{host}}{% url ask_by_widget widget.id %}');
+ iframe.setAttribute('src', protocol + '//{{host}}{% url ask_by_widget widget.id %}');
containerDiv.appendChild(iframe);
diff --git a/askbot/templates/embed/list_widgets.html b/askbot/templates/embed/list_widgets.html
index 83de5871..cdbcd219 100644
--- a/askbot/templates/embed/list_widgets.html
+++ b/askbot/templates/embed/list_widgets.html
@@ -10,19 +10,24 @@
<th>Code</th>
<th>Actions</th>
</tr>
+ {% if request.is_secure() %}
+ {% set protocol='https' %}
+ {% else %}
+ {% set protocol='http' %}
+ {% endif %}
{% if widget_name == 'ask' %}
- {%for widget in widgets%}
- <tr>
- <td>{{widget.title}}</td>
- <td> &lt;script type="text/javascript" src="http://{{request.get_host()}}{% url render_ask_widget widget.id%}" &gt;&lt;/script&gt;</td>
- <td><a href="{% url edit_widget widget_name, widget.id %}">Edit</a> | <a href="{% url delete_widget widget_name, widget.id %}">Delete</a></td>
- </tr>
- {%endfor%}
+ {%for widget in widgets%}
+ <tr>
+ <td>{{widget.title}}</td>
+ <td> &lt;script type="text/javascript" src="{{ protocol }}://{{request.get_host()}}{% url render_ask_widget widget.id%}" &gt;&lt;/script&gt;</td>
+ <td><a href="{% url edit_widget widget_name, widget.id %}">Edit</a> | <a href="{% url delete_widget widget_name, widget.id %}">Delete</a></td>
+ </tr>
+ {%endfor%}
{%else%}
{%for widget in widgets%}
<tr>
<td>{{widget.title}}</td>
- <td> &lt;iframe src="http://{{request.get_host()}}{% url question_widget widget.id%}" &gt; &lt;/iframe&gt;</td>
+ <td> &lt;iframe src="{{ protocol }}://{{request.get_host()}}{% url question_widget widget.id%}" &gt; &lt;/iframe&gt;</td>
<td><a href="{% url edit_widget widget_name, widget.id %}">Edit</a> | <a href="{% url delete_widget widget_name, widget.id %}">Delete</a></td>
</tr>
{%endfor%}
diff --git a/askbot/templates/main_page/javascript.html b/askbot/templates/main_page/javascript.html
index 0329d6b6..7ad02e29 100644
--- a/askbot/templates/main_page/javascript.html
+++ b/askbot/templates/main_page/javascript.html
@@ -35,7 +35,7 @@
}
if (hash !== '' && hash !== undefined && url !== undefined){
{# was this causing strange redirects in IE??? #}
- window.location = 'http://' + window.location.host + url;
+ window.location = document.location.protocol + '//' + window.location.host + url;
}
}
/*]]>*/
diff --git a/askbot/templates/meta/fonts.html b/askbot/templates/meta/fonts.html
index e8e54a8f..1e0fe707 100644
--- a/askbot/templates/meta/fonts.html
+++ b/askbot/templates/meta/fonts.html
@@ -1,8 +1,15 @@
-<style type="text/css">
-@font-face {
- font-family: 'Open Sans Condensed';
- font-style: normal;
- font-weight: 700;
- src: url('{{"/images/OpenSans-CondBold.ttf"|media}}');
-}
-</style>
+{% if settings.USE_LOCAL_FONTS %}
+ {# this version is for serving fonts locally - e.g. for intranet sites #}
+ <style type="text/css">
+ @font-face {
+ font-family: 'Open Sans Condensed';
+ font-style: normal;
+ font-weight: 700;
+ src: url('{{"/images/OpenSans-CondBold.ttf"|media}}');
+ }
+ </style>
+{% else %}
+ {# note: for IE8 we ask for fonts separately #}
+ <link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=latin-ext' rel='stylesheet' type='text/css'>
+ <link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=cyrillic-ext' rel='stylesheet' type='text/css'>
+{% endif %}
diff --git a/askbot/templates/meta/html_head_stylesheets.html b/askbot/templates/meta/html_head_stylesheets.html
index 85bb489c..23750239 100644
--- a/askbot/templates/meta/html_head_stylesheets.html
+++ b/askbot/templates/meta/html_head_stylesheets.html
@@ -9,13 +9,6 @@
<script type="text/javascript" src="{{"/js/less.min.js"|media}}"></script>
{% endif %}
<link href="{{'/bootstrap/css/bootstrap.css'|media}}" rel="stylesheet" type="text/css" />
-{% if settings.USE_LOCAL_FONTS %}
- {% include "meta/fonts.html" %}
-{% else %}
- {# note: IE8 fix - a combined font link wont work so we have two #}
- <link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=latin-ext' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=cyrillic-ext' rel='stylesheet' type='text/css'>
-{% endif %}
{{ skin.get_extra_css_link() }}
{% if settings.USE_CUSTOM_CSS %}
<link
diff --git a/askbot/templates/question/javascript.html b/askbot/templates/question/javascript.html
index 5dca2522..5871ee5f 100644
--- a/askbot/templates/question/javascript.html
+++ b/askbot/templates/question/javascript.html
@@ -55,7 +55,7 @@
if (window.location.hash === 'fmanswer'){
$('#fmanswer textarea').focus();
}
- {% if settings.ENABLE_SHARING_GOOGLE %}$.getScript("http://apis.google.com/js/plusone.js"){% endif %}
+ {% if settings.ENABLE_SHARING_GOOGLE %}$.getScript("//apis.google.com/js/plusone.js"){% endif %}
{% if request.user.id == question.author_id %}
$("#fmanswer_button").click(function() {
diff --git a/askbot/templates/widgets/markdown_help.html b/askbot/templates/widgets/markdown_help.html
index 9816fe26..cea8847b 100644
--- a/askbot/templates/widgets/markdown_help.html
+++ b/askbot/templates/widgets/markdown_help.html
@@ -17,7 +17,7 @@
</li>
{% endif %}
<li>
- <b>{% trans %}link{% endtrans %}</b>:[{% trans %}text{% endtrans %}](http://url.com/ "{% trans %}title{% endtrans %}")
+ <b>{% trans %}link{% endtrans %}</b>:[{% trans %}text{% endtrans %}](http://example.com/ "{% trans %}title{% endtrans %}")
</li>
<li>