diff options
| author | Marcin Łabanowski <marcin@6irc.net> | 2012-12-24 16:01:57 -0800 |
|---|---|---|
| committer | Marcin Łabanowski <marcin@6irc.net> | 2012-12-24 16:01:57 -0800 |
| commit | b1125a9b56b71820b9c555618bd376413adffc5e (patch) | |
| tree | e044ea0bd9713d8c9e10d1694460c32a5445c2b4 | |
| parent | 449aa296d85a5d7d21eb59b430ebb4e1f9bb82fb (diff) | |
| parent | 146859f94a5d3112f5c88b3e4221324cf74be4c4 (diff) | |
Merge pull request #4 from asiekierka/master
Config root in JS
| -rw-r--r-- | js/attention-bar.js | 2 | ||||
| -rw-r--r-- | js/imgcaptcha.js | 10 | ||||
| -rw-r--r-- | templates/generic_page.html | 1 | ||||
| -rw-r--r-- | templates/index.html | 1 | ||||
| -rw-r--r-- | templates/page.html | 1 | ||||
| -rw-r--r-- | templates/thread.html | 1 |
6 files changed, 8 insertions, 8 deletions
diff --git a/js/attention-bar.js b/js/attention-bar.js index e0af8b02..a84cadff 100644 --- a/js/attention-bar.js +++ b/js/attention-bar.js @@ -1,7 +1,7 @@ $(document).ready(function(){ $("#attention_bar").click(function(eO){ $("#attention_bar").css("display","none"); $("#attention_bar_form").css("display","block"); }); - $.get("/attentionbar.txt", function(data) { + $.get(configRoot + "attentionbar.txt", function(data) { $("#attention_bar").text(data); $("#attention_bar_input").val(data); }); diff --git a/js/imgcaptcha.js b/js/imgcaptcha.js index 8d3ed95c..99aad414 100644 --- a/js/imgcaptcha.js +++ b/js/imgcaptcha.js @@ -1,15 +1,11 @@ -//function obecnyCzas() { -// return Math.round(new Date().getTime() / 1000); -//} - function ic_odswiezKapcze() { - $.get("/imgcaptcha_p.php", function(data) { + $.get(configRoot + "imgcaptcha_p.php", function(data) { $("#imgcaptcha_hash").val(data); - $("#imgcaptcha_img").prop("src","/imgcaptcha_im.php?cr=" + data); + $("#imgcaptcha_img").prop("src",configRoot + "imgcaptcha_im.php?cr=" + data); }); } //function resetujKapcze() { -// $("#imgcaptcha_img").prop("src","/zakrytek.png"); +// $("#imgcaptcha_img").prop("src",configRoot + "zakrytek.png"); //} //$(document).ready(function(){ // //resetujKapcze(); - to nie powinno byc na razie potrzebne diff --git a/templates/generic_page.html b/templates/generic_page.html index 9099c79c..c50fb5dd 100644 --- a/templates/generic_page.html +++ b/templates/generic_page.html @@ -9,6 +9,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes"> {% if config.meta_keywords %}<meta name="keywords" content="{{ config.meta_keywords }}">{% endif %} {% if config.default_stylesheet.1 != '' %}<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}">{% endif %} + <script type="text/javascript">var configRoot="{{ config.root }}";</script> {% if not nojavascript %} <script type="text/javascript" src="{{ config.url_javascript }}"></script> {% if not config.additional_javascript_compile %} diff --git a/templates/index.html b/templates/index.html index 76c35d95..d7910416 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,6 +8,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
{% if config.meta_keywords %}<meta name="keywords" content="{{ config.meta_keywords }}">{% endif %}
{% if config.default_stylesheet.1 != '' %}<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}">{% endif %}
+ <script type="text/javascript">var configRoot="{{ config.root }}";</script>
{% if not nojavascript %}
<script type="text/javascript" src="{{ config.url_javascript }}"></script>
{% if not config.additional_javascript_compile %}
diff --git a/templates/page.html b/templates/page.html index 0f59e6b1..8fbc49cd 100644 --- a/templates/page.html +++ b/templates/page.html @@ -7,6 +7,7 @@ <title>{{ title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
{% if config.default_stylesheet.1 != '' %}<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}">{% endif %}
+ <script type="text/javascript">var configRoot="{{ config.root }}";</script>
{% if not nojavascript %}<script type="text/javascript" src="{{ config.url_javascript }}"></script>{% endif %}
</head>
<body>
diff --git a/templates/thread.html b/templates/thread.html index 60d3c82e..4c359861 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -8,6 +8,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
{% if config.meta_keywords %}<meta name="keywords" content="{{ config.meta_keywords }}">{% endif %}
{% if config.default_stylesheet.1 != '' %}<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}">{% endif %}
+ <script type="text/javascript">var configRoot="{{ config.root }}";</script>
{% if not nojavascript %}
<script type="text/javascript" src="{{ config.url_javascript }}"></script>
{% if not config.additional_javascript_compile %}
|
