- gestione dell'editor delle pagine (non funzionante!)
This commit is contained in:
@@ -1037,11 +1037,6 @@ export const colmypage = [
|
||||
}),
|
||||
AddCol({ name: 'title', label_trans: 'pages.title' }),
|
||||
AddCol({ name: 'subtitle', label_trans: 'pages.subtitle' }),
|
||||
AddCol({
|
||||
name: 'mainMenu',
|
||||
label_trans: 'pages.mainMenu',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'sottoMenu',
|
||||
label_trans: 'pages.sottoMenu',
|
||||
|
||||
@@ -3471,7 +3471,9 @@ export const tools = {
|
||||
) {
|
||||
let mystr = '';
|
||||
// is same day?
|
||||
if (tools.getstrDate(myevent.dateTimeStart) === tools.getstrDate(myevent.dateTimeEnd)) {
|
||||
if (
|
||||
tools.getstrDate(myevent.dateTimeStart) === tools.getstrDate(myevent.dateTimeEnd)
|
||||
) {
|
||||
if (withhtml) {
|
||||
mystr += `<span class="cal__where-content">${tools.getstrDateLong(myevent.dateTimeStart)}</span>
|
||||
<span class="cal__hours-content">${$t('cal.starttime')} ${tools.getstrTime(myevent.dateTimeStart)}
|
||||
@@ -5058,13 +5060,13 @@ export const tools = {
|
||||
},
|
||||
|
||||
removeatIniziale(mystr: string) {
|
||||
mystr = mystr.trim()
|
||||
mystr = mystr.trim();
|
||||
|
||||
// remove @ from the beginning
|
||||
if (mystr.startsWith('@')) {
|
||||
mystr = mystr.substring(1);
|
||||
}
|
||||
return mystr
|
||||
return mystr;
|
||||
},
|
||||
|
||||
removespaces_slash(mystr: string) {
|
||||
@@ -5716,7 +5718,7 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
getLinkUserTelegramAportador() {
|
||||
const aportador = this.getAportadorSolidario()
|
||||
const aportador = this.getAportadorSolidario();
|
||||
if (aportador) {
|
||||
if (userprofile.profile?.username_telegram) {
|
||||
return 'https://t.me/' + userprofile.profile.username_telegram;
|
||||
@@ -7782,7 +7784,6 @@ export const tools = {
|
||||
if (userStore.my.profile.manage_mygroups) {
|
||||
const ris = userStore.my.profile.manage_mygroups.find((grp: IMyGroup) => {
|
||||
if (grp.groupname === groupname) {
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -8110,7 +8111,10 @@ export const tools = {
|
||||
const rec = arrmultisel.find((rec) => rec.table === table);
|
||||
if (rec) {
|
||||
ris = tools.getCookie(
|
||||
tools.COOK_SEARCH + table + '_' + tools.getCookie(tools.COOK_SEARCH + rec.join, 0),
|
||||
tools.COOK_SEARCH +
|
||||
table +
|
||||
'_' +
|
||||
tools.getCookie(tools.COOK_SEARCH + rec.join, 0),
|
||||
mydef
|
||||
);
|
||||
}
|
||||
@@ -8302,9 +8306,13 @@ export const tools = {
|
||||
// console.log('arrimage', arrimage)
|
||||
|
||||
if (shared_consts.TABLES_DIRECTORY_A_PARTE.includes(table)) {
|
||||
return tools.getDirUpload() + `${table}/` + groupname + '/' + arrimage[0]?.imagefile;
|
||||
return (
|
||||
tools.getDirUpload() + `${table}/` + groupname + '/' + arrimage[0]?.imagefile
|
||||
);
|
||||
} else if (shared_consts.TABLES_DIRECTORY_SINGLE_IMG.includes(table)) {
|
||||
return tools.getDirUpload() + `${table}/` + groupname + '/' + arrimage[0]?.imagefile;
|
||||
return (
|
||||
tools.getDirUpload() + `${table}/` + groupname + '/' + arrimage[0]?.imagefile
|
||||
);
|
||||
} else {
|
||||
// console.log('username', username, 'table', table)
|
||||
if (arrimage && arrimage.length > 0) {
|
||||
@@ -9010,11 +9018,17 @@ export const tools = {
|
||||
);
|
||||
} else return '';
|
||||
} else if (elem.type === shared_consts.ELEMTYPE.IMAGE) {
|
||||
return elem.container ? tools.getDirUpload() + 'pages/' + mypath + '/' + elem.container + addtourl : '';
|
||||
return elem.container
|
||||
? tools.getDirUpload() + 'pages/' + mypath + '/' + elem.container + addtourl
|
||||
: '';
|
||||
} else if (elem.type === shared_consts.ELEMTYPE.QRCODE) {
|
||||
return elem.image ? tools.getDirUpload() + 'pages/' + mypath + '/' + elem.image + addtourl : '';
|
||||
return elem.image
|
||||
? tools.getDirUpload() + 'pages/' + mypath + '/' + elem.image + addtourl
|
||||
: '';
|
||||
} else {
|
||||
return elem.image ? tools.getDirUpload() + 'pages/' + mypath + '/' + elem.image + addtourl : '';
|
||||
return elem.image
|
||||
? tools.getDirUpload() + 'pages/' + mypath + '/' + elem.image + addtourl
|
||||
: '';
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -10191,7 +10205,7 @@ export const tools = {
|
||||
indrec,
|
||||
mysubsubkey,
|
||||
specialField,
|
||||
recordFull,
|
||||
recordFull
|
||||
);
|
||||
myval = newval.vers_img;
|
||||
const mykey2 = 'vers_img';
|
||||
@@ -10207,7 +10221,7 @@ export const tools = {
|
||||
indrec,
|
||||
mysubsubkey,
|
||||
specialField,
|
||||
recordFull,
|
||||
recordFull
|
||||
);
|
||||
|
||||
eseguito = true;
|
||||
@@ -11157,7 +11171,7 @@ export const tools = {
|
||||
// Restituisce il colore con trasparenza in formato rgba
|
||||
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
||||
} else {
|
||||
return ''
|
||||
return '';
|
||||
}
|
||||
},
|
||||
|
||||
@@ -11174,6 +11188,23 @@ export const tools = {
|
||||
return Math.ceil((pastDaysOfYear + startOfYear.getDay() + 1) / 7);
|
||||
},
|
||||
|
||||
getmenuByPath(path: string) {
|
||||
const myroutes = static_data.routes;
|
||||
|
||||
const normalized = this.norm(path);
|
||||
|
||||
const mymenus = myroutes.find((menu: any) => menu.path === normalized);
|
||||
|
||||
return mymenus;
|
||||
},
|
||||
|
||||
norm(path: string): string {
|
||||
return path
|
||||
.trim()
|
||||
.replace(/^\/+|\/+$/g, '')
|
||||
.toLowerCase();
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
@@ -823,7 +823,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
level_parent: page.l_par,
|
||||
submenu: page.submenu,
|
||||
extraclass: page.extraclass,
|
||||
mainMenu: page.mainMenu,
|
||||
sottoMenu: page.sottoMenu,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user