Merge branch 'develop' of github.com:tainacan/tainacan into develop

This commit is contained in:
Leo Germani 2018-06-12 11:44:51 -03:00
commit 9c109eba17
22 changed files with 281 additions and 263 deletions

View File

@ -19,7 +19,6 @@
:title="$i18n.getHelperTitle('categories', 'name')"
:message="$i18n.getHelperMessage('categories', 'name')"/>
<b-input
:class="{'has-content': form.name != undefined && form.name != ''}"
id="tainacan-text-name"
v-model="form.name"
@focus="clearErrors('name')"
@ -36,7 +35,6 @@
:title="$i18n.getHelperTitle('categories', 'description')"
:message="$i18n.getHelperMessage('categories', 'description')"/>
<b-input
:class="{'has-content': form.description != undefined && form.description != ''}"
id="tainacan-text-description"
type="textarea"
v-model="form.description"
@ -77,7 +75,6 @@
:message="$i18n.getHelperMessage('categories', 'slug')"/>
<b-icon :class="{'is-loading': isUpdatingSlug}"/>
<b-input
:class="{'has-content': form.slug != undefined && form.slug != ''}"
@input="updateSlug()"
id="tainacan-text-slug"
v-model="form.slug"

View File

@ -8,13 +8,42 @@
class="tainacan-form"
label-width="120px">
<div class="columns is-variable is-8">
<div class="column is-narrow">
<!-- Header Page -------------------------------- -->
<b-field :addons="false">
<label class="section-label">{{ $i18n.get('label_header_image') }}</label>
<div class="header-field">
<a
class="button is-rounred is-secondary"
id="button-edit-header-image"
:aria-label="$i18n.get('label_button_edit_header_image')"
@click="headerImageMediaFrame.openFrame($event)">
<b-icon icon="pencil" />
</a>
<figure class="image">
<span
v-if="collection.header_image == undefined || collection.header_image == false"
class="image-placeholder">{{ $i18n.get('label_empty_header_image') }}</span>
<img
:alt="$i18n.get('label_thumbnail')"
:src="(collection.header_image == undefined || collection.header_image == false) ? headerPlaceholderPath : collection.header_image">
</figure>
<div class="header-buttons-row">
<a
id="button-delete"
:aria-label="$i18n.get('label_button_delete_thumb')"
@click="deleteHeaderImage()">
<b-icon icon="delete" />
</a>
</div>
</div>
</b-field>
<div class="columns">
<div class="column">
<!-- Thumbnail -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_thumbnail')">
<b-field :addons="false">
<label class="section-label">{{ $i18n.get('label_thumbnail') }}</label>
<div class="thumbnail-field">
<a
class="button is-rounred is-secondary"
@ -23,7 +52,7 @@
@click.prevent="thumbnailMediaFrame.openFrame($event)">
<b-icon icon="pencil" />
</a>
<figure class="image is-128x128">
<figure class="image">
<span
v-if="collection.thumbnail.thumb == undefined || collection.thumbnail.thumb == false"
class="image-placeholder">{{ $i18n.get('label_empty_thumbnail') }}</span>
@ -42,94 +71,6 @@
</div>
</div>
</b-field>
<!-- Header Page -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_header_image')">
<div class="thumbnail-field">
<a
class="button is-rounred is-secondary"
id="button-edit-header-image"
:aria-label="$i18n.get('label_button_edit_header_image')"
@click="headerImageMediaFrame.openFrame($event)">
<b-icon icon="pencil" />
</a>
<figure class="image is-128x128">
<span
v-if="collection.header_image == undefined || collection.header_image == false"
class="image-placeholder">{{ $i18n.get('label_empty_header_image') }}</span>
<img
:alt="$i18n.get('label_thumbnail')"
:src="(collection.header_image == undefined || collection.header_image == false) ? headerPlaceholderPath : collection.header_image">
</figure>
<div class="thumbnail-buttons-row">
<a
id="button-delete"
:aria-label="$i18n.get('label_button_delete_thumb')"
@click="deleteHeaderImage()">
<b-icon icon="delete" />
</a>
</div>
</div>
</b-field>
</div>
<div class="column">
<!-- Status -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_status')"
:type="editFormErrors['status'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['status'] != undefined ? editFormErrors['status'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'status')"
:message="$i18n.getHelperMessage('collections', 'status')"/>
<b-select
id="tainacan-select-status"
v-model="form.status"
@focus="clearErrors('status')"
:placeholder="$i18n.get('instruction_select_a_status')">
<option
v-for="statusOption in statusOptions"
:key="statusOption.value"
:value="statusOption.value"
:disabled="statusOption.disabled">{{ statusOption.label }}
</option>
</b-select>
</b-field>
<!-- Name -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_name')"
:type="editFormErrors['name'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['name'] != undefined ? editFormErrors['name'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'name')"
:message="$i18n.getHelperMessage('collections', 'name')"/>
<b-input
:class="{'has-content': form.name != undefined && form.name != ''}"
id="tainacan-text-name"
v-model="form.name"
@focus="clearErrors('name')"/>
</b-field>
<!-- Description -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_description')"
:type="editFormErrors['description'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['description'] != undefined ? editFormErrors['description'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'description')"
:message="$i18n.getHelperMessage('collections', 'description')"/>
<b-input
:class="{'has-content': form.description != undefined && form.description != ''}"
id="tainacan-text-description"
type="textarea"
v-model="form.description"
@focus="clearErrors('description')"/>
</b-field>
<!-- Enable Cover Page -------------------------------- -->
<div class="field">
@ -192,90 +133,6 @@
</div>
</b-field>
<!-- Moderators List -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_moderators')"
:type="editFormErrors['moderators'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['moderators'] != undefined ? editFormErrors['moderators'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'moderators_ids')"
:message="$i18n.getHelperMessage('collections', 'moderators_ids')"/>
<b-autocomplete
id="tainacan-text-moderators-input"
:placeholder="$i18n.get('instruction_moderators')"
:data="users"
@select="onAddModerator($event)"
:loading="isFetchingModerators"
@input="fecthModerators($event)"
@focus="clearErrors('moderators')">
<template slot-scope="props">
{{ props.option.name }}
</template>
<template slot="empty">{{ $i18n.get('info_no_user_found') }}</template>
</b-autocomplete>
<ul
class="selected-list-box"
v-if="moderators != undefined && moderators.length > 0">
<li
:key="index"
v-for="(moderator, index) of moderators">
<b-tag
attached
closable
@close="removeModerator(index)">
{{ moderator.name }}
</b-tag>
</li>
</ul>
<div
class="moderators-empty-list"
v-else>
{{ $i18n.get('info_no_moderator_on_collection') }}
</div>
</b-field>
<!-- Slug -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_slug')"
:type="editFormErrors['slug'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['slug'] != undefined ? editFormErrors['slug'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'slug')"
:message="$i18n.getHelperMessage('collections', 'slug')"/>
<b-input
:class="{'has-content': form.slug != undefined && form.slug != ''}"
id="tainacan-text-slug"
v-model="form.slug"
@focus="clearErrors('slug')"/>
</b-field>
<!-- Parent Collection -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_parent_collection')"
:type="editFormErrors['parent'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['parent'] != undefined ? editFormErrors['parent'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'parent')"
:message="$i18n.getHelperMessage('collections', 'parent')"/>
<b-select
id="tainacan-select-parent"
v-model="form.parent"
@focus="clearErrors('parent')"
:loading="isFetchingCollections"
:placeholder="$i18n.get('instruction_select_a_parent_collection')">
<option value="0">{{ $i18n.get('label_no_parent_collection') }}</option>
<option
v-if="collection.id != anotherCollection.id"
v-for="anotherCollection of collections"
:key="anotherCollection.id"
:value="anotherCollection.id">{{ anotherCollection.name }}
</option>
</b-select>
</b-field>
<!-- Enabled View Modes ------------------------------- -->
<div class="field">
<label class="label">{{ $i18n.get('label_view_modes_available') }}</label>
@ -333,7 +190,145 @@
</option>
</b-select>
</b-field>
</div>
<div class="column">
<!-- Status -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_status')"
:type="editFormErrors['status'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['status'] != undefined ? editFormErrors['status'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'status')"
:message="$i18n.getHelperMessage('collections', 'status')"/>
<b-select
id="tainacan-select-status"
v-model="form.status"
@focus="clearErrors('status')"
:placeholder="$i18n.get('instruction_select_a_status')">
<option
v-for="statusOption in statusOptions"
:key="statusOption.value"
:value="statusOption.value"
:disabled="statusOption.disabled">{{ statusOption.label }}
</option>
</b-select>
</b-field>
<!-- Name -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_name')"
:type="editFormErrors['name'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['name'] != undefined ? editFormErrors['name'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'name')"
:message="$i18n.getHelperMessage('collections', 'name')"/>
<b-input
id="tainacan-text-name"
v-model="form.name"
@focus="clearErrors('name')"/>
</b-field>
<!-- Description -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_description')"
:type="editFormErrors['description'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['description'] != undefined ? editFormErrors['description'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'description')"
:message="$i18n.getHelperMessage('collections', 'description')"/>
<b-input
id="tainacan-text-description"
type="textarea"
v-model="form.description"
@focus="clearErrors('description')"/>
</b-field>
<!-- Moderators List -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_moderators')"
:type="editFormErrors['moderators'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['moderators'] != undefined ? editFormErrors['moderators'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'moderators_ids')"
:message="$i18n.getHelperMessage('collections', 'moderators_ids')"/>
<b-autocomplete
id="tainacan-text-moderators-input"
:placeholder="$i18n.get('instruction_moderators')"
:data="users"
@select="onAddModerator($event)"
:loading="isFetchingModerators"
@input="fecthModerators($event)"
@focus="clearErrors('moderators')">
<template slot-scope="props">
{{ props.option.name }}
</template>
<template slot="empty">{{ $i18n.get('info_no_user_found') }}</template>
</b-autocomplete>
<ul
class="selected-list-box"
v-if="moderators != undefined && moderators.length > 0">
<li
:key="index"
v-for="(moderator, index) of moderators">
<b-tag
attached
closable
@close="removeModerator(index)">
{{ moderator.name }}
</b-tag>
</li>
</ul>
<div
class="moderators-empty-list"
v-else>
{{ $i18n.get('info_no_moderator_on_collection') }}
</div>
</b-field>
<!-- Slug -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_slug')"
:type="editFormErrors['slug'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['slug'] != undefined ? editFormErrors['slug'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'slug')"
:message="$i18n.getHelperMessage('collections', 'slug')"/>
<b-input
id="tainacan-text-slug"
v-model="form.slug"
@focus="clearErrors('slug')"/>
</b-field>
<!-- Parent Collection -------------------------------- -->
<b-field
:addons="false"
:label="$i18n.get('label_parent_collection')"
:type="editFormErrors['parent'] != undefined ? 'is-danger' : ''"
:message="editFormErrors['parent'] != undefined ? editFormErrors['parent'] : ''">
<help-button
:title="$i18n.getHelperTitle('collections', 'parent')"
:message="$i18n.getHelperMessage('collections', 'parent')"/>
<b-select
id="tainacan-select-parent"
v-model="form.parent"
@focus="clearErrors('parent')"
:loading="isFetchingCollections"
:placeholder="$i18n.get('instruction_select_a_parent_collection')">
<option value="0">{{ $i18n.get('label_no_parent_collection') }}</option>
<option
v-if="collection.id != anotherCollection.id"
v-for="anotherCollection of collections"
:key="anotherCollection.id"
:value="anotherCollection.id">{{ anotherCollection.name }}
</option>
</b-select>
</b-field>
</div>
</div>
@ -734,7 +729,7 @@ export default {
if (this.$route.fullPath.split("/").pop() != "new") {
document.getElementById('collection-page-container').addEventListener('scroll', ($event) => {
this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53));
this.$emit('onShrinkHeader', ($event.target.scrollTop > 53));
});
}
}
@ -750,10 +745,37 @@ export default {
.field {
position: relative;
}
.section-label {
font-size: 16px !important;
font-weight: 500 !important;
color: $tertiary !important;
line-height: 1.2em;
}
#button-edit-thumbnail, #button-edit-header-image {
border-radius: 100px !important;
height: 40px !important;
width: 40px !important;
bottom: -40px;
z-index: 99;
.icon {
display: inherit;
padding: 0;
margin: 0;
margin-top: 1px;
}
}
.header-field {
img {
padding: 20px;
}
}
.thumbnail-field {
max-height: 128px;
margin-bottom: 96px;
max-height: 208px;
margin-bottom: 180px;
margin-top: -20px;
.content {
@ -761,7 +783,11 @@ export default {
font-size: 0.8em;
}
img {
border-radius: 100px;
position: absolute;
height: 178px;
width: 178px;
padding: 20px;
}
.image-placeholder {
position: absolute;
@ -774,34 +800,20 @@ export default {
text-align: center;
color: gray;
}
#button-edit-thumbnail, #button-edit-header-image {
border-radius: 100px !important;
height: 40px !important;
width: 40px !important;
bottom: -20px;
left: -20px;
z-index: 99;
.icon {
display: inherit;
padding: 0;
margin: 0;
margin-top: 1px;
}
}
.thumbnail-buttons-row {
display: none;
visibility: hidden;
display: inline-block;
position: relative;
top: -20px;
background-color: rgba(255, 255, 255, 0.9);
padding: 2px 8px;
border-radius: 0px 0px 0px 4px;
left: 88px;
}
&:hover {
.thumbnail-buttons-row {
display: inline-block;
position: relative;
top: -128px;
background-color: rgba(255, 255, 255, 0.9);
padding: 2px 8px;
border-radius: 0px 0px 0px 4px;
left: 88px;
visibility: visible;
}
}
}

View File

@ -17,7 +17,6 @@
:message="$i18n.getHelperMessage('filters', 'name')"/>
</label>
<b-input
:class="{'has-content': editForm.name != undefined && editForm.name != ''}"
v-model="editForm.name"
name="name"
@focus="clearErrors('name')"/>
@ -34,7 +33,6 @@
:message="$i18n.getHelperMessage('filters', 'description')"/>
</label>
<b-input
:class="{'has-content': editForm.description != undefined && editForm.description != ''}"
type="textarea"
name="description"
v-model="editForm.description"

View File

@ -168,7 +168,6 @@
<hr>
</div>
<b-input
:class="{'has-content': textContent != undefined && textContent != ''}"
type="textarea"
v-model="textContent"/>
@ -203,9 +202,7 @@
<h2>{{ $i18n.get('instruction_insert_url') }}</h2>
<hr>
</div>
<b-input
:class="{'has-content': urlLink != undefined && urlLink != ''}"
v-model="urlLink"/>
<b-input v-model="urlLink"/>
<div class="field is-grouped form-submit">
<div class="control">
@ -671,7 +668,7 @@ export default {
},
mounted() {
document.getElementById('collection-page-container').addEventListener('scroll', ($event) => {
this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53));
this.$emit('onShrinkHeader', ($event.target.scrollTop > 53));
});
},
beforeRouteLeave ( to, from, next ) {

View File

@ -18,7 +18,6 @@
:message="$i18n.getHelperMessage('metadata', 'name')"/>
</label>
<b-input
:class="{'has-content': editForm.name != undefined && editForm.name != ''}"
v-model="editForm.name"
name="name"
@focus="clearErrors('name')"/>
@ -35,7 +34,6 @@
:message="$i18n.getHelperMessage('metadata', 'description')"/>
</label>
<b-input
:class="{'has-content': editForm.description != undefined && editForm.description != ''}"
type="textarea"
name="description"
v-model="editForm.description"

View File

@ -61,7 +61,6 @@
:message="$i18n.get('info_help_term_name')"/>
</label>
<b-input
:class="{'has-content': editForm.name != undefined && editForm.name != ''}"
v-model="editForm.name"
name="name"
@focus="clearErrors({ name: 'name', repeated: 'repeated' })"/>
@ -78,7 +77,6 @@
:message="$i18n.get('info_help_term_description')"/>
</label>
<b-input
:class="{'has-content': editForm.description != undefined && editForm.description != ''}"
type="textarea"
name="description"
v-model="editForm.description"

View File

@ -319,7 +319,7 @@ export default {
for (let filter of this.filterTypes) {
for (let supportedType of filter['supported_types']) {
if (choosenMetadatum.metadata_type_object.primitive_type == supportedType)
if (choosenMetadatum.metadatum_type_object.primitive_type == supportedType)
this.allowedFilterTypes.push(filter);
}
}
@ -462,7 +462,7 @@ export default {
mounted() {
if (!this.isRepositoryLevel) {
document.getElementById('collection-page-container').addEventListener('scroll', ($event) => {
this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53));
this.$emit('onShrinkHeader', ($event.target.scrollTop > 53));
});
}
}

View File

@ -193,9 +193,13 @@
class="column-default-width"
:class="{
'thumbnail-cell': column.metadatum == 'row_thumbnail',
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Date' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Numeric') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Selectbox' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Category' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Textarea') : false,
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'date' ||
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,
}"
:custom-key="column.slug">
<div class="th-wrap">{{ column.name }}</div>
@ -230,10 +234,15 @@
:class="{
'thumbnail-cell': column.metadatum == 'row_thumbnail',
'column-main-content' : column.metadata_type_object != undefined ? (column.metadata_type_object.related_mapped_prop == 'title') : false,
'column-needed-width column-align-right' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Numeric') : false,
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Date' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Numeric') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Selectbox' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Category' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Textarea') : false,
'column-needed-width column-align-right' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'float' ||
column.metadata_type_object.primitive_type == 'int' ) : false,
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'date' ||
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,
}"
@click="goToItemPage(item)">

