Handle better when server side rendering is enabled. re #82
This commit is contained in:
parent
fa4ffb47e7
commit
9d117220c4
3
base.php
3
base.php
|
@ -751,11 +751,12 @@ class PageCustomize extends Page
|
||||||
array_push ($this->entryArray, new Entry (localize ("customize.style"), "",
|
array_push ($this->entryArray, new Entry (localize ("customize.style"), "",
|
||||||
$content, "text",
|
$content, "text",
|
||||||
array ()));
|
array ()));
|
||||||
|
if (!useServerSideRendering ()) {
|
||||||
$content = '<input type="checkbox" onchange="updateCookieFromCheckbox (this);" id="use_fancyapps" ' . $use_fancybox . ' />';
|
$content = '<input type="checkbox" onchange="updateCookieFromCheckbox (this);" id="use_fancyapps" ' . $use_fancybox . ' />';
|
||||||
array_push ($this->entryArray, new Entry (localize ("customize.fancybox"), "",
|
array_push ($this->entryArray, new Entry (localize ("customize.fancybox"), "",
|
||||||
$content, "text",
|
$content, "text",
|
||||||
array ()));
|
array ()));
|
||||||
|
}
|
||||||
$content = '<input type="number" onchange="updateCookie (this);" id="max_item_per_page" value="' . getCurrentOption ("max_item_per_page") . '" min="-1" max="1200" pattern="^[-+]?[0-9]+$" />';
|
$content = '<input type="number" onchange="updateCookie (this);" id="max_item_per_page" value="' . getCurrentOption ("max_item_per_page") . '" min="-1" max="1200" pattern="^[-+]?[0-9]+$" />';
|
||||||
array_push ($this->entryArray, new Entry (localize ("customize.paging"), "",
|
array_push ($this->entryArray, new Entry (localize ("customize.paging"), "",
|
||||||
$content, "text",
|
$content, "text",
|
||||||
|
|
1
book.php
1
book.php
|
@ -631,6 +631,7 @@ function getJson ($complete = false) {
|
||||||
"config" => array (
|
"config" => array (
|
||||||
"use_fancyapps" => $config ["cops_use_fancyapps"],
|
"use_fancyapps" => $config ["cops_use_fancyapps"],
|
||||||
"max_item_per_page" => $config['cops_max_item_per_page'],
|
"max_item_per_page" => $config['cops_max_item_per_page'],
|
||||||
|
"server_side_rendering" => useServerSideRendering (),
|
||||||
"html_tag_filter" => $config['cops_html_tag_filter']));
|
"html_tag_filter" => $config['cops_html_tag_filter']));
|
||||||
if ($config['cops_thumbnail_handling'] == "1") {
|
if ($config['cops_thumbnail_handling'] == "1") {
|
||||||
$out ["const"]["url"]["thumbnailUrl"] = $out ["const"]["url"]["coverUrl"];
|
$out ["const"]["url"]["thumbnailUrl"] = $out ["const"]["url"]["coverUrl"];
|
||||||
|
|
|
@ -42,13 +42,16 @@
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href="./icons/icon144.png" />
|
<link rel="apple-touch-icon" sizes="144x144" href="./icons/icon144.png" />
|
||||||
|
|
||||||
<title>COPS</title>
|
<title>COPS</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/jQuery/jquery-1.10.2.min.js") ?>"></script>
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/jQuery/jquery-1.10.2.min.js") ?>"></script>
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/jquery-cookie/jquery.cookies.js") ?>"></script>
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/jquery-cookie/jquery.cookies.js") ?>"></script>
|
||||||
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.sortElements.js") ?>"></script>
|
||||||
|
<?php if (!useServerSideRendering ()) { ?>
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/Magnific-Popup/jquery.magnific-popup.min.js") ?>"></script>
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/Magnific-Popup/jquery.magnific-popup.min.js") ?>"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/Magnific-Popup/magnific-popup.css") ?>" media="screen" />
|
<link rel="stylesheet" type="text/css" href="<?php echo getUrlWithVersion("resources/Magnific-Popup/magnific-popup.css") ?>" media="screen" />
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("js/jquery.sortElements.js") ?>"></script>
|
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/doT/doT.min.js") ?>"></script>
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/doT/doT.min.js") ?>"></script>
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/lru/lru.js") ?>"></script>
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("resources/lru/lru.js") ?>"></script>
|
||||||
|
<?php } ?>
|
||||||
<script type="text/javascript" src="<?php echo getUrlWithVersion("util.js") ?>"></script>
|
<script type="text/javascript" src="<?php echo getUrlWithVersion("util.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 $config['cops_icon']; ?>" />
|
<link rel="icon" type="image/vnd.microsoft.icon" href="<?php echo $config['cops_icon']; ?>" />
|
||||||
|
|
|
@ -2,11 +2,13 @@
|
||||||
<a class="headleft" href="{{=it.homeurl}}">
|
<a class="headleft" href="{{=it.homeurl}}">
|
||||||
<div title="{{=it.const.i18n.homeAlt}}" class="hicon hicon64"><i class="icon-home"></i></div>
|
<div title="{{=it.const.i18n.homeAlt}}" class="hicon hicon64"><i class="icon-home"></i></div>
|
||||||
</a>
|
</a>
|
||||||
|
{{? it.const.config.server_side_rendering == 0}}
|
||||||
<div title="Settings and menu" class="hicon hicon64 headright"><i class="icon-cog" id="searchImage"></i></div>
|
<div title="Settings and menu" class="hicon hicon64 headright"><i class="icon-cog" id="searchImage"></i></div>
|
||||||
|
{{?}}
|
||||||
<div class="headcenter">
|
<div class="headcenter">
|
||||||
<h1>{{=it.title}}</h1>
|
<h1>{{=it.title}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="tool" style="display: none">
|
<div id="tool" {{? it.const.config.server_side_rendering == 0}}style="display: none"{{?}}>
|
||||||
<div style="float: left; width: 50%">
|
<div style="float: left; width: 50%">
|
||||||
<form id="searchForm" action="index.php" method="get">
|
<form id="searchForm" action="index.php" method="get">
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
|
@ -24,6 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{{? it.const.config.server_side_rendering == 0}}
|
||||||
<div id="sortForm" style="float: right; width: 45%; display: none">
|
<div id="sortForm" style="float: right; width: 45%; display: none">
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<div title="{{=it.const.i18n.sortAlt}}" id="sort" class="hicon hicon32"><i class="icon-sort"></i></div>
|
<div title="{{=it.const.i18n.sortAlt}}" id="sort" class="hicon hicon32"><i class="icon-sort"></i></div>
|
||||||
|
@ -45,5 +48,6 @@
|
||||||
<ul>
|
<ul>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{{?}}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
4
util.js
4
util.js
|
@ -4,7 +4,9 @@
|
||||||
|
|
||||||
var templatePage, templateBookDetail, templateMain, currentData, before, filterList;
|
var templatePage, templateBookDetail, templateMain, currentData, before, filterList;
|
||||||
|
|
||||||
var cache = new LRUCache(30);
|
if (typeof LRUCache!='undefined') {
|
||||||
|
var cache = new LRUCache(30);
|
||||||
|
}
|
||||||
|
|
||||||
var DEBUG = false;
|
var DEBUG = false;
|
||||||
var isPushStateEnabled = window.history && window.history.pushState && window.history.replaceState &&
|
var isPushStateEnabled = window.history && window.history.pushState && window.history.replaceState &&
|
||||||
|
|
Loading…
Reference in a new issue