mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2024-12-05 09:26:52 +08:00
现在active父元素的折叠会自动展开
This commit is contained in:
parent
2d608b6f2d
commit
a7117c818e
@ -72,7 +72,7 @@ class BookCollection {
|
||||
|
||||
public function getHtml (): string {
|
||||
$str = "";
|
||||
if ($this->name != self::ROOT) $str .= "<li class='book-collection fold'><a class='book-collection' href='#'>$this->name<i class='exc-trigger fa'></i></a><ul class='book-collection summary'>";
|
||||
if ($this->name != self::ROOT) $str .= "<li class='book-collection fold" . ($this->getBook(PageMeta::$book->getId())==null?"":"on") . "'><a class='book-collection' href='#'>$this->name<i class='exc-trigger fa'></i></a><ul class='book-collection summary'>";
|
||||
foreach ($this->array as $node) {
|
||||
$str .= $node->getHtml();
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class Chapter {
|
||||
|
||||
public function getSummaryHtml (): string {
|
||||
$str = "";
|
||||
if ($this->parent != null) $str .= "<li class='chapter fold'><a class='page-chapter' href='#'>$this->name<i class='exc-trigger fa'></i></a><ul class='page-chapter summary'>";
|
||||
if ($this->parent != null) $str .= "<li class='chapter fold" . ($this->getPage(PageMeta::$page->getId())==null?"":"on") . "'><a class='page-chapter' href='#'>$this->name<i class='exc-trigger fa'></i></a><ul class='page-chapter summary'>";
|
||||
foreach ($this->childs as $node) {
|
||||
$str .= $node->getSummaryHtml();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user