diff --git a/app/components/config/config.js b/app/components/config/config.js index de522bb..cbced7a 100644 --- a/app/components/config/config.js +++ b/app/components/config/config.js @@ -176,10 +176,19 @@ angular.module('bansho.config', []) this.getTheme = function () { var theme; - if (layoutConfig.data) { - theme = layoutConfig.data.banshoConfig.theme; - } - return theme; + if (layoutConfig.data) { + theme = layoutConfig.data.banshoConfig.theme; + } + return theme; + }; + + this.getPagingSize = function () { + var pagingSize; + + if (layoutConfig.data) { + pagingSize = layoutConfig.data.banshoConfig.pagingSize; + } + return pagingSize; }; var saveLayoutConfig = function () { diff --git a/app/components/config/defaultLayoutConfig.json b/app/components/config/defaultLayoutConfig.json index 899c431..3a13175 100644 --- a/app/components/config/defaultLayoutConfig.json +++ b/app/components/config/defaultLayoutConfig.json @@ -1,6 +1,7 @@ { "banshoConfig": { - "theme": "dark" + "theme": "dark", + "pagingSize": 50 }, "topbar": { "template": "page", diff --git a/app/components/datasource/datasource.js b/app/components/datasource/datasource.js index a06c385..cabf5f7 100644 --- a/app/components/datasource/datasource.js +++ b/app/components/datasource/datasource.js @@ -3,8 +3,8 @@ angular.module('bansho.datasource', ['bansho.surveil']) .value('tableGlobalConfig', {'cellToFieldsMap': {}, 'cellWrappableField': {}}) - .service('datasource', ['$filter', 'surveilStatus', 'surveilConfig', 'surveilQuery', 'componentsConfig', 'tableGlobalConfig', - function ($filter, surveilStatus, surveilConfig, surveilQuery, componentsConfig, tableGlobalConfig) { + .service('datasource', ['$filter', 'surveilStatus', 'surveilConfig', 'surveilQuery', 'componentsConfig', 'tableGlobalConfig', 'configManager', + function ($filter, surveilStatus, surveilConfig, surveilQuery, componentsConfig, tableGlobalConfig, configManager) { var providerServices = { status: surveilStatus, config: surveilConfig @@ -60,7 +60,7 @@ angular.module('bansho.datasource', ['bansho.surveil']) if (config[tableId].pagingbar) { config[tableId].queryPaging = { page: 0, - size: 50 + size: configManager.getPagingSize() }; } },