Commit 3b15ccc0 authored by john's avatar john

3011

parent b735bb20
......@@ -3615,7 +3615,6 @@
};
markedRenderer.pageBreak = function(text) {
alert(text)
if (pageBreakReg.test(text) && settings.pageBreak)
{
text = "<hr style=\"page-break-after:always;\" class=\"page-break editormd-page-break\" />";
......@@ -3624,7 +3623,6 @@
return text;
};
markedRenderer.carousel = function(text) {
alert(text)
// if (settings.carousel)
// {
// text = '\n\
......
......@@ -23,10 +23,10 @@ class DocumentationAsset extends AssetBundle
"css/styles.css",
];
public $js = [
'js/documentation.js',
'js/vendor.min.js',
'js/scripts.min.js',
'js/accordion.js',
'js/documentation.js',
];
public $depends = [
'yii\web\YiiAsset',
......
......@@ -249,4 +249,8 @@ class DocList extends \yii\db\ActiveRecord
{
return DocList::find()->where(['=', 'parent_id', $this->id])->orderBy(['position' => SORT_ASC])->one();
}
public function getFirstRootChild()
{
return DocList::find()->where(['=', 'parent_id', 0])->orderBy(['position' => SORT_ASC])->one();
}
}
......@@ -16,7 +16,12 @@ $modelDocList = new DocList();
DocumentationAsset::register($this);
$defaultUrl = ($model->list && $model->list->parent && $model->list->parent->firstChild->id == $model->list->id ) ? common\models\Settings::getValue('documentation-home-page') : false;
$defaultUrl = (
$model->list &&
$model->list->parent &&
$model->list->parent->firstRootChild->id == $model->list->parent->id &&
$model->list->parent->firstChild->id == $model->list->id
) ? common\models\Settings::getValue('documentation-home-page') : false;
?>
<div class="co-documentation-form no_editor_wrapper">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment