Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alignment and remove addressbook selector if only one #1074

Merged
merged 1 commit into from
Apr 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions css/Properties/Properties.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ $property-value-max-width: 250px;
// property label or multiselect within row
&__label,
&__label.multiselect {
margin: $grid-input-margin 5px $grid-input-margin 0;
padding: $grid-input-padding 0;
margin: $grid-input-margin 5px $grid-input-margin 0 !important; // override multiselect
flex: 1 0; // min width is 60px, let's grow until 120px
height: $grid-input-height-with-margin;
width: $property-label-min-width;
Expand Down
7 changes: 5 additions & 2 deletions src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@
empty property because this is a required prop on regular property-select. But since
we are hijacking this... (this is supposed to be used with a ICAL.property, but to avoid code
duplication, we created a fake propModel and property with our own options here) -->
<PropertySelect :prop-model="addressbookModel" :value.sync="addressbook" :is-first-property="true"
:is-last-property="true" :property="{}" class="property--addressbooks property--last" />
<PropertySelect v-if="addressbooksOptions.length > 1"
:prop-model="addressbookModel" :value.sync="addressbook"
:is-first-property="true" :is-last-property="true"
:property="{}"
class="property--addressbooks property--last" />

<!-- Groups always visible -->
<PropertyGroups :prop-model="groupsModel" :value.sync="groups" :contact="contact"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Properties/PropertyMultipleText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default {
gridLength() {
let hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0
let isLast = this.isLastProperty
let hasValueNames = this.propModel.readableValues ? 1 : 0
let hasValueNames = this.propModel.options || this.selectType || !this.property.isStructuredValue ? 1 : 0
let length = this.propModel.displayOrder ? this.propModel.displayOrder.length : this.value.length
return hasValueNames + hasTitle + length + isLast
},
Expand Down