This commit is contained in:
Ilya Tregubov 2023-06-01 10:12:14 +08:00
commit 59cd47c02f
No known key found for this signature in database
GPG key ID: 0F58186F748E55C1
29 changed files with 395 additions and 455 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -28,7 +28,7 @@ define(
'core/paged_content',
'core/paged_content_events',
'core/pubsub',
'core/ajax'
'core_user/repository'
],
function(
$,
@ -37,7 +37,7 @@ function(
PagedContent,
PagedContentEvents,
PubSub,
Ajax
UserRepository
) {
var TEMPLATES = {
PAGED_CONTENT: 'core/paged_content'
@ -520,25 +520,9 @@ function(
* @return {callback}
*/
var generateLimitHandler = function(persistentLimitKey) {
var callback = function(limit) {
var args = {
preferences: [
{
type: persistentLimitKey,
value: limit
}
]
};
var request = {
methodname: 'core_user_update_user_preferences',
args: args
};
Ajax.call([request]);
return function(limit) {
UserRepository.setUserPreference(persistentLimitKey, limit);
};
return callback;
};
/**