Add a config item to use local resources instead of CDN hosted resources.

This commit is contained in:
Sébastien Lucas 2013-04-17 13:42:23 +02:00
parent 1a501e3c6c
commit 89c353dd07
2 changed files with 12 additions and 0 deletions

View file

@ -166,4 +166,12 @@
* 0 : No * 0 : No
*/ */
$config['cops_provide_kepub'] = "0"; $config['cops_provide_kepub'] = "0";
/*
* Use local JS resources instead if external resources hosted on CDN
* 1 : Yes (enable)
* 0 : No
*/
$config['cops_use_local_resources'] = "0";
?> ?>

View file

@ -54,7 +54,11 @@
<meta http-equiv="imagetoolbar" content="no" /> <meta http-equiv="imagetoolbar" content="no" />
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" /> <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />
<title><?php echo htmlspecialchars ($currentPage->title) ?></title> <title><?php echo htmlspecialchars ($currentPage->title) ?></title>
<?php if ($config['cops_use_local_resources'] == 0) { ?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<?php } else { ?>
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery-1.9.1.min.js") ?>"></script>
<?php } ?>
<script type="text/javascript" src="fancybox/jquery.fancybox.pack.js?v=2.1.4"></script> <script type="text/javascript" src="fancybox/jquery.fancybox.pack.js?v=2.1.4"></script>
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.sortElements.js") ?>"></script> <script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.sortElements.js") ?>"></script>
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.cookies.js") ?>"></script> <script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.cookies.js") ?>"></script>