|
|
@@ -25,18 +25,9 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
|
|
|
showIndex: true,
|
|
|
configUrl: '',
|
|
|
|
|
|
- features: [{
|
|
|
- ftype : 'groupingsummary',
|
|
|
- groupHeaderTpl : '{name}',
|
|
|
- hideGroupedHeader : false,
|
|
|
- enableGroupingMenu : false
|
|
|
- }, {
|
|
|
- ftype: 'summary',
|
|
|
- dock: 'bottom'
|
|
|
- }],
|
|
|
-
|
|
|
initComponent: function() {
|
|
|
var me = this;
|
|
|
+ me.setSummary();
|
|
|
Ext.apply(me, {
|
|
|
dockedItems: [{
|
|
|
xtype: 'toolbar',
|
|
|
@@ -86,6 +77,26 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ setSummary: function() {
|
|
|
+ var me = this,
|
|
|
+ columns = me.columns,
|
|
|
+ features = me.features || [];
|
|
|
+
|
|
|
+ var hasSummary = !!columns.find(function(c) {
|
|
|
+ return c.summaryType
|
|
|
+ });
|
|
|
+
|
|
|
+ if(hasSummary) {
|
|
|
+ features.push({
|
|
|
+ ftype: 'summary',
|
|
|
+ dock: 'bottom'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ Ext.apply(me, {
|
|
|
+ features: features
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
add10EmptyRow: function() {
|
|
|
var me = this,
|
|
|
form = me.ownerCt,
|