Implement pagination to tags and categories query
[MAILPOET-1613]
This commit is contained in:
@ -210,7 +210,8 @@ define([
|
||||
ajax: {
|
||||
data: function (params) {
|
||||
return {
|
||||
term: params.term
|
||||
term: params.term,
|
||||
page: params.page || 1
|
||||
};
|
||||
},
|
||||
transport: function (options, success, failure) {
|
||||
@ -223,6 +224,7 @@ define([
|
||||
// Fetch available terms based on the list of taxonomies already fetched
|
||||
termsPromise = CommunicationComponent.getTerms({
|
||||
search: options.data.term,
|
||||
page: options.data.page,
|
||||
taxonomies: _.keys(taxonomies)
|
||||
}).then(function (terms) {
|
||||
return {
|
||||
@ -248,7 +250,10 @@ define([
|
||||
id: item.term_id
|
||||
}, item);
|
||||
}
|
||||
)
|
||||
),
|
||||
pagination: {
|
||||
more: data.terms.length === 100
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +205,8 @@ define([
|
||||
ajax: {
|
||||
data: function (params) {
|
||||
return {
|
||||
term: params.term
|
||||
term: params.term,
|
||||
page: params.page || 1
|
||||
};
|
||||
},
|
||||
transport: function (options, success, failure) {
|
||||
@ -218,6 +219,7 @@ define([
|
||||
// Fetch available terms based on the list of taxonomies already fetched
|
||||
termsPromise = CommunicationComponent.getTerms({
|
||||
search: options.data.term,
|
||||
page: options.data.page,
|
||||
taxonomies: _.keys(taxonomies)
|
||||
}).then(function (terms) {
|
||||
return {
|
||||
@ -243,7 +245,10 @@ define([
|
||||
id: item.term_id
|
||||
}, item);
|
||||
}
|
||||
)
|
||||
),
|
||||
pagination: {
|
||||
more: data.terms.length === 100
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -372,7 +372,8 @@ define([
|
||||
ajax: {
|
||||
data: function (params) {
|
||||
return {
|
||||
term: params.term
|
||||
term: params.term,
|
||||
page: params.page || 1
|
||||
};
|
||||
},
|
||||
transport: function (options, success, failure) {
|
||||
@ -385,6 +386,7 @@ define([
|
||||
// Fetch available terms based on the list of taxonomies already fetched
|
||||
termsPromise = CommunicationComponent.getTerms({
|
||||
search: options.data.term,
|
||||
page: options.data.page,
|
||||
taxonomies: _.keys(taxonomies)
|
||||
}).then(function (terms) {
|
||||
return {
|
||||
@ -410,7 +412,10 @@ define([
|
||||
id: item.term_id
|
||||
}, item);
|
||||
}
|
||||
)
|
||||
),
|
||||
pagination: {
|
||||
more: data.terms.length === 100
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user