Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Resisze Panel (#191)
Browse files Browse the repository at this point in the history
* Resisze Panel

* support mobile
  • Loading branch information
elsiosanchez authored Jun 21, 2022
1 parent f51ebed commit 689fb13
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 42 deletions.
2 changes: 2 additions & 0 deletions src/lang/ADempiere/en/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const window = {
callout: {
error: 'Error In Callout'
},
toggleSingle: 'Toggle Single',
multiRecord: 'Multi Record',
gridToggle: 'Toggle single/multi record',
toggleTabContentVisibility: 'Toggle tab content visibility'
}
Expand Down
2 changes: 2 additions & 0 deletions src/lang/ADempiere/es/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const window = {
callout: {
error: 'Error En Callout'
},
toggleSingle: 'Cambiar Mono',
multiRecord: 'Multi Registro',
gridToggle: 'Cambiar mono/multi registro',
toggleTabContentVisibility: 'Cambiar visibilidad del contenido de la pestaña'
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/components/AppMain.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section id="appMain" class="app-main">
<section id="appMain" style="height: 100%;">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key" />
Expand Down
1 change: 1 addition & 0 deletions src/layout/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default {
@include clearfix;
position: relative;
height: 100%;
overflow: hidden;
width: 100%;
&.mobile.openSidebar {
Expand Down
1 change: 0 additions & 1 deletion src/styles/ADempiere/view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
.view-base {
// TODO: Add display stop for views without fields (like cache reset process)
height: 100%;
min-height: calc(100vh - 84px);
}

.content-collapse {
Expand Down
1 change: 0 additions & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ div:focus {
}

aside {
background: #eef1f6;
padding: 8px 24px;
margin-bottom: 20px;
border-radius: 2px;
Expand Down
93 changes: 59 additions & 34 deletions src/views/ADempiere/Window/MultiTabWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,49 @@
-->

<template>
<div>
<embedded
:visible="showRecordAccess"
>
<record-access />
</embedded>

<tab-manager
:parent-uuid="windowMetadata.uuid"
:container-manager="containerManager"
:tabs-list="windowMetadata.tabsListParent"
:all-tabs-list="allTabsList"
:references-manager="referencesManager"
:actions-manager="actionsManager"
/>

<tab-manager-child
v-if="isWithChildsTab"
:parent-uuid="windowMetadata.uuid"
:container-manager="containerManager"
:tabs-list="windowMetadata.tabsListChild"
:all-tabs-list="allTabsList"
:references-manager="referencesManager"
:actions-manager="actionsManager"
/>

<modal-dialog
v-if="!isEmptyValue(processUuid)"
:container-manager="containerManagerProcess"
:parent-uuid="currentTabUuid"
:container-uuid="processUuid"
/>
</div>
<el-container style="height: 100%!important;">
<el-main id="mainWindow">
<embedded
:visible="showRecordAccess"
>
<record-access />
</embedded>
<tab-manager
:parent-uuid="windowMetadata.uuid"
:container-manager="containerManager"
:tabs-list="windowMetadata.tabsListParent"
:all-tabs-list="allTabsList"
:references-manager="referencesManager"
:actions-manager="actionsManager"
/>
<modal-dialog
v-if="!isEmptyValue(processUuid)"
:container-manager="containerManagerProcess"
:parent-uuid="currentTabUuid"
:container-uuid="processUuid"
/>
<tab-manager-child
v-if="isWithChildsTab && isMobile"
:parent-uuid="windowMetadata.uuid"
:container-manager="containerManager"
:tabs-list="windowMetadata.tabsListChild"
:all-tabs-list="allTabsList"
:references-manager="referencesManager"
:actions-manager="actionsManager"
/>
</el-main>
<el-footer v-if="!isMobile">
<tab-manager-child
v-if="isWithChildsTab"
:parent-uuid="windowMetadata.uuid"
:container-manager="containerManager"
:tabs-list="windowMetadata.tabsListChild"
:all-tabs-list="allTabsList"
:references-manager="referencesManager"
:actions-manager="actionsManager"
/>
</el-footer>
</el-container>
</template>

<script>
Expand Down Expand Up @@ -113,6 +123,10 @@ export default defineComponent({
return store.getters.getShowPanelRecordAccess
})

const isMobile = computed(() => {
return store.state.app.device === 'mobile'
})

const currentTabUuid = computed(() => {
return store.getters.getCurrentTab(props.windowMetadata.uuid).uuid
})
Expand Down Expand Up @@ -245,9 +259,20 @@ export default defineComponent({
actionsManager,
showRecordAccess,
isWithChildsTab,
containerManager
containerManager,
isMobile
}
}

})
</script>

<style>
.el-footer {
height: 50% !important;
}
.el-main {
padding-top: 0px;
padding-bottom: 0px;
}
</style>
2 changes: 1 addition & 1 deletion src/views/ADempiere/Window/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<template>
<div v-if="isLoaded" key="window-loaded" class="view-base">
<el-container style="min-height: calc(100vh - 84px)">
<el-container style="height: 90vh;">
<el-aside style="width: 100%; margin-bottom: 0px; padding-right: 10px; padding-left: 10px;">
<component
:is="renderWindowComponent"
Expand Down
4 changes: 0 additions & 4 deletions src/views/components-demo/mixin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,5 @@ export default {
.mixin-components-container {
background-color: #f0f2f5;
padding: 30px;
min-height: calc(100vh - 84px);
}
.component-item{
min-height: 100px;
}
</style>

0 comments on commit 689fb13

Please sign in to comment.