View File

@ -84,8 +84,8 @@
<a
:style="{ visibility:
metadatum.collection_id != collectionId ||
metadatum.metadata_type == 'Tainacan\\Metadata_Types\\Core_Title' ||
metadatum.metadata_type == 'Tainacan\\Metadata_Types\\Core_Description'
metadatum.metadata_type_object.related_mapped_prop == 'title' ||
metadatum.metadata_type_object.related_mapped_prop == 'description'
? 'hidden' : 'visible'
}"
@click.prevent="removeMetadatum(metadatum)">
@ -346,7 +346,7 @@ export default {
mounted() {
if (!this.isRepositoryLevel) {
document.getElementById('collection-page-container').addEventListener('scroll', ($event) => {
this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53));
this.$emit('onShrinkHeader', ($event.target.scrollTop > 53));
});
}
}

View File

@ -148,7 +148,7 @@
if (!this.isRepositoryLevel) {
document.getElementById('collection-page-container').addEventListener('scroll', ($event) => {
this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53));
this.$emit('onShrinkHeader', ($event.target.scrollTop > 53));
});
}
}

View File

@ -700,7 +700,7 @@
// Watch Scroll for shrinking header, only on Admin at collection level
if (!this.isRepositoryLevel && !this.isOnTheme) {
document.getElementById('items-list-area').addEventListener('scroll', ($event) => {
this.isHeaderShrinked = ($event.originalTarget.scrollTop > 53);
this.isHeaderShrinked = ($event.target.scrollTop > 53);
this.$emit('onShrinkHeader', this.isHeaderShrinked);
});
}
@ -771,18 +771,13 @@
.control {
width: 100%;
input {
height: 27px;
font-size: 11px;
color: $gray-light;
}
.icon {
pointer-events: all;
cursor: pointer;
color: $tertiary;
height: 27px;
font-size: 18px !important;
height: 2rem !important;
}
margin-bottom: 5px;
}

