Add a config item to avoid using Fancyapps.
For now the about box still use Fancyapps. Reported by mcister and Northguy
This commit is contained in:
parent
f9efdbf44f
commit
8906430b13
12
base.php
12
base.php
|
@ -220,7 +220,8 @@ class Page
|
||||||
return new PageSerieDetail ($id, $query, $n);
|
return new PageSerieDetail ($id, $query, $n);
|
||||||
case Base::PAGE_OPENSEARCH_QUERY :
|
case Base::PAGE_OPENSEARCH_QUERY :
|
||||||
return new PageQueryResult ($id, $query, $n);
|
return new PageQueryResult ($id, $query, $n);
|
||||||
break;
|
case Base::PAGE_BOOK_DETAIL :
|
||||||
|
return new PageBookDetail ($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";
|
||||||
|
@ -402,6 +403,14 @@ class PageQueryResult extends Page
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class PageBookDetail extends Page
|
||||||
|
{
|
||||||
|
public function InitializeContent ()
|
||||||
|
{
|
||||||
|
$this->title = "Book";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
abstract class Base
|
abstract class Base
|
||||||
{
|
{
|
||||||
const PAGE_INDEX = "index";
|
const PAGE_INDEX = "index";
|
||||||
|
@ -417,6 +426,7 @@ abstract class Base
|
||||||
const PAGE_ALL_RECENT_BOOKS = "10";
|
const PAGE_ALL_RECENT_BOOKS = "10";
|
||||||
const PAGE_ALL_TAGS = "11";
|
const PAGE_ALL_TAGS = "11";
|
||||||
const PAGE_TAG_DETAIL = "12";
|
const PAGE_TAG_DETAIL = "12";
|
||||||
|
const PAGE_BOOK_DETAIL = "13";
|
||||||
|
|
||||||
const COMPATIBILITY_XML_ALDIKO = "aldiko";
|
const COMPATIBILITY_XML_ALDIKO = "aldiko";
|
||||||
|
|
||||||
|
|
|
@ -110,4 +110,11 @@
|
||||||
* 0 : No
|
* 0 : No
|
||||||
*/
|
*/
|
||||||
$config['cops_author_split_first_letter'] = "1";
|
$config['cops_author_split_first_letter'] = "1";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable of Fancyapps (for popups)
|
||||||
|
* 1 : Yes (enable)
|
||||||
|
* 0 : No
|
||||||
|
*/
|
||||||
|
$config['cops_use_fancyapps'] = "1";
|
||||||
?>
|
?>
|
13
index.php
13
index.php
|
@ -76,12 +76,14 @@
|
||||||
$("#search").slideUp();
|
$("#search").slideUp();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php if ($config['cops_use_fancyapps'] == 1) { ?>
|
||||||
$(".fancycover").fancybox({
|
$(".fancycover").fancybox({
|
||||||
'type' : 'image',
|
'type' : 'image',
|
||||||
prevEffect : 'none',
|
prevEffect : 'none',
|
||||||
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',
|
||||||
|
@ -101,6 +103,9 @@
|
||||||
|
|
||||||
$(".bookdetail").click(function(){
|
$(".bookdetail").click(function(){
|
||||||
var url = $(this).find("a").attr("href");
|
var url = $(this).find("a").attr("href");
|
||||||
|
<?php if ($config['cops_use_fancyapps'] == 0) { ?>
|
||||||
|
window.location = url;
|
||||||
|
<?php } else { ?>
|
||||||
$('#content').load(url, function(data, stat, req){
|
$('#content').load(url, function(data, stat, req){
|
||||||
$.fancybox( {
|
$.fancybox( {
|
||||||
content: data,
|
content: data,
|
||||||
|
@ -108,7 +113,7 @@
|
||||||
<?php if ($isEink) echo ", margin : [15, 35, 10, 10], openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
<?php if ($isEink) echo ", margin : [15, 35, 10, 10], openEffect : 'none', closeEffect : 'none', helpers : {overlay : null}"; ?>
|
||||||
} );
|
} );
|
||||||
});
|
});
|
||||||
|
<?php } ?>
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -179,6 +184,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)
|
||||||
|
{
|
||||||
|
include ("bookdetail.php");
|
||||||
|
}
|
||||||
foreach ($currentPage->entryArray as $entry) {
|
foreach ($currentPage->entryArray as $entry) {
|
||||||
if (get_class ($entry) != "EntryBook") {
|
if (get_class ($entry) != "EntryBook") {
|
||||||
?>
|
?>
|
||||||
|
@ -224,7 +233,7 @@
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="bookdetail">
|
<div class="bookdetail">
|
||||||
<a class="navigation" href="bookdetail.php?id=<?php echo $entry->book->id ?>" />
|
<a class="navigation" href="<?php if ($config['cops_use_fancyapps'] == 0) { echo 'index.php?page=13&id=' . $entry->book->id; } else { echo 'bookdetail.php?id=' . $entry->book->id; } ?>" />
|
||||||
<div class="entryTitle st"><?php echo htmlspecialchars ($entry->title) ?> <span class="sp">(<?php echo date ('Y', $entry->book->pubdate) ?>)</span> <span class="sr"><?php echo $entry->book->getRating () ?></span></div>
|
<div class="entryTitle st"><?php echo htmlspecialchars ($entry->title) ?> <span class="sp">(<?php echo date ('Y', $entry->book->pubdate) ?>)</span> <span class="sr"><?php echo $entry->book->getRating () ?></span></div>
|
||||||
<div class="entryContent sa"><?php echo localize("authors.title") . " : " . htmlspecialchars ($entry->book->getAuthorsName ()) ?></div>
|
<div class="entryContent sa"><?php echo localize("authors.title") . " : " . htmlspecialchars ($entry->book->getAuthorsName ()) ?></div>
|
||||||
<div class="entryContent"><?php echo localize("tags.title") . " : " . htmlspecialchars ($entry->book->getTagsName ()) ?></div>
|
<div class="entryContent"><?php echo localize("tags.title") . " : " . htmlspecialchars ($entry->book->getTagsName ()) ?></div>
|
||||||
|
|
|
@ -28,7 +28,6 @@ color:white;
|
||||||
background-color:black;
|
background-color:black;
|
||||||
width:100%;
|
width:100%;
|
||||||
height:32px;
|
height:32px;
|
||||||
margin-top:8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img
|
img
|
||||||
|
@ -94,6 +93,7 @@ clear:both;
|
||||||
.entries
|
.entries
|
||||||
{
|
{
|
||||||
background-color:lightgray;
|
background-color:lightgray;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entry
|
.entry
|
||||||
|
@ -253,6 +253,13 @@ min-width: 400px;
|
||||||
color:black;
|
color:black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entries > .bookpopup
|
||||||
|
{
|
||||||
|
background-color: white;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.content
|
.content
|
||||||
{
|
{
|
||||||
line-height: 110%;
|
line-height: 110%;
|
||||||
|
|
Loading…
Reference in a new issue