Displays inline version of value_as_html compound metadata. #17

This commit is contained in:
mateuswetah 2020-04-14 18:58:57 -03:00
parent 2fe1383416
commit 146c2b63c9
6 changed files with 128 additions and 14 deletions

View File

@ -707,9 +707,10 @@
column.metadata_type_object.primitive_type == 'float' ||
column.metadata_type_object.primitive_type == 'int') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'term' ||
column.metadata_type_object.primitive_type == 'item' ||
column.metadata_type_object.primitive_type == 'compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' || column.metadata_type_object.related_mapped_prop == 'description') : false,
column.metadata_type_object.primitive_type == 'item') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' ||
column.metadata_type_object.primitive_type == 'compound' ||
column.metadata_type_object.related_mapped_prop == 'description') : false,
}">
<div class="th-wrap">{{ column.name }}</div>
</th>
@ -755,9 +756,10 @@
column.metadata_type_object.primitive_type == 'int' ||
column.metadata_type_object.primitive_type == 'float') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'item' ||
column.metadata_type_object.primitive_type == 'term' ||
column.metadata_type_object.primitive_type == 'compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' || column.metadata_type_object.related_mapped_prop == 'description') : false,
column.metadata_type_object.primitive_type == 'term') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' ||
column.metadata_type_object.primitive_type == 'compound' ||
column.metadata_type_object.related_mapped_prop == 'description') : false,
}"
@click.left="onClickItem($event, item)"
@click.right="onRightClickItem($event, item)">

View File

@ -117,7 +117,7 @@
}
.column-large-width {
min-width: 120px;
max-width: 240px;
max-width: 250px;
p {
color: var(--tainacan-info-color);
font-size: 0.6875em;

View File

@ -206,16 +206,19 @@
}
.tainacan-compound-group {
text-align: left;
margin-left: 2px;
padding-left: 0.875em;
border-left: 1px solid var(--tainacan-gray3);
.tainacan-compound-metadatum .label {
text-align: left;
margin-bottom: 0.25em;
font-size: 1em;
color: var(--tainacan-info-color);
}
.tainacan-compound-metadatum p {
text-align: left;
margin-bottom: 0.75em;
font-size: 1em;
}

View File

@ -149,8 +149,47 @@ a:hover {
color: var(--tainacan-gray3);
}
.column-large-width {
.tainacan-compound-group {
display: inline-block;
font-size: 1.125em;
margin-top: -0.25em;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
max-width: 100%;
& * {
display: inline-block;
}
.label {
font-size: 1em;
color: var(--tainacan-info-color);
&:not(:first-child)::before {
content: ', ';
font-size: 1em;
font-weight: normal;
color: var(--tainacan-info-color);
display: inline-block;
margin-right: 0.35em;
margin-left: -0.15em;
}
&::after {
content: ': ';
font-size: 1em;
color: var(--tainacan-info-color);
display: inline-block;
margin-right: 0.15em;
}
}
p {
font-size: 1em !important;
line-height: 1.25em !important;
}
}
}
.metadata-value {
.tainacan-compound-group {
margin-left: 2px;
padding-left: 0.875em;

View File

@ -72,9 +72,10 @@
column.metadata_type_object.primitive_type == 'float' ||
column.metadata_type_object.primitive_type == 'int') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'term' ||
column.metadata_type_object.primitive_type == 'item' ||
column.metadata_type_object.primitive_type == 'compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' || column.metadata_type_object.related_mapped_prop == 'description') : false,
column.metadata_type_object.primitive_type == 'item') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' ||
column.metadata_type_object.related_mapped_prop == 'description' ||
column.metadata_type_object.primitive_type == 'compound') : false,
}">
<div class="th-wrap">{{ column.name }}</div>
</th>
@ -101,9 +102,10 @@
column.metadata_type_object.primitive_type == 'int' ||
column.metadata_type_object.primitive_type == 'float') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'item' ||
column.metadata_type_object.primitive_type == 'term' ||
column.metadata_type_object.primitive_type == 'compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' || column.metadata_type_object.related_mapped_prop == 'description') : false,
column.metadata_type_object.primitive_type == 'term' ) : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'long_string' ||
column.metadata_type_object.primitive_type == 'compound' ||
column.metadata_type_object.related_mapped_prop == 'description') : false,
}">
<a :href="item.url">
<p

View File

@ -135,6 +135,74 @@ export default {
}
}
}
.column-large-width {
.tainacan-compound-group {
display: inline-block;
font-size: 1.125em;
margin-top: -0.25em;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
max-width: 100%;
& * {
display: inline-block;
}
.label {
font-size: 1em;
color: var(--tainacan-info-color);
&:not(:first-child)::before {
content: ', ';
font-size: 1em;
font-weight: normal;
color: var(--tainacan-info-color);
display: inline-block;
margin-right: 0.35em;
margin-left: -0.15em;
}
&::after {
content: ': ';
font-size: 1em;
color: var(--tainacan-info-color);
display: inline-block;
margin-right: 0.15em;
}
}
p {
font-size: 1em !important;
line-height: 1.65em !important;
}
}
}
.metadata-value {
.tainacan-compound-group {
margin-left: 2px;
padding-left: 0.875em;
border-left: 1px solid var(--tainacan-gray3);
.tainacan-compound-metadatum .label {
margin-bottom: 0.25em;
font-size: 1em;
color: var(--tainacan-info-color);
}
.tainacan-compound-metadatum p {
margin-bottom: 0.75em;
font-size: 1em;
}
.multivalue-separator {
display: block;
max-height: 1px;
width: 35px;
background: var(--tainacan-gray3);
content: none;
color: transparent;
margin: 1em auto;
}
}
}
}
.loading-overlay {
min-height: auto !important;