Add a tricky way of enabling bootstrap theme
This commit is contained in:
parent
ed18b8d7ab
commit
0f4ef8de02
8
base.php
8
base.php
|
@ -72,6 +72,9 @@ function getCurrentOption ($option) {
|
|||
if ($option == "style") {
|
||||
return "default";
|
||||
}
|
||||
if ($option == "template") {
|
||||
return "default";
|
||||
}
|
||||
|
||||
if (isset($config ["cops_" . $option])) {
|
||||
return $config ["cops_" . $option];
|
||||
|
@ -85,7 +88,7 @@ function getCurrentCss () {
|
|||
}
|
||||
|
||||
function getCurrentTemplate () {
|
||||
return "default";
|
||||
return getCurrentOption ("template");
|
||||
}
|
||||
|
||||
function getUrlWithVersion ($url) {
|
||||
|
@ -1074,6 +1077,9 @@ class PageCustomize extends Page
|
|||
"language");
|
||||
|
||||
$content = "";
|
||||
array_push ($this->entryArray, new Entry ("Template", "",
|
||||
"<span onclick='$.cookie(\"template\", \"bootstrap\", { expires: 365 });'>Click to switch to Bootstrap</span>", "text",
|
||||
array ()));
|
||||
if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) {
|
||||
$content .= '<select id="style" onchange="updateCookie (this);">';
|
||||
foreach ($this-> getStyleList () as $filename) {
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#" onclick='$.removeCookie("template"); window.location.reload(true); '>
|
||||
<span class="glyphicon glyphicon-picture"></span>
|
||||
</a></li>
|
||||
<li><a href="{{=it.abouturl}}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{=it.c.i18n.customizeTitle}}">
|
||||
<span class="glyphicon glyphicon-info-sign"></span>
|
||||
</a></li>
|
||||
|
|
Loading…
Reference in a new issue