Get rid of fancybox completely if not enabled. fixes #50
About.xml is still utf8 but looses it's BOM
This commit is contained in:
parent
73433a1c20
commit
6272cd1b01
|
@ -1,4 +1,5 @@
|
||||||
<div class="entryTitle">Authors</div>
|
<div class="bookdetail">
|
||||||
|
<div class="entryTitle">Authors</div>
|
||||||
<div class="content" style="max-width:700px;">
|
<div class="content" style="max-width:700px;">
|
||||||
<p>COPS is developped and maintained by Sébastien Lucas.</p>
|
<p>COPS is developped and maintained by Sébastien Lucas.</p>
|
||||||
|
|
||||||
|
@ -18,3 +19,4 @@
|
||||||
|
|
||||||
<p>You can also check <a href="http://www.mobileread.com/forums/showthread.php?t=170903">COPS's topic on MobileRead forum</a>.</p>
|
<p>You can also check <a href="http://www.mobileread.com/forums/showthread.php?t=170903">COPS's topic on MobileRead forum</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
12
base.php
12
base.php
|
@ -339,6 +339,8 @@ class Page
|
||||||
return new PageQueryResult ($id, $query, $n);
|
return new PageQueryResult ($id, $query, $n);
|
||||||
case Base::PAGE_BOOK_DETAIL :
|
case Base::PAGE_BOOK_DETAIL :
|
||||||
return new PageBookDetail ($id, $query, $n);
|
return new PageBookDetail ($id, $query, $n);
|
||||||
|
case Base::PAGE_ABOUT :
|
||||||
|
return new PageAbout ($id, $query, $n);
|
||||||
default:
|
default:
|
||||||
$page = new Page ($id, $query, $n);
|
$page = new Page ($id, $query, $n);
|
||||||
$page->idPage = "cops:catalog";
|
$page->idPage = "cops:catalog";
|
||||||
|
@ -596,6 +598,15 @@ class PageBookDetail extends Page
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class PageAbout extends Page
|
||||||
|
{
|
||||||
|
public function InitializeContent ()
|
||||||
|
{
|
||||||
|
$this->title = "About";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
abstract class Base
|
abstract class Base
|
||||||
{
|
{
|
||||||
const PAGE_INDEX = "index";
|
const PAGE_INDEX = "index";
|
||||||
|
@ -614,6 +625,7 @@ abstract class Base
|
||||||
const PAGE_BOOK_DETAIL = "13";
|
const PAGE_BOOK_DETAIL = "13";
|
||||||
const PAGE_ALL_CUSTOMS = "14";
|
const PAGE_ALL_CUSTOMS = "14";
|
||||||
const PAGE_CUSTOM_DETAIL = "15";
|
const PAGE_CUSTOM_DETAIL = "15";
|
||||||
|
const PAGE_ABOUT = "16";
|
||||||
|
|
||||||
const COMPATIBILITY_XML_ALDIKO = "aldiko";
|
const COMPATIBILITY_XML_ALDIKO = "aldiko";
|
||||||
|
|
||||||
|
|
13
index.php
13
index.php
|
@ -59,12 +59,16 @@
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery-1.9.1.min.js") ?>"></script>
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery-1.9.1.min.js") ?>"></script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php if ($config['cops_use_fancyapps'] == 1) { ?>
|
||||||
<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>
|
||||||
|
<?php } ?>
|
||||||
<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>
|
||||||
<link rel="related" href="<?php echo $config['cops_full_url'] ?>feed.php" type="application/atom+xml;profile=opds-catalog" title="<?php echo $config['cops_title_default']; ?>" />
|
<link rel="related" href="<?php echo $config['cops_full_url'] ?>feed.php" type="application/atom+xml;profile=opds-catalog" title="<?php echo $config['cops_title_default']; ?>" />
|
||||||
<link rel="icon" type="image/vnd.microsoft.icon" href="<?php echo $currentPage->favicon ?>" />
|
<link rel="icon" type="image/vnd.microsoft.icon" href="<?php echo $currentPage->favicon ?>" />
|
||||||
|
<?php if ($config['cops_use_fancyapps'] == 1) { ?>
|
||||||
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css?v=2.1.4" media="screen" />
|
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css?v=2.1.4" media="screen" />
|
||||||
|
<?php } ?>
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("style.css") ?>" media="screen" />
|
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("style.css") ?>" media="screen" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
@ -93,7 +97,6 @@
|
||||||
nextEffect : 'none'
|
nextEffect : 'none'
|
||||||
<?php if ($isEink) echo ", openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
<?php if ($isEink) echo ", openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
||||||
});
|
});
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
$(".fancyabout").fancybox({
|
$(".fancyabout").fancybox({
|
||||||
'type' : 'ajax',
|
'type' : 'ajax',
|
||||||
|
@ -102,6 +105,7 @@
|
||||||
nextEffect : 'none'
|
nextEffect : 'none'
|
||||||
<?php if ($isEink) echo ", openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
<?php if ($isEink) echo ", openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
||||||
});
|
});
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
$("#settingsImage").click(function(){
|
$("#settingsImage").click(function(){
|
||||||
if ($("#tool").is(":hidden")) {
|
if ($("#tool").is(":hidden")) {
|
||||||
|
@ -212,9 +216,10 @@
|
||||||
<div id="content" style="display: none;"></div>
|
<div id="content" style="display: none;"></div>
|
||||||
<div class="entries">
|
<div class="entries">
|
||||||
<?php
|
<?php
|
||||||
if ($page == Base::PAGE_BOOK_DETAIL)
|
if ($page == Base::PAGE_BOOK_DETAIL) {
|
||||||
{
|
|
||||||
include ("bookdetail.php");
|
include ("bookdetail.php");
|
||||||
|
} else if ($page == Base::PAGE_ABOUT) {
|
||||||
|
readfile ("about.xml");
|
||||||
}
|
}
|
||||||
foreach ($currentPage->entryArray as $entry) {
|
foreach ($currentPage->entryArray as $entry) {
|
||||||
if (get_class ($entry) != "EntryBook") {
|
if (get_class ($entry) != "EntryBook") {
|
||||||
|
@ -295,7 +300,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<div class="footright">
|
<div class="footright">
|
||||||
<a class="fancyabout" href="about.xml"><img src="<?php echo getUrlWithVersion("images/info.png") ?>" alt="Home" /></a>
|
<a class="fancyabout" href="<?php if ($config['cops_use_fancyapps'] == 1) { echo "about.xml"; } else { echo $_SERVER["SCRIPT_NAME"] . str_replace ("&", "&", addURLParameter ("?page=16", DB, $database)); } ?>"><img src="<?php echo getUrlWithVersion("images/info.png") ?>" alt="Home" /></a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ($currentPage->isPaginated ()) {
|
if ($currentPage->isPaginated ()) {
|
||||||
|
|
Loading…
Reference in a new issue