Add pagingSize inside layout config
Change-Id: I8990b0fcd94df7c17110f7df4fc973809022c3f0
This commit is contained in:
parent
bc982cabde
commit
90957f83e9
@ -176,10 +176,19 @@ angular.module('bansho.config', [])
|
|||||||
this.getTheme = function () {
|
this.getTheme = function () {
|
||||||
var theme;
|
var theme;
|
||||||
|
|
||||||
if (layoutConfig.data) {
|
if (layoutConfig.data) {
|
||||||
theme = layoutConfig.data.banshoConfig.theme;
|
theme = layoutConfig.data.banshoConfig.theme;
|
||||||
}
|
}
|
||||||
return theme;
|
return theme;
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getPagingSize = function () {
|
||||||
|
var pagingSize;
|
||||||
|
|
||||||
|
if (layoutConfig.data) {
|
||||||
|
pagingSize = layoutConfig.data.banshoConfig.pagingSize;
|
||||||
|
}
|
||||||
|
return pagingSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
var saveLayoutConfig = function () {
|
var saveLayoutConfig = function () {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"banshoConfig": {
|
"banshoConfig": {
|
||||||
"theme": "dark"
|
"theme": "dark",
|
||||||
|
"pagingSize": 50
|
||||||
},
|
},
|
||||||
"topbar": {
|
"topbar": {
|
||||||
"template": "page",
|
"template": "page",
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
angular.module('bansho.datasource', ['bansho.surveil'])
|
angular.module('bansho.datasource', ['bansho.surveil'])
|
||||||
.value('tableGlobalConfig', {'cellToFieldsMap': {}, 'cellWrappableField': {}})
|
.value('tableGlobalConfig', {'cellToFieldsMap': {}, 'cellWrappableField': {}})
|
||||||
|
|
||||||
.service('datasource', ['$filter', 'surveilStatus', 'surveilConfig', 'surveilQuery', 'componentsConfig', 'tableGlobalConfig',
|
.service('datasource', ['$filter', 'surveilStatus', 'surveilConfig', 'surveilQuery', 'componentsConfig', 'tableGlobalConfig', 'configManager',
|
||||||
function ($filter, surveilStatus, surveilConfig, surveilQuery, componentsConfig, tableGlobalConfig) {
|
function ($filter, surveilStatus, surveilConfig, surveilQuery, componentsConfig, tableGlobalConfig, configManager) {
|
||||||
var providerServices = {
|
var providerServices = {
|
||||||
status: surveilStatus,
|
status: surveilStatus,
|
||||||
config: surveilConfig
|
config: surveilConfig
|
||||||
@ -60,7 +60,7 @@ angular.module('bansho.datasource', ['bansho.surveil'])
|
|||||||
if (config[tableId].pagingbar) {
|
if (config[tableId].pagingbar) {
|
||||||
config[tableId].queryPaging = {
|
config[tableId].queryPaging = {
|
||||||
page: 0,
|
page: 0,
|
||||||
size: 50
|
size: configManager.getPagingSize()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user