Removal of filter_type attribute from filters, it wasn't being used.

This commit is contained in:
Mateus Machado Luna 2019-06-03 10:51:17 -03:00
parent 77a2101888
commit ad78c1dfd1
10 changed files with 5 additions and 14 deletions

View File

@ -48,7 +48,6 @@ class Autocomplete extends Filter_Type {
public function render( $filter ){
return '<tainacan-filter-autocomplete name="'.$filter->get_name().'"
collection_id="'.$filter->get_collection_id().'"
filter_type="'.$filter->get_metadatum()->get_metadata_type().'"
metadatum_id="'.$filter->get_metadatum()->get_id().'"></tainacan-filter-autocomplete>';
}
}

View File

@ -64,7 +64,6 @@ class Checkbox extends Filter_Type {
public function render( $filter ){
return '<tainacan-filter-checkbox name="'.$filter->get_name().'"
filter_type="'.$filter->get_metadatum()->get_metadata_type().'"
collection_id="'.$filter->get_collection_id().'"
metadatum_id="'.$filter->get_metadatum()->get_id().'"></tainacan-filter-selectbox>';
}

View File

@ -17,7 +17,6 @@ export const filter_type_mixin = {
},
metadatum_id: [Number], // not required, but overrides the filter metadatum id if is set
collection_id: [Number], // not required, but overrides the filter metadatum id if is set
filter_type: [String], // not required, but overrides the filter metadatum type if is set
id: '',
query: {}
},
@ -25,9 +24,6 @@ export const filter_type_mixin = {
// We listen to event, but reload event if hasFiltered is negative, as
// an empty query also demands filters reloading.
this.$eventBusSearch.$on('hasFiltered', this.reloadOptionsDueToFiltering);
},
mounted() {
},
computed: {
facetsFromItemSearch() {

View File

@ -96,6 +96,9 @@
});
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTags);
},
mounted() {
this.selectedValues();
},
data(){
return {
value: null,

View File

@ -32,7 +32,6 @@ class Selectbox extends Filter_Type {
public function render( $filter ){
return '<tainacan-filter-selectbox name="'.$filter->get_name().'"
filter_type="'.$filter->get_metadatum()->get_metadata_type().'"
collection_id="'.$filter->get_collection_id().'"
metadatum_id="'.$filter->get_metadatum()->get_id().'"></tainacan-filter-selectbox>';
}

View File

@ -62,7 +62,6 @@ class Taginput extends Filter_Type {
public function render( $filter ){
return '<tainacan-filter-taginput name="'.$filter->get_name().'"
filter_type="'.$filter->get_metadatum()->get_metadata_type().'"
collection_id="'.$filter->get_collection_id().'"
metadatum_id="'.$filter->get_metadatum()->get_id().'"></tainacan-filter-taginput>';
}

View File

@ -55,7 +55,7 @@
created(){
this.collection = ( this.collection_id ) ? this.collection_id : this.filter.collection_id;
this.metadatum = ( this.metadatum_id ) ? this.metadatum_id : this.filter.metadatum.metadatum_id ;
this.type = ( this.filter_type ) ? this.filter_type : this.filter.metadatum.metadata_type;
this.type = this.filter.metadatum.metadata_type;
this.loadOptions();
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTag);
@ -91,7 +91,6 @@
},
metadatum_id: [Number], // not required, but overrides the filter metadatum id if is set
collection_id: [Number], // not required, but overrides the filter metadatum id if is set
filter_type: [String], // not required, but overrides the filter metadatum type if is set
labelId: '',
query: {
type: Object // concentrate all attributes metadatum id and type

View File

@ -42,7 +42,7 @@
created(){
this.collection = ( this.collection_id ) ? this.collection_id : this.filter.collection_id;
this.metadatum = ( this.metadatum_id ) ? this.metadatum_id : this.filter.metadatum.metadatum_id ;
this.type = ( this.filter_type ) ? this.filter_type : this.filter.metadatum.metadata_type;
this.type = this.filter.metadatum.metadata_type;
let in_route = '/collection/' + this.collection + '/metadata/' + this.metadatum;
@ -77,7 +77,6 @@
},
metadatum_id: [Number], // not required, but overrides the filter metadatum id if is set
collection_id: [Number], // not required, but overrides the filter metadatum id if is set
filter_type: [String], // not required, but overrides the filter metadatum type if is set
labelId: '',
query: {
type: Object // concentrate all attributes metadatum id and type

View File

@ -64,7 +64,6 @@ class TaxonomyCheckbox extends Filter_Type {
public function render( $filter ){
return '<tainacan-filter-taxonomy-checkbox name="'.$filter->get_name().'"
filter_type="'.$filter->get_metadatum()->get_metadata_type().'"
collection_id="'.$filter->get_collection_id().'"
metadatum_id="'.$filter->get_metadatum()->get_id().'"></tainacan-filter-taxonomy-checkbox>';
}

View File

@ -62,7 +62,6 @@ class TaxonomyTaginput extends Filter_Type {
public function render( $filter ){
return '<tainacan-filter-taxonomy-taginput name="'.$filter->get_name().'"
filter_type="'.$filter->get_metadatum()->get_metadata_type().'"
collection_id="'.$filter->get_collection_id().'"
metadatum_id="'.$filter->get_metadatum()->get_id().'"></tainacan-filter-taxonomy-taginput>';
}