Compare commits

...

3 Commits

@ -726,7 +726,9 @@ function nestedWithData($items, $parent_id = null)
if ($item->parent_id == $parent_id) {
$name = $item->name ?? $item->title ?? $item->id;
$r .= "<li data-id='{$item->id}'> <span> <i class='ri-drag-move-2-line'></i> {$name}</span>" . PHP_EOL;
$r .= nestedWithData($items, $item->id);
if ($item->hasAttribute('parent_id')) {
$r .= nestedWithData($items, $item->id);
}
$r .= PHP_EOL . ' </li>';
}
}

@ -14,7 +14,7 @@ class Setting extends Model
public static $settingTypes = ['TEXT', 'NUMBER', 'LONGTEXT', 'CODE', 'EDITOR',
'CATEGORY', 'GROUP', 'CHECKBOX', 'FILE', 'COLOR', 'SELECT', 'MENU', 'LOCATION',
'ICON','DATE','DATETIME','TIME','PRODUCT_QUERY','POST_QUERY'];
'ICON','DATE','DATETIME','TIME','PRODUCT_QUERY','POST_QUERY','CATEGORY_SET'];
public function getData()
{

@ -5,6 +5,13 @@ window.addEventListener('load', function () {
try {
if (document.querySelectorAll('.ckeditorx[name="description"]').length > 0){
let metaDescription = document.querySelector('meta[name="description"]');
if (metaDescription) {
metaDescription.remove();
}
}
let keywordInput = document.querySelector('#keyword');
let dirx = document.querySelector('#panel-dir').value;
let editors = {};

@ -82,6 +82,19 @@
xvalue='{{old($setting->key,$setting->value??null)}}'
:close-on-Select="true"></searchable-select>
@break
@case('CATEGORY_SET')
<searchable-multi-select
@error($setting->key) :err="true" @enderror
:items='@json($cats)'
title-field="name"
value-field="id"
xlang="{{config('app.locale')}}"
xid="{{$setting->key}}"
xname="{{$setting->key}}"
@error('category_id') :err="true" @enderror
:xvalue='{{old($setting->key,$setting->value??[])}}'
:close-on-Select="true"></searchable-multi-select>
@break
@case('GROUP')
<searchable-select
@error($setting->key) :err="true" @enderror

Loading…
Cancel
Save