Sorts all gutenberg modal queries alphabetically. Proper feedback when facet item search is canceled inside some filters.
This commit is contained in:
parent
de4aa735eb
commit
dfcf887554
|
@ -120,7 +120,10 @@
|
|||
promise = this.getValuesPlainText( this.metadatum, query, this.isRepositoryLevel );
|
||||
|
||||
promise.request.catch( error => {
|
||||
this.$console.log('error select', error );
|
||||
if (axios.isCancel(error))
|
||||
this.$console.log('Request canceled: ', error.message);
|
||||
else
|
||||
this.$console.error( error );
|
||||
});
|
||||
|
||||
// Search Request Token for cancelling
|
||||
|
|
|
@ -138,7 +138,10 @@
|
|||
this.selectedValues();
|
||||
})
|
||||
.catch( error => {
|
||||
this.$console.log('error select', error );
|
||||
if (axios.isCancel(error))
|
||||
this.$console.log('Request canceled: ', error.message);
|
||||
else
|
||||
this.$console.error( error );
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,10 @@
|
|||
.then(() => {
|
||||
})
|
||||
.catch( error => {
|
||||
this.$console.error('error select', error );
|
||||
if (axios.isCancel(error))
|
||||
this.$console.log('Request canceled: ', error.message);
|
||||
else
|
||||
this.$console.error( error );
|
||||
});
|
||||
|
||||
// Search Request Token for cancelling
|
||||
|
|
|
@ -135,7 +135,10 @@
|
|||
|
||||
promise.request
|
||||
.catch( error => {
|
||||
this.$console.log('error select', error );
|
||||
if (axios.isCancel(error))
|
||||
this.$console.log('Request canceled: ', error.message);
|
||||
else
|
||||
this.$console.error( error );
|
||||
});
|
||||
|
||||
// Search Request Token for cancelling
|
||||
|
|
|
@ -113,7 +113,7 @@ export default class CollectionsModal extends React.Component {
|
|||
if (this.state.collectionsPage <= 1)
|
||||
currentModalCollections = [];
|
||||
|
||||
let endpoint = '/collections/?perpage=' + this.state.collectionsPerPage + '&paged=' + this.state.collectionsPage;
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.collectionsPerPage + '&paged=' + this.state.collectionsPage;
|
||||
|
||||
this.setState({
|
||||
isLoadingCollections: true,
|
||||
|
@ -159,7 +159,7 @@ export default class CollectionsModal extends React.Component {
|
|||
isLoadingCollections: true
|
||||
});
|
||||
|
||||
let endpoint = '/collections/?perpage=' + this.state.collectionsPerPage;
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.collectionsPerPage;
|
||||
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&search=' + name;
|
||||
|
|
|
@ -56,7 +56,7 @@ export default class DynamicItemsModal extends React.Component {
|
|||
if (this.state.collectionPage <= 1)
|
||||
someModalCollections = [];
|
||||
|
||||
let endpoint = '/collections/?perpage=' + this.state.collectionsPerPage + '&paged=' + this.state.collectionPage;
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.collectionsPerPage + '&paged=' + this.state.collectionPage;
|
||||
|
||||
this.setState({
|
||||
isLoadingCollections: true,
|
||||
|
@ -121,7 +121,7 @@ export default class DynamicItemsModal extends React.Component {
|
|||
items: []
|
||||
});
|
||||
|
||||
let endpoint = '/collections/?perpage=' + this.state.collectionsPerPage;
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.collectionsPerPage;
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&search=' + name;
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ export default class ItemsModal extends React.Component {
|
|||
|
||||
let anItemsRequestSource = axios.CancelToken.source();
|
||||
|
||||
let endpoint = '/collection/'+ this.state.collectionId + '/items/?fetch_only=title,thumbnail&perpage=' + this.state.itemsPerPage;
|
||||
let endpoint = '/collection/'+ this.state.collectionId + '/items/?orderby=title&order=asc&fetch_only=title,thumbnail&perpage=' + this.state.itemsPerPage;
|
||||
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&search=' + name;
|
||||
|
@ -164,7 +164,7 @@ export default class ItemsModal extends React.Component {
|
|||
if (this.state.itemsPage <= 1)
|
||||
someModalItems = [];
|
||||
|
||||
let endpoint = '/collection/'+ collectionId + '/items/?fetch_only=title,thumbnail&perpage=' + this.state.itemsPerPage + '&paged=' + this.state.itemsPage;
|
||||
let endpoint = '/collection/'+ collectionId + '/items/?orderby=title&order=asc&fetch_only=title,thumbnail&perpage=' + this.state.itemsPerPage + '&paged=' + this.state.itemsPage;
|
||||
|
||||
this.setState({
|
||||
isLoadingItems: true,
|
||||
|
@ -208,7 +208,7 @@ export default class ItemsModal extends React.Component {
|
|||
if (this.state.collectionPage <= 1)
|
||||
someModalCollections = [];
|
||||
|
||||
let endpoint = '/collections/?perpage=' + this.state.itemsPerPage + '&paged=' + this.state.collectionPage;
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.itemsPerPage + '&paged=' + this.state.collectionPage;
|
||||
|
||||
this.setState({
|
||||
isLoadingCollections: true,
|
||||
|
@ -272,7 +272,7 @@ export default class ItemsModal extends React.Component {
|
|||
items: []
|
||||
});
|
||||
|
||||
let endpoint = '/collections/?perpage=' + this.state.itemsPerPage;
|
||||
let endpoint = '/collections/?orderby=title&order=asc&perpage=' + this.state.itemsPerPage;
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&search=' + name;
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ export default class TermsModal extends React.Component {
|
|||
|
||||
fetchTerms(name) {
|
||||
|
||||
let endpoint = '/taxonomy/'+ this.state.taxonomyId + '/terms/?hideempty=0&number=' + this.state.termsPerPage;
|
||||
let endpoint = '/taxonomy/'+ this.state.taxonomyId + '/terms/?order=asc&hideempty=0&number=' + this.state.termsPerPage;
|
||||
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&searchterm=' + name;
|
||||
|
@ -157,7 +157,7 @@ export default class TermsModal extends React.Component {
|
|||
if (offset <= 0)
|
||||
someModalTerms = [];
|
||||
|
||||
let endpoint = '/taxonomy/'+ taxonomyId + '/terms/?hideempty=0&number=' + this.state.termsPerPage + '&offset=' + offset;
|
||||
let endpoint = '/taxonomy/'+ taxonomyId + '/terms/?order=asc&hideempty=0&number=' + this.state.termsPerPage + '&offset=' + offset;
|
||||
|
||||
this.setState({
|
||||
isLoadingTerms: true,
|
||||
|
@ -200,7 +200,7 @@ export default class TermsModal extends React.Component {
|
|||
if (this.state.taxonomyPage <= 1)
|
||||
someModalTaxonomies = [];
|
||||
|
||||
let endpoint = '/taxonomies/?perpage=' + this.state.termsPerPage + '&paged=' + this.state.taxonomyPage;
|
||||
let endpoint = '/taxonomies/?orderby=title&order=asc&perpage=' + this.state.termsPerPage + '&paged=' + this.state.taxonomyPage;
|
||||
|
||||
this.setState({
|
||||
isLoadingTaxonomies: true,
|
||||
|
@ -259,7 +259,7 @@ export default class TermsModal extends React.Component {
|
|||
terms: []
|
||||
});
|
||||
|
||||
let endpoint = '/taxonomies/?perpage=' + this.state.termsPerPage;
|
||||
let endpoint = '/taxonomies/?orderby=title&order=asc&perpage=' + this.state.termsPerPage;
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&search=' + name;
|
||||
|
||||
|
|
Loading…
Reference in New Issue