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

This commit is contained in:
weryques 2018-06-06 15:42:09 -03:00
commit d54f21f9c3
5 changed files with 40 additions and 26 deletions

View File

@ -29,9 +29,10 @@
:options="{
group: { name:'fields', pull: false, put: true },
sort: openedFieldId == '' || openedFieldId == undefined,
disabled: openedFieldId != '' && openedFieldId != undefined,
//disabled: openedFieldId != '' && openedFieldId != undefined,
handle: '.handle',
ghostClass: 'sortable-ghost',
chosenClass: 'sortable-chosen',
filter: 'not-sortable-item',
animation: '250'}">
<div

View File

@ -27,7 +27,7 @@
:options="{
group: { name:'filters', pull: false, put: true },
sort: openedFilterId == '' || openedFilterId == undefined,
disabled: openedFilterId != '' && openedFilterId != undefined,
//disabled: openedFilterId != '' && openedFilterId != undefined,
handle: '.handle',
ghostClass: 'sortable-ghost',
filter: 'not-sortable-item',

View File

@ -55,6 +55,24 @@
v-model="selectedItems[index]"/>
</div>
<!-- Title -->
<p
v-for="(column, index) in tableFields"
:key="index"
v-if="column.display && column.field_type_object != undefined && (column.field_type_object.related_mapped_prop == 'title')"
class="metadata-title">
<a
v-html="item.metadata != undefined ? renderMetadata(item.metadata, column) : ''"
@click="goToItemPage(item)"/>
</p>
<!-- Thumbnail -->
<a
v-if="item.thumbnail != undefined"
@click="goToItemPage(item)">
<img :src="item['thumbnail'].medium">
</a>
<!-- Actions -->
<div
v-if="item.current_user_can_edit"
@ -77,24 +95,6 @@
:icon="!isOnTrash ? 'delete' : 'delete-forever'"/>
</a>
</div>
<!-- Thumbnail -->
<a
v-if="item.thumbnail != undefined"
@click="goToItemPage(item)">
<img :src="item['thumbnail'].medium">
</a>
<!-- Title -->
<p
v-for="(column, index) in tableFields"
:key="index"
v-if="column.display && column.field_type_object != undefined && (column.field_type_object.related_mapped_prop == 'title')"
class="metadata-title">
<a
v-html="item.metadata != undefined ? renderMetadata(item.metadata, column) : ''"
@click="goToItemPage(item)"/>
</p>
</div>
</div>

View File

@ -143,7 +143,7 @@
<b-dropdown
ref="displayedFieldsDropdown"
:mobile-modal="false"
:disabled="totalItems <= 0"
:disabled="totalItems <= 0 || adminViewMode == 'grid'"
class="show">
<button
class="button is-white"

View File

@ -19,36 +19,49 @@
.grid-item-checkbox {
position: absolute;
margin-top: 6px;
margin-top: 9px;
margin-left: 12px;
}
.actions-area {
position: relative;
float: right;
width: 80px;
width: 100%;
display: flex;
justify-content: space-between;
justify-content: flex-end;
visibility: hidden;
opacity: 0;
padding: 6px;
padding: 8px;
transition: visibility 0.2s, opacity 0.2s;
margin-top: -43px;
background-color: $tainacan-input-background;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
&:hover .actions-area {
visibility: visible;
opacity: 1.0;
}
&.selected-grid-item {
.actions-area {
background-color: $primary-lighter;
}
}
img {
min-width: 258px;
max-width: 258px;
height: auto;
border-radius: 2px;
margin-bottom: -5px;
}
p.metadata-title {
flex-shrink: 0;
font-size: 0.875rem;
margin-bottom: 5px;
margin-bottom: 6px;
margin-top: 6px;
margin-right: 6px;
margin-left: 24px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;