diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2019-04-26 09:56:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-26 09:56:38 +0200 |
commit | 817039500afe6281f88a1855dee0ee4301e60ceb (patch) | |
tree | 7278ad713d4fea18007cd4a2aea13def70cd738f | |
parent | 4a4a15bf1b79d056c68a6bcd6e33d6d958796432 (diff) |
Fix alignment and remove addressbook selector if only one (#1074)
Fix #1065
-rw-r--r-- | css/Properties/Properties.scss | 3 | ||||
-rw-r--r-- | src/components/ContactDetails.vue | 7 | ||||
-rw-r--r-- | src/components/Properties/PropertyMultipleText.vue | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/css/Properties/Properties.scss b/css/Properties/Properties.scss index 262761dd..8aa23f78 100644 --- a/css/Properties/Properties.scss +++ b/css/Properties/Properties.scss @@ -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; diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue index 1acadcae..da538483 100644 --- a/src/components/ContactDetails.vue +++ b/src/components/ContactDetails.vue @@ -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" diff --git a/src/components/Properties/PropertyMultipleText.vue b/src/components/Properties/PropertyMultipleText.vue index 8294b7b1..48d65bf8 100644 --- a/src/components/Properties/PropertyMultipleText.vue +++ b/src/components/Properties/PropertyMultipleText.vue @@ -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 }, |