Skip to content

Commit

Permalink
Inserted line breaks in side menu (#915)
Browse files Browse the repository at this point in the history
* changed hover styling of card

* improved styling of menu cards

* other minor styling improvements in cards layout

* Fields always have same size

* style fix active-inactive text in yes-no-field

* moved popover to own component

* refactored labelPopover

* added info icon to label

* truncated placeholder

* bugfix - added missing method back in

* set resizable in textareas to false

* style fix for context info

* fixes due to merge form develop

* reverted padding for context info box

* inserted line breaks in side menu
  • Loading branch information
sofia-ester-calderon authored Jun 11, 2021
1 parent f4c9df7 commit 0b0d6a5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/components/ADempiere/Field/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
</template>

<script>
import { DEFAULT_SIZE } from '@/utils/ADempiere/references'
import { evalutateTypeField, fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils'
import FieldOptions from '@/components/ADempiere/Field/FieldOptions'
Expand Down
43 changes: 24 additions & 19 deletions src/layout/components/Sidebar/Item.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
<template>
<el-row class="item-wrapper">
<el-col :span="3">
<i v-if="icon.includes('el-icon')" class="icon sub-el-icon" />
<svg-icon v-else :icon-class="icon" />
</el-col>
<el-col :span="21">

<p class="item-title">{{ title }}</p>
</el-col>
</el-row>
</template>

<script>
export default {
name: 'MenuItem',
functional: true,
props: {
icon: {
type: String,
Expand All @@ -11,31 +23,24 @@ export default {
type: String,
default: ''
}
},
render(h, context) {
const { icon, title } = context.props
const vnodes = []
if (icon) {
if (icon.includes('el-icon')) {
vnodes.push(<i class={[icon, 'sub-el-icon']} />)
} else {
vnodes.push(<svg-icon icon-class={icon}/>)
}
}
if (title) {
vnodes.push(<span slot='title'>{(title)}</span>)
}
return vnodes
}
}
</script>

<style scoped>
.sub-el-icon {
color: currentColor;
width: 1em;
height: 1em;
}
.item-wrapper {
white-space: break-spaces;
line-height: 20px;
height: auto;
margin: 18px 23px 18px 0;
}
.item-title {
margin: 0 0 0 7px;
}
</style>
9 changes: 9 additions & 0 deletions src/styles/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@
width: 100% !important;
}

.el-menu-item {
height: auto !important;
padding: 0;
}

.el-submenu__title {
height: auto !important;
}

// menu hover
.submenu-title-noDropdown,
.el-submenu__title {
Expand Down

0 comments on commit 0b0d6a5

Please sign in to comment.