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

This commit is contained in:
leogermani 2019-05-16 11:59:41 -03:00
commit 611b3caa7d
2 changed files with 14 additions and 4 deletions

View File

@ -275,12 +275,22 @@ class Elastic_Press {
foreach ($formatted_args['sort'] as $sort) {
foreach ($sort as $key => $value) {
$parts = \explode(".", $key);
if( !in_array("long", $parts) )
if ($key == 'post_title') {
$new_sort["$key.sortable"] = $value;
else
} elseif ($key == 'post_author') {
$new_sort["post_author.login.sortable"] = $value;
} elseif ($key == 'post_name') {
$new_sort["post_name.raw"] = $value;
} elseif ($key == 'post_type') {
$new_sort["post_type.raw"] = $value;
} elseif( !in_array("long", $parts) && in_array("meta", $parts) ) {
$new_sort["$key.sortable"] = $value;
} else {
$new_sort[$key] = $value;
}
}
}
$formatted_args['sort'] = $new_sort;
}
return $formatted_args;

View File

@ -58,8 +58,8 @@
this.type = ( this.filter_type ) ? this.filter_type : this.filter.metadatum.metadata_type;
this.loadOptions();
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTag);
if (this.isUsingElasticSearch)
this.$eventBusSearch.$on('isLoadingItems', this.updatesIsLoading);
@ -328,7 +328,7 @@
}
},
updatesIsLoading(isLoading) {
this.isLoadingOptions = isLoading;
this.isLoading = isLoading;
}
},
beforeDestroy() {