- Dynamic Pages (MyPage)
- Uploading files to the Server FTP.
This commit is contained in:
@@ -39,21 +39,22 @@
|
||||
<q-icon v-if="canEdit" name="event" class="cursor-pointer">
|
||||
<q-popup-proxy v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing">
|
||||
|
||||
<q-date-time-scroller
|
||||
<q-scroller
|
||||
v-model="myvalue"
|
||||
view="date-time"
|
||||
:locale="toolsext.getLocale()"
|
||||
:hour24-format="true"
|
||||
:rounded-borders="true"
|
||||
border-color="#2196f3"
|
||||
bar-color="#2196f3"
|
||||
color="white"
|
||||
background-color="primary"
|
||||
inner-color="primary"
|
||||
inner-background-color="white"
|
||||
text-color="white"
|
||||
color="primary"
|
||||
minute-interval="5"
|
||||
inner-text-color="primary"
|
||||
inner-color="white"
|
||||
:style="scrollerPopupStyle280"
|
||||
@input="changeval"
|
||||
@close="() => { savetoclose(); }"
|
||||
/>
|
||||
></q-scroller>
|
||||
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
|
||||
@@ -10,6 +10,17 @@ $graytext: #555;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.my-event-rel {
|
||||
width: 100%;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.25rem;
|
||||
text-align: center;
|
||||
vertical-align: center;
|
||||
margin-bottom: 5px;
|
||||
cursor: pointer;
|
||||
padding: 4px 2px 4px 2px !important;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
background-color: #ccc;
|
||||
padding: 10px;
|
||||
|
||||
@@ -17,8 +17,6 @@ import { CMySelect } from '../../components/CMySelect/index'
|
||||
import { CMyEditor } from '../../components/CMyEditor/index'
|
||||
import { stop, prevent, stopAndPrevent } from 'quasar/src/utils/event'
|
||||
|
||||
import QDateScroller from '@quasar/quasar-app-extension-qscroller/src/component/QDateScroller'
|
||||
import QDateTimeScroller from '@quasar/quasar-app-extension-qscroller/src/component/QDateTimeScroller'
|
||||
import { CTodo } from '@src/components/todos/CTodo'
|
||||
import { SingleProject } from '@src/components/projects/SingleProject'
|
||||
import { IEvents } from '@src/model'
|
||||
@@ -46,8 +44,6 @@ import { CMyTeacher } from '../CMyTeacher'
|
||||
Footer,
|
||||
CTitle,
|
||||
CImgText,
|
||||
QDateTimeScroller,
|
||||
QDateScroller,
|
||||
CMySelect,
|
||||
CMyEditor,
|
||||
CDateTime,
|
||||
@@ -277,7 +273,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
}
|
||||
|
||||
get dayHeight() {
|
||||
if (Screen.height < 500)
|
||||
if (Screen.height < 400)
|
||||
return 80
|
||||
else if (Screen.height < 500)
|
||||
return 100
|
||||
if (Screen.height < 700)
|
||||
return 110
|
||||
@@ -1027,5 +1025,8 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
public getTitleEv(event: IEvents) {
|
||||
return (!!event.short_tit) ? event.short_tit : event.title
|
||||
}
|
||||
public getLongTitleEv(event: IEvents) {
|
||||
return event.title
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -403,17 +403,19 @@
|
||||
<!--v-touch-swipe.mouse.left.right="handleSwipe" -->
|
||||
|
||||
<!-- the calendar -->
|
||||
<q-page v-if="visuAllCal && showfirstN === 0" class="column" style="min-height: 500px !important;">
|
||||
<q-page v-if="visuAllCal && showfirstN === 0" class="column" style="min-height: 200px !important;">
|
||||
|
||||
<div>
|
||||
<q-toolbar class="mytoolbar">
|
||||
<q-btn color="primary" round icon="keyboard_arrow_left" @click="calendarPrev"/>
|
||||
<q-btn color="primary" round icon="keyboard_arrow_right" @click="calendarNext"/>
|
||||
<q-separator vertical/>
|
||||
<q-btn color="primary" :label="$t('dialog.today')" class="q-mx-md" @click="SetToday"></q-btn>
|
||||
<!--<q-btn color="primary" :label="$t('dialog.today')" class="q-mx-md" @click="SetToday"></q-btn>-->
|
||||
<q-separator vertical/>
|
||||
<q-btn label="GG" color="primary" @click="calendarView = 'day'"/>
|
||||
<q-btn label="Set" color="primary" @click="calendarView = 'week'"/>
|
||||
<!--<q-btn label="GG" color="primary" @click="calendarView = 'day'"/>
|
||||
<q-btn label="Set" color="primary" @click="calendarView = 'week'"/>-->
|
||||
<q-btn label="5 GG" color="primary" @click="calendarView = '5day-agenda'"/>
|
||||
<q-btn label="Sett" color="primary" @click="calendarView = 'week-agenda'"/>
|
||||
<q-btn label="Mese" color="primary" @click="calendarView = 'month'"/>
|
||||
<q-space/>
|
||||
</q-toolbar>
|
||||
@@ -497,23 +499,6 @@
|
||||
<template #day-header="{ date }">
|
||||
<div class="row justify-center">
|
||||
<template v-for="(event, index) in eventsMap[date]">
|
||||
<!--<q-badge-->
|
||||
<!--v-if="event.allday"-->
|
||||
<!--:key="index"-->
|
||||
<!--style="width: 100%; cursor: pointer;"-->
|
||||
<!--class="ellipsis"-->
|
||||
<!--:class="badgeClasses(event, 'header')"-->
|
||||
<!--:style="badgeStyles(event, 'header')"-->
|
||||
<!--@click.stop.prevent="showEvent(event)"-->
|
||||
<!--:draggable="true"-->
|
||||
<!--@dragstart.native="(e) => onDragStart(e, event)"-->
|
||||
<!--@dragend.native="(e) => onDragEnd(e, event)"-->
|
||||
<!--@dragenter.native="(e) => onDragEnter(e, event)"-->
|
||||
<!--@touchmove.native="(e) => {}"-->
|
||||
<!-->-->
|
||||
<!--<q-icon v-if="event.icon" :name="event.icon" class="q-mr-xs"></q-icon>-->
|
||||
<!--<span class="ellipsis">{{ event.title }}</span>-->
|
||||
<!--</q-badge>-->
|
||||
<q-badge
|
||||
:key="index"
|
||||
class="q-ma-xs"
|
||||
@@ -526,6 +511,42 @@
|
||||
</template>
|
||||
<template #day-body="{ date, timeStartPos, timeDurationHeight }">
|
||||
<template v-for="(event, index) in getEvents(date)">
|
||||
<div
|
||||
:key="index"
|
||||
:label="tools.getstrTime(event.dateTimeStart)"
|
||||
class="justify-start q-ma-sm shadow-5 bg-blue-grey-6"
|
||||
>
|
||||
<div v-if="getImgEvent(event)" class="row justify-center"
|
||||
style="margin-top: 30px; width: 100%;">
|
||||
<q-avatar
|
||||
style="margin-top: -25px; margin-bottom: 10px; font-size: 60px; max-height: 50px;">
|
||||
<img :src="getImgEvent(event)" style="border: #a4edf6 solid 5px;">
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div class="col-12 q-px-xs text-white">
|
||||
<strong>{{ tools.getstrTime(event.dateTimeStart) }}</strong>
|
||||
</div>
|
||||
<div v-if="getTitleEv(event)" class="col-12 q-px-xs text-white"
|
||||
style="font-size: 0.75rem;">
|
||||
<q-badge
|
||||
:key="index"
|
||||
multi-line
|
||||
class="my-event-rel justify-center rounded-borders"
|
||||
:class="badgeClasses(event, 'body')"
|
||||
:style="badgeStyles(event, 'body', timeStartPos, timeDurationHeight)"
|
||||
@click.stop.prevent="showEvent(event)"
|
||||
:draggable="tools.isManager()"
|
||||
@dragstart.native="(e) => onDragStart(e, event)"
|
||||
@dragend.native="(e) => onDragEnd(e, event)"
|
||||
@dragenter.native="(e) => onDragEnter(e, event)"
|
||||
@touchmove.native="(e) => {}"
|
||||
>
|
||||
<span class="">{{ getTitleEv(event) }}</span> <br>
|
||||
|
||||
</q-badge>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<q-badge
|
||||
:key="index"
|
||||
class="my-event justify-center"
|
||||
@@ -539,8 +560,14 @@
|
||||
@touchmove.native="(e) => {}"
|
||||
>
|
||||
<q-icon v-if="event.icon" :name="event.icon" class="q-mr-xs"></q-icon>
|
||||
<span class="">{{ getTitleEv(event) }}</span>
|
||||
</q-badge>
|
||||
<p class="">{{ getTitleEv(event) }}</p> <br>
|
||||
<div class="text-center"><img :src="getImgEvent(event)"
|
||||
class="text-center listaev__tdimg_small"
|
||||
:alt="event.title">
|
||||
</div>
|
||||
|
||||
|
||||
</q-badge> -->
|
||||
</template>
|
||||
</template>
|
||||
</q-calendar>
|
||||
@@ -651,7 +678,8 @@
|
||||
|
||||
<q-chip>
|
||||
<q-avatar v-if="getWhereIcon(event.wherecode)">
|
||||
<img :src="`../../statics/images/avatar/` + getWhereIcon(event.wherecode)" :alt="event.wherecode">
|
||||
<img :src="`../../statics/images/avatar/` + getWhereIcon(event.wherecode)"
|
||||
:alt="event.wherecode">
|
||||
</q-avatar>
|
||||
<q-avatar color="blue" font-size="20px" text-color="white" icon="home">
|
||||
</q-avatar>
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
||||
@input="Savedb"></q-toggle>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.html">
|
||||
<div v-html="visuValByType(myvalue, col, row)">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ visuValByType(myvalue, col, row) }}
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,10 @@ export default class MenuOne extends Vue {
|
||||
// return this.$route.path
|
||||
// }
|
||||
|
||||
get isfinishLoading() {
|
||||
return GlobalStore.state.finishLoading
|
||||
}
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="no-border">
|
||||
<div class="no-border" v-if="isfinishLoading">
|
||||
<q-list class="rounded-borders text-primary">
|
||||
<template v-for="(parent, index) in getmenu">
|
||||
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
||||
|
||||
@@ -49,6 +49,23 @@ export interface ITeachUname {
|
||||
username?: string
|
||||
}
|
||||
|
||||
export interface IMyPage {
|
||||
_id?: string
|
||||
author_username?: string
|
||||
title?: string
|
||||
icon?: string
|
||||
path?: string
|
||||
keywords?: string
|
||||
description?: string
|
||||
content?: string
|
||||
active?: boolean
|
||||
inmenu?: boolean
|
||||
submenu?: boolean
|
||||
l_par?: number,
|
||||
l_child?: number,
|
||||
infooter?: boolean
|
||||
}
|
||||
|
||||
export interface INewsToSent {
|
||||
_id: string
|
||||
idapp?: string
|
||||
@@ -132,6 +149,7 @@ export interface IGlobalState {
|
||||
settings: ISettings[],
|
||||
disciplines: IDiscipline[],
|
||||
newstosent: INewsToSent[],
|
||||
mypage: IMyPage[],
|
||||
templemail: ITemplEmail[],
|
||||
opzemail: ISettings[],
|
||||
mailinglist: IMailinglist[],
|
||||
@@ -324,6 +342,7 @@ export interface ITableRec {
|
||||
collabel: string
|
||||
colicon?: string
|
||||
onlyAdmin?: boolean
|
||||
noshow: boolean
|
||||
}
|
||||
|
||||
export interface IDataPass {
|
||||
|
||||
@@ -19,6 +19,8 @@ const msgglobal = {
|
||||
userlist: 'Lista Utenti',
|
||||
tableslist: 'Lista Tabelle',
|
||||
newsletter: 'Newsletter',
|
||||
pages: 'Pagine',
|
||||
media: 'Media',
|
||||
},
|
||||
manage: {
|
||||
menu: 'Gestione',
|
||||
@@ -379,6 +381,8 @@ const msgglobal = {
|
||||
userlist: 'Lista de usuarios',
|
||||
tableslist: 'Listado de tablas',
|
||||
newsletter: 'Newsletter',
|
||||
pages: 'Páginas',
|
||||
media: 'Medios',
|
||||
},
|
||||
manage: {
|
||||
menu: 'Gestionar',
|
||||
@@ -730,6 +734,8 @@ const msgglobal = {
|
||||
userlist: 'Liste d\'utilisateurs',
|
||||
tableslist: 'Liste des tables',
|
||||
newsletter: 'Newsletter',
|
||||
pages: 'Pages',
|
||||
media: 'Médias',
|
||||
},
|
||||
manage: {
|
||||
menu: 'Gérer',
|
||||
@@ -1080,6 +1086,8 @@ const msgglobal = {
|
||||
userlist: 'Users List',
|
||||
tableslist: 'List of tables',
|
||||
newsletter: 'Newsletter',
|
||||
pages: 'Pages',
|
||||
media: 'Medias',
|
||||
},
|
||||
manage: {
|
||||
menu: 'Manage',
|
||||
@@ -1429,6 +1437,8 @@ const msgglobal = {
|
||||
userlist: 'Users List',
|
||||
tableslist: 'List of tables',
|
||||
newsletter: 'Newsletter',
|
||||
pages: 'Pages',
|
||||
media: 'Medias',
|
||||
},
|
||||
manage: {
|
||||
menu: 'Manage',
|
||||
|
||||
@@ -2,12 +2,12 @@ function geturl() {
|
||||
const miaurl = document.location.href
|
||||
|
||||
if (miaurl.includes('test.')) {
|
||||
return 'https://test.freeplanet.app/'
|
||||
return 'https://test.associazioneshen.it/'
|
||||
} else {
|
||||
if (miaurl.includes('localhost')) {
|
||||
return 'http://localhost:8080/'
|
||||
} else {
|
||||
return 'https://freeplanet.app/'
|
||||
return 'https://associazioneshen.it/'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,12 +18,12 @@ function getidtrack() {
|
||||
if (miaurl.includes('test.') || miaurl.includes('localhost')) {
|
||||
return '4c40a07bc88a9c50c9b70dc9c5cd8e2e'
|
||||
} else {
|
||||
return '9853abef079fc8330ab188a9cbf07a0c'
|
||||
return 'ccfd6c90e17b6809f9717675764c3f5d' // Associazione Shen
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var owa_baseUrl = geturl() + 'owa/';
|
||||
let owa_baseUrl = geturl() + 'owa/';
|
||||
if (owa_cmds)
|
||||
var owa_cmds = [];
|
||||
else
|
||||
@@ -33,11 +33,11 @@ owa_cmds.push(['trackPageView']);
|
||||
// owa_cmds.push(['trackClicks']);
|
||||
|
||||
(function () {
|
||||
var _owa = document.createElement('script');
|
||||
const _owa = document.createElement('script');
|
||||
_owa.type = 'text/javascript';
|
||||
_owa.async = true;
|
||||
owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl);
|
||||
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
|
||||
var _owa_s = document.getElementsByTagName('script')[0];
|
||||
const _owa_s = document.getElementsByTagName('script')[0];
|
||||
_owa_s.parentNode.insertBefore(_owa, _owa_s);
|
||||
}());
|
||||
|
||||
@@ -24,6 +24,7 @@ import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
import { IUserState } from '@src/model'
|
||||
import { Calendar } from 'element-ui'
|
||||
import { fieldsTable } from '@src/store/Modules/fieldsTable'
|
||||
import router from '@router'
|
||||
// import { static_data } from '@src/db/static_data'
|
||||
|
||||
let stateConnDefault = 'online'
|
||||
@@ -75,7 +76,8 @@ const state: IGlobalState = {
|
||||
disciplines: [],
|
||||
autoplaydisc: 8000,
|
||||
newstosent: [],
|
||||
mailinglist: []
|
||||
mailinglist: [],
|
||||
mypage: []
|
||||
}
|
||||
|
||||
async function getConfig(id) {
|
||||
@@ -131,6 +133,12 @@ namespace Getters {
|
||||
|
||||
}, 'showtype')
|
||||
|
||||
const getPage = b.read((mystate: IGlobalState) => (path) => {
|
||||
// const config = state.arrConfig.find(item => item._id === cat + costanti.CONFIG_ID_SHOW_TYPE_TODOS)
|
||||
return mystate.mypage.find((page) => (`/` + page.path) === path)
|
||||
|
||||
}, 'getPage')
|
||||
|
||||
const getmenu = b.read((state) => {
|
||||
// console.log('getmenu', cfgrouter.getmenu())
|
||||
|
||||
@@ -180,6 +188,8 @@ namespace Getters {
|
||||
return GlobalStore.state.opzemail
|
||||
else if (table === tools.TABMAILINGLIST)
|
||||
return GlobalStore.state.mailinglist
|
||||
else if (table === tools.TABMYPAGE)
|
||||
return GlobalStore.state.mypage
|
||||
else if (table === 'bookings')
|
||||
return CalendarStore.state.bookedevent
|
||||
else if (table === 'users')
|
||||
@@ -277,6 +287,10 @@ namespace Getters {
|
||||
return gettemplemailbyId()
|
||||
},
|
||||
|
||||
get getPage() {
|
||||
return getPage()
|
||||
},
|
||||
|
||||
get t() {
|
||||
return t()
|
||||
},
|
||||
@@ -761,6 +775,7 @@ namespace Actions {
|
||||
if (showall) {
|
||||
GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []
|
||||
GlobalStore.state.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : []
|
||||
GlobalStore.state.mypage = (res.data.mypage) ? [...res.data.mypage] : []
|
||||
}
|
||||
|
||||
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
|
||||
@@ -787,6 +802,47 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
async function addDynamicPages(context) {
|
||||
|
||||
const arrpagesroute: IListRoutes[] = []
|
||||
for (const page of state.mypage) {
|
||||
arrpagesroute.push({
|
||||
path: '/' + page.path,
|
||||
name: undefined,
|
||||
text: page.title,
|
||||
materialIcon: page.icon,
|
||||
component: () => import('@/root/mypage/mypage.vue'),
|
||||
inmenu: page.inmenu,
|
||||
infooter: page.infooter,
|
||||
level_child: page.l_child,
|
||||
level_parent: page.l_par,
|
||||
})
|
||||
}
|
||||
|
||||
const last = {
|
||||
path: '*',
|
||||
materialIcon: 'fas fa-calendar-plus',
|
||||
name: 'otherpages.error404def',
|
||||
component: () => import('@/root/My404page/My404page.vue'),
|
||||
inmenu: false,
|
||||
infooter: false
|
||||
}
|
||||
|
||||
static_data.routes = [...static_data.routes, ...arrpagesroute, last]
|
||||
|
||||
router.addRoutes([...arrpagesroute, last])
|
||||
}
|
||||
|
||||
async function sendFile(context, formdata) {
|
||||
try {
|
||||
const { data } = await Api.postFormData('/upload', formdata)
|
||||
console.log(data)
|
||||
|
||||
} catch (e) {
|
||||
console.log('Error sendFile: ', e)
|
||||
}
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
setConta: b.dispatch(setConta),
|
||||
createPushSubscription: b.dispatch(createPushSubscription),
|
||||
@@ -802,7 +858,8 @@ namespace Actions {
|
||||
saveTable: b.dispatch(saveTable),
|
||||
DeleteRec: b.dispatch(DeleteRec),
|
||||
sendEmailTest: b.dispatch(sendEmailTest),
|
||||
DuplicateRec: b.dispatch(DuplicateRec)
|
||||
DuplicateRec: b.dispatch(DuplicateRec),
|
||||
addDynamicPages: b.dispatch(addDynamicPages)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -688,32 +688,42 @@ namespace Actions {
|
||||
|
||||
async function setGlobal(isLogged: boolean) {
|
||||
console.log('setGlobal')
|
||||
// state.isLogged = true
|
||||
if (isLogged) {
|
||||
// console.log('state.isLogged', state.isLogged)
|
||||
try {
|
||||
// state.isLogged = true
|
||||
if (isLogged) {
|
||||
// console.log('state.isLogged', state.isLogged)
|
||||
|
||||
GlobalStore.mutations.setleftDrawerOpen(localStorage.getItem(tools.localStorage.leftDrawerOpen) === 'true')
|
||||
GlobalStore.mutations.setCategorySel(localStorage.getItem(tools.localStorage.categorySel))
|
||||
GlobalStore.mutations.setleftDrawerOpen(localStorage.getItem(tools.localStorage.leftDrawerOpen) === 'true')
|
||||
GlobalStore.mutations.setCategorySel(localStorage.getItem(tools.localStorage.categorySel))
|
||||
|
||||
GlobalStore.actions.checkUpdates()
|
||||
GlobalStore.actions.checkUpdates()
|
||||
}
|
||||
|
||||
const p3 = await GlobalStore.actions.loadAfterLogin()
|
||||
|
||||
state.isLogged = isLogged
|
||||
|
||||
if (static_data.functionality.ENABLE_TODOS_LOADING)
|
||||
await Todos.actions.dbLoad({ checkPending: true })
|
||||
|
||||
if (static_data.functionality.ENABLE_PROJECTS_LOADING)
|
||||
await Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
|
||||
|
||||
console.log('add routes')
|
||||
|
||||
GlobalStore.actions.addDynamicPages()
|
||||
|
||||
GlobalStore.state.finishLoading = true
|
||||
if (tools.isDebug())
|
||||
console.log('finishLoading', GlobalStore.state.finishLoading)
|
||||
|
||||
// document.dispatchEvent(new Event('custom-post-render-event'))
|
||||
|
||||
} catch (e) {
|
||||
console.error('Error', e)
|
||||
GlobalStore.state.finishLoading = true
|
||||
}
|
||||
|
||||
const p3 = await GlobalStore.actions.loadAfterLogin()
|
||||
|
||||
state.isLogged = isLogged
|
||||
|
||||
if (static_data.functionality.ENABLE_TODOS_LOADING)
|
||||
await Todos.actions.dbLoad({ checkPending: true })
|
||||
|
||||
if (static_data.functionality.ENABLE_PROJECTS_LOADING)
|
||||
await Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
|
||||
|
||||
GlobalStore.state.finishLoading = true
|
||||
if (tools.isDebug())
|
||||
console.log('finishLoading', GlobalStore.state.finishLoading)
|
||||
|
||||
// document.dispatchEvent(new Event('custom-post-render-event'))
|
||||
|
||||
return true
|
||||
// console.log('setGlobal: END')
|
||||
}
|
||||
|
||||
@@ -62,6 +62,25 @@ export const colmailinglist = [
|
||||
AddCol(DeleteRec)
|
||||
]
|
||||
|
||||
export const colmypage = [
|
||||
AddCol({ name: 'title', label_trans: 'pages.title' }),
|
||||
AddCol({ name: 'path', label_trans: 'pages.path' }),
|
||||
AddCol({ name: 'icon', label_trans: 'pages.icon' }),
|
||||
AddCol({ name: 'keywords', label_trans: 'pages.keywords' }),
|
||||
AddCol({ name: 'description', label_trans: 'pages.description' }),
|
||||
AddCol({ name: 'heightimg', label_trans: 'pages.heightimg', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'imgback', label_trans: 'pages.imgback', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'content', label_trans: 'pages.content', fieldtype: tools.FieldType.html }),
|
||||
AddCol({ name: 'active', label_trans: 'pages.active', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'inmenu', label_trans: 'pages.inmenu', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'submenu', label_trans: 'pages.submenu', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'l_par', label_trans: 'pages.l_par', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'l_child', label_trans: 'pages.l_child', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'infooter', label_trans: 'pages.infooter', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec)
|
||||
]
|
||||
|
||||
export const colopzemail = [
|
||||
AddCol({ name: 'key', label_trans: 'col.key' }),
|
||||
AddCol({ name: 'label_it', label_trans: 'col.label' }),
|
||||
@@ -338,6 +357,9 @@ export const fieldsTable = {
|
||||
return ''
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// IColGridTable
|
||||
colTableUsers: [
|
||||
AddCol({ name: 'username', label_trans: 'reg.username' }),
|
||||
@@ -393,14 +415,16 @@ export const fieldsTable = {
|
||||
label: 'Newsletter da Inviare',
|
||||
columns: colnewstosent,
|
||||
colkey: '_id',
|
||||
collabel: 'label'
|
||||
collabel: 'label',
|
||||
onlyAdmin: true
|
||||
},
|
||||
{
|
||||
value: 'templemail',
|
||||
label: 'Template Email',
|
||||
columns: coltemplemail,
|
||||
colkey: '_id',
|
||||
collabel: 'subject'
|
||||
collabel: 'subject',
|
||||
onlyAdmin: true
|
||||
},
|
||||
{
|
||||
value: 'opzemail',
|
||||
@@ -423,13 +447,15 @@ export const fieldsTable = {
|
||||
columns: colTablePermission,
|
||||
colkey: 'value',
|
||||
collabel: 'label',
|
||||
colicon: 'icon'
|
||||
colicon: 'icon',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'fieldstype',
|
||||
label: 'Tipi di Campi',
|
||||
colkey: 'value',
|
||||
collabel: 'label'
|
||||
collabel: 'label',
|
||||
noshow: true,
|
||||
},
|
||||
{
|
||||
value: 'settings',
|
||||
@@ -443,6 +469,6 @@ export const fieldsTable = {
|
||||
|
||||
export const func = {
|
||||
gettablesList() {
|
||||
return fieldsTable.tablesList.filter((rec) => (rec.onlyAdmin === UserStore.state.isAdmin) || (!rec.onlyAdmin))
|
||||
return fieldsTable.tablesList.filter((rec) => (rec.onlyAdmin === UserStore.state.isAdmin) || (!rec.onlyAdmin) && (!rec.noshow))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ export const tools = {
|
||||
TABEVENTS: 'myevents',
|
||||
TABNEWSLETTER: 'newstosent',
|
||||
TABMAILINGLIST: 'mailinglist',
|
||||
TABMYPAGE: 'mypage',
|
||||
TABTEMPLEMAIL: 'templemail',
|
||||
TABOPZEMAIL: 'opzemail',
|
||||
|
||||
@@ -2669,15 +2670,15 @@ export const tools = {
|
||||
|
||||
return mywidth
|
||||
} else {
|
||||
console.log('this.getwidth(mythis) = ', this.getwidth(mythis))
|
||||
// console.log('this.getwidth(mythis) = ', this.getwidth(mythis))
|
||||
let myw = mywidth + ((this.getwidth(mythis) - mywidth) * 0.6)
|
||||
console.log('myw1 = ', myw)
|
||||
// console.log('myw1 = ', myw)
|
||||
if (myw > maxwidth)
|
||||
myw = maxwidth
|
||||
if (myw > this.getwidth(mythis) - 20)
|
||||
myw = this.getwidth(mythis) - 20
|
||||
|
||||
console.log('myw = ', myw)
|
||||
// console.log('myw = ', myw)
|
||||
return myw
|
||||
}
|
||||
},
|
||||
@@ -2823,7 +2824,8 @@ export const tools = {
|
||||
},
|
||||
isDebug() {
|
||||
return process.env.DEV
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
|
||||
@@ -3,7 +3,6 @@ import { Component } from 'vue-property-decorator'
|
||||
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
|
||||
|
||||
@Component({})
|
||||
export default class TableOnlyView extends Vue {
|
||||
public loading: boolean = false
|
||||
@@ -28,8 +27,7 @@ export default class TableOnlyView extends Vue {
|
||||
public filter: string = ''
|
||||
public selected: any[] = []
|
||||
|
||||
|
||||
request(props) {
|
||||
public request(props) {
|
||||
this.loading = true
|
||||
setTimeout(() => {
|
||||
this.serverPagination = props.pagination
|
||||
@@ -53,7 +51,7 @@ export default class TableOnlyView extends Vue {
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
mounted() {
|
||||
public mounted() {
|
||||
this.request({
|
||||
pagination: this.serverPagination,
|
||||
filter: this.filter
|
||||
|
||||
Reference in New Issue
Block a user