diff --git a/src/UnifyTheme.php b/src/UnifyTheme.php index 10a20a7..85b870b 100644 --- a/src/UnifyTheme.php +++ b/src/UnifyTheme.php @@ -27,6 +27,7 @@ use skeeks\cms\themes\unify\assets\UnifyThemeAsset; use skeeks\cms\themes\unify\widgets\jui\JuiSortableWidget; use skeeks\cms\widgets\ColorInput; +use skeeks\widget\codemirror\CodemirrorWidget; use skeeks\yii2\form\fields\BoolField; use skeeks\yii2\form\fields\FieldSet; use skeeks\yii2\form\fields\HtmlBlock; @@ -482,7 +483,19 @@ public function getConfigFormModelData() 'css_code' => [ - 'class' => TextareaField::class, + 'class' => WidgetField::class, + 'widgetClass' => CodemirrorWidget::class, + 'widgetConfig' => [ + 'preset' => 'htmlmixed', + 'assets' => + [ + \skeeks\widget\codemirror\CodemirrorAsset::THEME_NIGHT + ], + 'clientOptions' => + [ + 'theme' => 'night' + ], + ] ], 'is_show_home_slider' => [ diff --git a/src/assets/components/UnifyThemeFloatLabelAsset.php b/src/assets/components/UnifyThemeFloatLabelAsset.php new file mode 100644 index 0000000..bd7c9d4 --- /dev/null +++ b/src/assets/components/UnifyThemeFloatLabelAsset.php @@ -0,0 +1,43 @@ + + */ + +namespace skeeks\cms\themes\unify\assets\components; + +use skeeks\assets\unify\base\UnifyHsGoToAsset; +use skeeks\assets\unify\base\UnifyIconHsAsset; +use yii\web\JqueryAsset; +/** + * @author Semenov Alexander + */ +class UnifyThemeFloatLabelAsset extends \skeeks\cms\base\AssetBundle +{ + public $sourcePath = '@vendor/skeeks/cms-theme-unify-v2/src/assets/src/components/float-label'; + + public $css = [ + 'float-label.css' + ]; + public $js = [ + 'float-label.js' + ]; + public $depends = [ + JqueryAsset::class, + ]; + + public function registerAssetFiles($view) + { + parent::registerAssetFiles($view); + + $view->registerJs(<< -
+
diff --git a/src/views/modules/cms/tree/home-default.php b/src/views/modules/cms/tree/home-default.php index 3387961..1ff027c 100644 --- a/src/views/modules/cms/tree/home-default.php +++ b/src/views/modules/cms/tree/home-default.php @@ -35,12 +35,18 @@
-descriptor->name = 'Подразделы на главной'; + $widget->viewFile = '@app/views/widgets/TreeMenuCmsWidget/home-sub-catalog'; + $widget::end(); ?> + + 'home-sub-catalog', 'viewFile' => '@app/views/widgets/TreeMenuCmsWidget/home-sub-catalog', 'treeParentCode' => "services", 'enabledRunCache' => \skeeks\cms\components\Cms::BOOL_N, -])); ?> +])); */?>