The new interface is completely in Ajax. Feel a lot faster. re #73
Uses pushState / popState to keep browser history correct and allow using back in the browser.
This commit is contained in:
parent
c7c6524cce
commit
a509e3389d
5 changed files with 186 additions and 197 deletions
25
book.php
25
book.php
|
@ -102,6 +102,31 @@ class Book extends Base {
|
|||
return "?page=".parent::PAGE_BOOK_DETAIL."&id=$this->id";
|
||||
}
|
||||
|
||||
public function getContentArray () {
|
||||
global $config;
|
||||
$i = 0;
|
||||
$preferedData = array ();
|
||||
foreach ($config['cops_prefered_format'] as $format)
|
||||
{
|
||||
if ($i == 2) { break; }
|
||||
if ($data = $this->getDataFormat ($format)) {
|
||||
$i++;
|
||||
array_push ($preferedData, array ("url" => $data->getHtmlLink (), "name" => $format));
|
||||
}
|
||||
}
|
||||
$serie = $this->getSerie ();
|
||||
if (is_null ($serie)) $serie = "";
|
||||
|
||||
return array ("hasCover" => $this->hasCover,
|
||||
"preferedData" => $preferedData,
|
||||
"detailUrl" => $this->getDetailUrl (),
|
||||
"rating" => $this->getRating (),
|
||||
"pubDate" => $this->getPubDate (),
|
||||
"authorsName" => $this->getAuthorsName (),
|
||||
"tagsName" => $this->getTagsName (),
|
||||
"seriesName" => $serie);
|
||||
}
|
||||
|
||||
public function getDetailUrl ($permalink = false) {
|
||||
global $config;
|
||||
$urlParam = $this->getUri ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue