Jeremy Newman : fix loading of include_dom() to use the web_root var
Jeremy Newman
jnewman at winehq.org
Wed Mar 18 15:34:59 CDT 2009
Module: website
Branch: master
Commit: 48dfc14828c1e1cf5f42e856911f04546de62793
URL: http://source.winehq.org/git/website.git/?a=commit;h=48dfc14828c1e1cf5f42e856911f04546de62793
Author: Jeremy Newman <jnewman at codeweavers.com>
Date: Wed Mar 18 15:34:07 2009 -0500
fix loading of include_dom() to use the web_root var
---
include/themes/winehq/content.template | 3 +++
include/themes/winehq/content_nobox.template | 3 +++
utils.js | 2 +-
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/include/themes/winehq/content.template b/include/themes/winehq/content.template
index 4fb8cad..d2a8d27 100644
--- a/include/themes/winehq/content.template
+++ b/include/themes/winehq/content.template
@@ -13,6 +13,9 @@
<meta name="language" content="English">
<meta name="revisit-after" content="1">
<link rel="stylesheet" href="{$root}/styles.css" type="text/css" media="screen">
+ <script language="JavaScript" type="text/javascript">
+ var web_root="{$root}";
+ </script>
<script language="JavaScript" src="{$root}/jquery.js" type="text/javascript"></script>
<script language="JavaScript" src="{$root}/utils.js" type="text/javascript"></script>
<link rel="icon" type="image/png" href="{$root}/images/winehq_logo_16.png">
diff --git a/include/themes/winehq/content_nobox.template b/include/themes/winehq/content_nobox.template
index ddb2a27..4099cd6 100644
--- a/include/themes/winehq/content_nobox.template
+++ b/include/themes/winehq/content_nobox.template
@@ -13,6 +13,9 @@
<meta name="language" content="English">
<meta name="revisit-after" content="1">
<link rel="stylesheet" href="{$root}/styles.css" type="text/css" media="screen">
+ <script language="JavaScript" type="text/javascript">
+ var web_root="{$root}";
+ </script>
<script language="JavaScript" src="{$root}/jquery.js" type="text/javascript"></script>
<script language="JavaScript" src="{$root}/utils.js" type="text/javascript"></script>
<link rel="icon" type="image/png" href="{$root}/images/winehq_logo_16.png">
diff --git a/utils.js b/utils.js
index 8d95972..0ad1248 100644
--- a/utils.js
+++ b/utils.js
@@ -8,7 +8,7 @@ function include_dom (script_filename) {
var js = document.createElement('script');
js.setAttribute('language', 'javascript');
js.setAttribute('type', 'text/javascript');
- js.setAttribute('src', script_filename);
+ js.setAttribute('src', web_root + "/" + script_filename);
html_doc.appendChild(js);
return false;
}
More information about the wine-cvs
mailing list