diff --git a/app/assets/javascripts/my_modules/repositories.js b/app/assets/javascripts/my_modules/repositories.js index e834e93be..6ed1c4a77 100644 --- a/app/assets/javascripts/my_modules/repositories.js +++ b/app/assets/javascripts/my_modules/repositories.js @@ -1,5 +1,5 @@ /* eslint-disable no-param-reassign, no-use-before-define */ -/* global DataTableHelpers PerfectScrollbar FilePreviewModal animateSpinner HelperModule +/* global GLOBAL_CONSTANTS DataTableHelpers PerfectScrollbar FilePreviewModal animateSpinner HelperModule initAssignedTasksDropdown I18n prepareRepositoryHeaderForExport initReminderDropdown */ var MyModuleRepositories = (function() { @@ -348,6 +348,8 @@ var MyModuleRepositories = (function() { json.state.columns.push({}); json.state.ColReorder.push(json.state.ColReorder.length); } + json.state.start = 0; + json.state.length = GLOBAL_CONSTANTS.REPOSITORY_DEFAULT_PAGE_SIZE; callback(json.state); }); }, diff --git a/app/controllers/global_constants_controller.rb b/app/controllers/global_constants_controller.rb index 6ca95b4c5..da8cccbd3 100644 --- a/app/controllers/global_constants_controller.rb +++ b/app/controllers/global_constants_controller.rb @@ -20,6 +20,7 @@ class GlobalConstantsController < ApplicationController FILENAME_TRUNCATION_LENGTH: Constants::FILENAME_TRUNCATION_LENGTH, FILE_MAX_SIZE_MB: Rails.configuration.x.file_max_size_mb, REPOSITORY_LIST_ITEMS_PER_COLUMN: Constants::REPOSITORY_LIST_ITEMS_PER_COLUMN, + REPOSITORY_DEFAULT_PAGE_SIZE: Constants::REPOSITORY_DEFAULT_PAGE_SIZE, REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN: Constants::REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN, REPOSITORY_STOCK_UNIT_ITEMS_PER_COLUMN: Constants::REPOSITORY_STOCK_UNIT_ITEMS_PER_COLUMN, HAS_UNSAVED_DATA_CLASS_NAME: 'has-unsaved-data',