Compare commits

..

No commits in common. "bbdb5d8eca14e8a315d2579c935eca0efd9970c7" and "82d71d0ede43ac9870f7f206276a42434ccdf03c" have entirely different histories.

3 changed files with 135 additions and 74 deletions

View File

@ -249,10 +249,10 @@ function generateDetailsHtml(item) {
let html = `<details class="custom-details" ${item.isOpen ? "open" : ""}>`; let html = `<details class="custom-details" ${item.isOpen ? "open" : ""}>`;
html += `<summary>`; html += `<summary>`;
if (item.tag) { if (item.tag) {
html += `<span class="tag" > ${item.tag} </span>`; html += `<span > ${item.tag} </span>`;
} }
html += `${item.title || "بدون عنوان"}`; html += `${escapeHtml(item.title) || "بدون عنوان"}`;
if (item.link_url) { if (item.link_url) {
html += `<a class="link-url" href="${item.link_url}">${item.link_label}</a>`; html += `<a class="link-url" href="${item.link_url}">${item.link_label}</a>`;
} }
@ -554,18 +554,6 @@ onBeforeUnmount(() => {
} }
} }
summary.tag {
color: blue;
border-radius: var(--radius) var(--radius) 0 0;
}
summary.label {
color: chocolate;
font-weight: 700;
}
summary { summary {
position: relative; position: relative;
padding: 1.25rem 1.25rem 1.25rem 3.5rem; padding: 1.25rem 1.25rem 1.25rem 3.5rem;
@ -576,6 +564,7 @@ onBeforeUnmount(() => {
); );
color: var(--color-primary-700); color: var(--color-primary-700);
border-radius: var(--radius) var(--radius) 0 0; border-radius: var(--radius) var(--radius) 0 0;
font-weight: 700;
font-size: 1.1rem; font-size: 1.1rem;
color: var(--color-dark-primary-800); color: var(--color-dark-primary-800);
// cursor: pointer; // cursor: pointer;

View File

@ -40,72 +40,144 @@ const myContentSchema = computed(() => {
pagination: props.pagination, pagination: props.pagination,
}; };
}); });
const headerTools = computed(() => [ const headerTools = ref([
{ [
items: [ {
{ items: [
type: "dropdown", { key: "label", label: "کد:", style: "code-title" },
key: "dropdown", {
name: "refine_codes", type: "dropdown",
dropdownSchema: { key: "dropdown",
width: "18em", name: "refine_codes",
modelValue: null, // اینو بذار dropdownSchema: {
optionAttribute: "title", width: "18em",
valueAttribute: "value", modelValue: null,
searchable: false, optionAttribute: "title",
placeholder: "انتخاب کنید", valueAttribute: "value",
items: refineCodes, searchable: false,
placeholder: "انتخاب کنید",
items: refineCodes,
},
}, },
}, { key: "label", label: "نوع رابطه:", style: "code-title" },
{ {
key: "autoComplation", type: "dropdown",
placeholder: "جستجوی ...", key: "dropdown",
debounceTime: 500, name: "refine_codes",
// autocompleteUrl: "/repo/monir/complation/sanad", dropdownSchema: {
minCharsForAutocomplete: 3, width: "10em",
maxHistoryItems: 20, modelValue: null,
showSearchButton: false, optionAttribute: "title",
filters: [ valueAttribute: "value",
{ searchable: false,
label: "همه اجزاء", placeholder: "انتخاب کنید",
value: "all", items: [
{
title: "تعارض",
value: "1",
},
{
title: "تینت",
value: "2",
},
{
title: "ییی",
value: "3",
},
{
title: "ییی",
value: "4",
},
],
}, },
{ },
label: "عنوان جلسه", { key: "label", label: "وضعیت اعتبار:", style: "code-title" },
value: "title", {
type: "dropdown",
key: "dropdown",
name: "refine_codes",
dropdownSchema: {
width: "10em",
modelValue: null,
optionAttribute: "title",
valueAttribute: "value",
searchable: false,
placeholder: "انتخاب کنید",
placeholder: "انتخاب کنید",
items: [
{
title: "تعارض",
value: "1",
},
{
title: "تینت",
value: "2",
},
{
title: "ییی",
value: "3",
},
{
title: "ییی",
value: "4",
},
],
}, },
{ },
label: "عنوان دوره", ],
value: "branch", },
}, {
{ items: [
label: " فقط فهرست", {
value: "mindex", key: "autoComplation",
}, placeholder: "جستجوی ...",
{ debounceTime: 500,
label: " فقط کدها", // autocompleteUrl: "/repo/monir/complation/sanad",
value: "codes", minCharsForAutocomplete: 3,
}, maxHistoryItems: 20,
{ showSearchButton: false,
label: " دوره", filters: [
value: "advance", {
}, label: "همه اجزاء",
], value: "all",
}, },
{ {
key: "prevNext", label: "عنوان جلسه",
name: "entityNavigator", value: "title",
prevDisabled: false, },
nextDisabled: true, {
}, label: "عنوان دوره",
], value: "branch",
}, },
{
label: " فقط فهرست",
value: "mindex",
},
{
label: " فقط کدها",
value: "codes",
},
{
label: " دوره",
value: "advance",
},
],
},
{
key: "prevNext",
name: "entityNavigator",
prevDisabled: false,
nextDisabled: true,
},
],
},
],
]); ]);
function headerToolsAction({ action, data }) { function headerToolsAction({ action, data }) {
if (action == "auto-complation") { if (action == "auto-complation") {
if (data.action == "complete-search") { if (data.action == "complete-search") {
console.log("data ==> ", data); // console.log("data ==> ", data);
emit("my-header-tools-search", data.item); emit("my-header-tools-search", data.item);
} }

View File

@ -55,7 +55,7 @@ const setDataEditor = async () => {
node = { node = {
isOpen: false, isOpen: false,
id: item.section_mom_id, id: item.section_mom_id,
title: `<span class="label">قانون مقدم : </span>` + item.qanon_title + " > " + item.full_path, title: "قانون مقدم : " + item.qanon_title + " > " + item.full_path,
tag: item.state_etebar, tag: item.state_etebar,
content: _source.content1, content: _source.content1,
link_label: "«منبع»", link_label: "«منبع»",
@ -90,7 +90,7 @@ const setDataEditor = async () => {
node = { node = {
isOpen: false, isOpen: false,
id: item.section_mom_id, id: item.section_mom_id,
title: `<span class="label">قانون موخر : </span>` + item.qanon_title + " > " + item.full_path, title: "قانون موخر : " + item.qanon_title + " > " + item.full_path,
tag: item.state_etebar, tag: item.state_etebar,
content: _source.content2, content: _source.content2,
link_label: "«منبع»", link_label: "«منبع»",