Fixes filters due to changes on Draggable library and other tweaks for #794.
This commit is contained in:
parent
e963a9acd3
commit
95d58e5055
|
@ -56,7 +56,7 @@
|
||||||
export default {
|
export default {
|
||||||
name: 'AvailableExportersModal',
|
name: 'AvailableExportersModal',
|
||||||
props: {
|
props: {
|
||||||
sourceCollection: String,
|
sourceCollection: [Number,String],
|
||||||
hideWhenManualCollection: false
|
hideWhenManualCollection: false
|
||||||
},
|
},
|
||||||
emits: [
|
emits: [
|
||||||
|
|
|
@ -66,7 +66,7 @@ export const sendFilter = ( { commit }, { collectionId, metadatumId, name, filte
|
||||||
})
|
})
|
||||||
.then( res => {
|
.then( res => {
|
||||||
let filter = res.data;
|
let filter = res.data;
|
||||||
commit('setSingleFilter', { filter: filter , index: newIndex});
|
commit('addSingleFilter', { filter: filter , index: newIndex});
|
||||||
resolve( filter );
|
resolve( filter );
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -92,8 +92,8 @@ export const updateFilter = ( { commit }, { filterId, index, options }) => {
|
||||||
commit('setSingleFilter', { filter: filter, index: index });
|
commit('setSingleFilter', { filter: filter, index: index });
|
||||||
resolve( filter );
|
resolve( filter );
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch( (error) => {
|
||||||
console.log(error);
|
console.log(JSON.parse(JSON.stringify(error)));
|
||||||
reject({ error_message: error['response']['data'].error_message, errors: error['response']['data'].errors });
|
reject({ error_message: error['response']['data'].error_message, errors: error['response']['data'].errors });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,6 +20,10 @@ export const setSingleFilter = (state, { filter, index}) => {
|
||||||
Object.assign(state.filters, { [index]: filter });
|
Object.assign(state.filters, { [index]: filter });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const addSingleFilter = (state, { filter, index}) => {
|
||||||
|
state.filters.splice( index, 0, filter );
|
||||||
|
}
|
||||||
|
|
||||||
export const setFilters = (state, filters) => {
|
export const setFilters = (state, filters) => {
|
||||||
state.filters = filters;
|
state.filters = filters;
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,6 +310,17 @@
|
||||||
style="font-size: 0.875em;">
|
style="font-size: 0.875em;">
|
||||||
<em>{{ '(' + $i18n.get('info_child_of') + ' ' + metadatum.parent_name + ')' }}</em>
|
<em>{{ '(' + $i18n.get('info_child_of') + ' ' + metadatum.parent_name + ')' }}</em>
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="metadatum.status === 'private'"
|
||||||
|
v-tooltip="{
|
||||||
|
content: $i18n.get('status_private'),
|
||||||
|
autoHide: true,
|
||||||
|
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||||
|
placement: 'auto-start'
|
||||||
|
}"
|
||||||
|
class="icon">
|
||||||
|
<i class="tainacan-icon tainacan-icon-private" />
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
|
@ -1173,6 +1184,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.available-metadatum-item:not(.sortable-ghost):not(.disabled-metadatum) {
|
||||||
|
display: none;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
.sortable-ghost {
|
.sortable-ghost {
|
||||||
border: 1px dashed var(--tainacan-gray2);
|
border: 1px dashed var(--tainacan-gray2);
|
||||||
background: var(--tainacan-white);
|
background: var(--tainacan-white);
|
||||||
|
|
Loading…
Reference in New Issue