summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-12-07 21:26:38 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-12-07 21:26:38 -0300
commitc1dedb4f5edb9beeb001efc25eab956940e4ba9a (patch)
treefbd41c067719002e31c0bd012551ecccdea29657
parent9a33c31ab68f93fafa3763d3d615d0a019770f3b (diff)
downloadaskbot-c1dedb4f5edb9beeb001efc25eab956940e4ba9a.tar.gz
askbot-c1dedb4f5edb9beeb001efc25eab956940e4ba9a.tar.bz2
askbot-c1dedb4f5edb9beeb001efc25eab956940e4ba9a.zip
changed some urls to protocol-relative
-rw-r--r--askbot/templates/authopenid/logout.html2
-rw-r--r--askbot/templates/authopenid/providers_javascript.html2
-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/question/javascript.html2
-rw-r--r--askbot/templates/widgets/markdown_help.html2
8 files changed, 23 insertions, 20 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/embed/ask_by_widget.html b/askbot/templates/embed/ask_by_widget.html
index 4cec5f6d..af6da32c 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 f1e0fb44..80eb39ca 100644
--- a/askbot/templates/main_page/javascript.html
+++ b/askbot/templates/main_page/javascript.html
@@ -39,7 +39,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/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>