[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/17: Add variable to force the reload of CS
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 02/17: Add variable to force the reload of CSS and javascript when version changes |
Date: |
Wed, 12 Aug 2015 13:23:39 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit eb69cc39e65d4ba2f9bae529bb6e94cbee0076e0
Author: Dany De Bontridder <address@hidden>
Date: Sun Aug 9 06:17:50 2015 +0200
Add variable to force the reload of CSS and javascript when version changes
---
include/ac_common.php | 6 +++---
include/function_javascript.php | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/ac_common.php b/include/ac_common.php
index 6a9fdaa..5a120d0 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -301,7 +301,7 @@ function html_page_start($p_theme="", $p_script="",
$p_script2="")
echo "<HTML>";
if ($p_script2 != "")
- $p_script2 = '<script src="' . $p_script2 . '"
type="text/javascript"></script>';
+ $p_script2 = '<script src="' . $p_script2 . '?version='.SVNINFO.'"
type="text/javascript"></script>';
$style=trim($style);
$DIR=dirname(__FILE__);
echo "<HEAD>";
@@ -310,8 +310,8 @@ function html_page_start($p_theme="", $p_script="",
$p_script2="")
<TITLE>$title</TITLE>
<link rel=\"icon\" type=\"image/ico\" href=\"favicon.ico\" />
<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
- <LINK REL=\"stylesheet\" type=\"text/css\" href=\"./$style\"
media=\"screen\"/>
- <link rel=\"stylesheet\" type=\"text/css\" href=\"style-print.css\"
media=\"print\"/>" .
+ <LINK REL=\"stylesheet\" type=\"text/css\"
href=\"./$style?version=".SVNINFO."\" media=\"screen\"/>
+ <link rel=\"stylesheet\" type=\"text/css\"
href=\"style-print.css?version=".SVNINFO."\" media=\"print\"/>" .
$p_script2 . "
";
echo '<script language="javascript" src="js/calendar.js"></script>
diff --git a/include/function_javascript.php b/include/function_javascript.php
index 9997f7b..684702d 100644
--- a/include/function_javascript.php
+++ b/include/function_javascript.php
@@ -24,7 +24,7 @@ function js_include($p_string)
if ( ! file_exists('js/'.$p_string))
alert("Erreur js/$p_string n existe pas");
- $script='<script type="text/javascript" charset="utf-8"
language="javascript" src="js/'.$p_string.'"></script>';
+ $script='<script type="text/javascript" charset="utf-8"
language="javascript" src="js/'.$p_string.'?version='.SVNINFO.'"></script>';
// debug
return $script;
- [Noalyss-commit] [noalyss] branch master updated (0ee7d7a -> 1ddde7c), Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 03/17: Cosmetic, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 04/17: Cosmetic ; change appearance login screen, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 06/17: Move DEBUG and LOGINPUT to config.inc.php, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 02/17: Add variable to force the reload of CSS and javascript when version changes,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 09/17: Use a variable for an absolute path for performance reason NOALYSS_INCLUDE NOALYSS_HOME NOALYSS_PLUGIN, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 10/17: Use a variable for an absolute path for performance reason NOALYSS_INCLUDE NOALYSS_HOME NOALYSS_PLUGIN, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 12/17: show cross to remove a tag, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 13/17: Admin can modify any document + repository, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 07/17: Move DEBUG and LOGINPUT to config.inc.php, by default error are shown, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 14/17: Code cleaning : remove code for "Plugin only" users, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 01/17: Add variable to own, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 05/17: translation, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 16/17: highlight, Dany De Bontridder, 2015/08/12
- [Noalyss-commit] [noalyss] 11/17: show cross to remove a tag, Dany De Bontridder, 2015/08/12