View File

@ -5,7 +5,7 @@
:class="{ 'is-shrink': shouldShrinkHeader }"
:id="collectionId"/>
<router-view
@onShrinkHeader="shouldShrinkHeader = $event"
@onShrinkHeader="onUpdateShrinkHeader($event)"
id="collection-page-container"
:collection-id="collectionId"
class="page-container page-container-small"
@ -32,7 +32,11 @@ export default {
this.collectionId = parseInt(this.$route.params.collectionId);
this.$eventBusSearch.setCollectionId(this.collectionId);
},
mounted() {
methods: {
onUpdateShrinkHeader(event) {
if (this.shouldShrinkHeader != event)
this.shouldShrinkHeader = event;
}
}
}

View File

@ -19,6 +19,8 @@
font-size: 14px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.required-metadatum-asterisk {
color: $gray;
@ -38,12 +40,6 @@
}
.control{
&.has-content {
.input, .textarea {
background-color: white;
border: 1px solid $tainacan-input-background;
}
}
&.has-icons-right {
.icon {
height: 2.0em;

View File

@ -65,7 +65,7 @@ $header-height: 53px;
$subheader-height: 82px;
$side-menu-width: 180px;
$filter-menu-width: 200px;
$filter-menu-width-theme: 270px;
$filter-menu-width-theme: 20.833333333%;
$page-height: calc(100% - 53px);
// Overall Pages padding:

View File

@ -287,7 +287,11 @@ export default {
min-width: $filter-menu-width-theme;
background-color: unset;
border-right: 0;
padding: 25px 25px 25px 4.1666667%;
padding: 25px 12px 25px 4.1666667%;
.columns {
display: flex;
}
}
.search-control {

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Autocomplete extends Filter_Type {
function __construct(){
$this->set_supported_types(['string','item']);
$this->set_supported_types(['string','long_string','item']);
$this->set_component('tainacan-filter-autocomplete');
}

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Checkbox extends Filter_Type {
function __construct(){
$this->set_supported_types(['string','item']);
$this->set_supported_types(['string','long_string','item']);
$this->set_component('tainacan-filter-checkbox');
}

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Selectbox extends Filter_Type {
function __construct(){
$this->set_supported_types(['string']);
$this->set_supported_types(['string', 'long_string']);
$this->set_component('tainacan-filter-selectbox');
}

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Taginput extends Filter_Type {
function __construct(){
$this->set_supported_types(['string','item']);
$this->set_supported_types(['string','long_string','item']);
$this->set_component('tainacan-filter-taginput');
}

View File

@ -201,6 +201,7 @@
font-weight: normal;
font-size: 14px;
display: inline-flex;
width: 100%;
}
.input, .textarea, .taginput-container {

View File

@ -12,7 +12,7 @@ class Textarea extends Metadata_Type {
function __construct(){
// call metadatum type constructor
parent::__construct();
$this->set_primitive_type('string');
$this->set_primitive_type('long_string');
$this->set_component('tainacan-textarea');
}

View File

@ -11,10 +11,14 @@
v-if="column.display"
class="column-default-width"
:class="{
'thumbnail-cell': column.metadatum == 'row_thumbnail',
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Date' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Numeric') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Selectbox' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Category' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Textarea') : false,
'thumbnail-cell': column.metadatum == 'row_thumbnail',
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'date' ||
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,
}"
:custom-key="column.slug">
<div class="th-wrap">{{ column.name }}</div>
@ -38,10 +42,15 @@
:class="{
'thumbnail-cell': column.metadatum == 'row_thumbnail',
'column-main-content' : column.metadata_type_object != undefined ? (column.metadata_type_object.related_mapped_prop == 'title') : false,
'column-needed-width column-align-right' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Numeric') : false,
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Date' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Numeric') : false,
'column-medium-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Selectbox' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Category' || column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Compound') : false,
'column-large-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.className == 'Tainacan\\Metadata_Types\\Textarea') : false,
'column-needed-width column-align-right' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'float' ||
column.metadata_type_object.primitive_type == 'int' ) : false,
'column-small-width' : column.metadata_type_object != undefined ? (column.metadata_type_object.primitive_type == 'date' ||
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,
}"
@click="goToItemPage(item)">