- ordinamento tabella titoli
- migliorata la lista degli argomenti
This commit is contained in:
@@ -32,23 +32,7 @@ body {
|
||||
}
|
||||
|
||||
|
||||
// Underline like a href
|
||||
.category {
|
||||
color: darkblue;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 19px;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.category_sel {
|
||||
color: white !important;
|
||||
background: #5c8ef4 !important;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.category-title{
|
||||
.category-title {
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
@@ -59,10 +43,13 @@ body {
|
||||
}
|
||||
|
||||
.fixed-width {
|
||||
width: var(--width) !important; /* Usa una variabile CSS */
|
||||
width: var(--width) !important;
|
||||
/* Usa una variabile CSS */
|
||||
}
|
||||
|
||||
.fixed-height {
|
||||
height: var(--height) !important; /* Usa una variabile CSS */
|
||||
height: var(--height) !important;
|
||||
/* Usa una variabile CSS */
|
||||
}
|
||||
|
||||
.break {
|
||||
@@ -96,6 +83,7 @@ body {
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
text-align: left !important;
|
||||
|
||||
&.big {
|
||||
font-size: calc(22 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
@@ -109,7 +97,7 @@ body {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.book-link{
|
||||
.book-link {
|
||||
font-style: italic;
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
@@ -125,6 +113,7 @@ body {
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
height: calc(380 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-text-down {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
@@ -137,4 +126,41 @@ body {
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(35 * var(--scalecatalog) * 1px);
|
||||
height: calc(100 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
}
|
||||
|
||||
.categories {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 12px;
|
||||
border-radius: 24px;
|
||||
background-color: #e6f0ff;
|
||||
}
|
||||
|
||||
.category {
|
||||
font-family: 'Segoe UI', Arial, sans-serif;
|
||||
font-size: 0.95rem;
|
||||
padding: 8px 16px;
|
||||
background-color: white;
|
||||
color: #2c3e50;
|
||||
border: 1px solid #b0c4de;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease-in-out;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.category:hover {
|
||||
background-color: #dbe9ff;
|
||||
color: #1a3f8a;
|
||||
border-color: #89aef0;
|
||||
}
|
||||
|
||||
.category_sel {
|
||||
background-color: #5c8ef4 !important;
|
||||
color: white !important;
|
||||
font-weight: 600;
|
||||
border-color: #5c8ef4 !important;
|
||||
box-shadow: 0 0 0 2px rgba(92, 142, 244, 0.3);
|
||||
}
|
||||
|
||||
@@ -200,6 +200,10 @@ export default defineComponent({
|
||||
return !!getCatalogoByMyPage.value
|
||||
})
|
||||
|
||||
const showListaArgomenti = computed(() => {
|
||||
return optcatalogo.value.showListaArgomenti
|
||||
})
|
||||
|
||||
// Register the scroll event on component mount
|
||||
const handleScroll = () => {
|
||||
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
||||
@@ -572,10 +576,14 @@ export default defineComponent({
|
||||
// Se nel catalogo è stato già generato, allora gli passo quello.
|
||||
const trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
if (trovatocatalogo?.lista_prodotti.length === 0) {
|
||||
if (optcatalogo.value.showListaArgomenti) {
|
||||
generalista = true
|
||||
}
|
||||
|
||||
/*if (trovatocatalogo?.lista_prodotti.length === 0) {
|
||||
generalista = true
|
||||
}*/
|
||||
|
||||
if (!generalista && (trovatocatalogo?.lista_prodotti.length > 0)) {
|
||||
arrprod = trovatocatalogo?.lista_prodotti
|
||||
} else {
|
||||
@@ -604,7 +612,7 @@ export default defineComponent({
|
||||
// console.log('arrprod', arrprod)
|
||||
|
||||
populateDataWithlinkIdTemplate();
|
||||
generatearrProdToViewSorted(!generalista, salva);
|
||||
generatearrProdToViewSorted(!generalista, salva, !optcatalogo.value.showListaArgomenti);
|
||||
loaddata();
|
||||
|
||||
refreshpage.value = false;
|
||||
@@ -754,7 +762,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function generatearrProdToViewSorted(usaprodottiSalvati?: boolean, salva?: boolean) {
|
||||
function generatearrProdToViewSorted(usaprodottiSalvati?: boolean, salva?: boolean, salvasudb?: boolean) {
|
||||
console.log('generatearrProdToViewSorted... usaprodottiSalvati=', usaprodottiSalvati, ' salva=', salva)
|
||||
|
||||
try {
|
||||
@@ -880,7 +888,9 @@ export default defineComponent({
|
||||
if (trovatocatalogo) {
|
||||
trovatocatalogo.lista_prodotti = arrprod
|
||||
|
||||
salvaListaProdotti(false)
|
||||
if (salvasudb) {
|
||||
salvaListaProdotti(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -901,7 +911,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
// Salva gli ID dei prodotti nel catalogo
|
||||
tools.saveFieldToServer($q, 'catalogs', getCatalogoByMyPage.value._id, mydata, true, false)
|
||||
tools.saveFieldToServer($q, 'catalogs', getCatalogoByMyPage.value._id, mydata, !optcatalogo.value.showListaArgomenti, false)
|
||||
|
||||
|
||||
if (ricarica) {
|
||||
@@ -1244,7 +1254,10 @@ export default defineComponent({
|
||||
if (getCatalogoByMyPage.value) {
|
||||
getCatalogoByMyPage.value.lista_prodotti = [...arr]
|
||||
|
||||
salvaListaProdotti(true)
|
||||
if (optcatalogo.value.showListaArgomenti)
|
||||
salvaListaProdotti(true)
|
||||
else
|
||||
generatearrProdToViewSorted(true, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1332,6 +1345,7 @@ export default defineComponent({
|
||||
clickaddNewBook,
|
||||
addProductToList,
|
||||
addnewProd,
|
||||
showListaArgomenti,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -62,7 +62,35 @@
|
||||
name="lista"
|
||||
v-if="optcatalogo"
|
||||
>
|
||||
<q-tab-panel
|
||||
v-if="showListaArgomenti"
|
||||
name="categorie"
|
||||
>
|
||||
<div class="row justify-center q-mx-auto bg-blue-1">
|
||||
<div class="categories">
|
||||
<div
|
||||
v-for="(reccat, index) in getCatProds()"
|
||||
:key="index"
|
||||
class="category"
|
||||
:class="{ category_sel: cat === reccat.value }"
|
||||
@click="cat = reccat.value"
|
||||
>
|
||||
{{ reccat.label }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center q-py-sm prod_trov">
|
||||
<span v-show="productStore.getNumProdTot() !== arrProducts.length">{{
|
||||
t('ecomm.prodotti_trovati', {
|
||||
qta: arrProducts.length,
|
||||
qtatot: productStore.getNumProdTot(),
|
||||
})
|
||||
}}</span>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-btn
|
||||
v-if="!showListaArgomenti"
|
||||
rounded
|
||||
label="Rigenera Ordinamento Libri"
|
||||
color="primary"
|
||||
@@ -70,6 +98,7 @@
|
||||
></q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="!showListaArgomenti"
|
||||
rounded
|
||||
label="Aggiungi"
|
||||
icon="fas fa-plus"
|
||||
@@ -103,7 +132,7 @@
|
||||
>
|
||||
<div class="container">
|
||||
<q-tabs
|
||||
v-if="!ispageCatalogata"
|
||||
v-if="showListaArgomenti"
|
||||
v-model="tabvisu"
|
||||
dense
|
||||
class="bg-indigo text-white"
|
||||
@@ -121,7 +150,7 @@
|
||||
>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
v-if="!ispageCatalogata"
|
||||
v-if="showListaArgomenti"
|
||||
name="autori"
|
||||
icon="fas fa-user"
|
||||
label="Autori"
|
||||
@@ -134,7 +163,7 @@
|
||||
>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
v-if="!ispageCatalogata"
|
||||
v-if="showListaArgomenti"
|
||||
name="ricerca"
|
||||
icon="fas fa-search"
|
||||
label="Cerca"
|
||||
@@ -154,23 +183,20 @@
|
||||
keep-alive
|
||||
>
|
||||
<q-tab-panel
|
||||
v-if="!ispageCatalogata"
|
||||
v-if="showListaArgomenti"
|
||||
name="categorie"
|
||||
>
|
||||
<div class="row justify-center q-mx-auto bg-blue-1">
|
||||
<div
|
||||
v-for="(reccat, index) in getCatProds()"
|
||||
:key="index"
|
||||
>
|
||||
<span
|
||||
:class="{
|
||||
category: true,
|
||||
category_sel: cat === reccat.value,
|
||||
}"
|
||||
<div class="categories">
|
||||
<div
|
||||
v-for="(reccat, index) in getCatProds()"
|
||||
:key="index"
|
||||
class="category"
|
||||
:class="{ category_sel: cat === reccat.value }"
|
||||
@click="cat = reccat.value"
|
||||
>{{ reccat.label }}
|
||||
</span>
|
||||
|
|
||||
>
|
||||
{{ reccat.label }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
@@ -261,7 +287,7 @@
|
||||
</q-tab-panels>
|
||||
|
||||
<div
|
||||
v-if="!ispageCatalogata"
|
||||
v-if="showListaArgomenti"
|
||||
class="row justify-center q-mx-auto"
|
||||
>
|
||||
<q-select
|
||||
|
||||
Reference in New Issue
Block a user