worked on report table form Extjs part
This commit is contained in:
@@ -4,11 +4,28 @@ try
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new processMap(new DBConnection);
|
||||
|
||||
if ( isset($_GET['pid']) )
|
||||
if(isset($_GET['pid']) && !isset($_GET['type'])){
|
||||
$rows = $oProcessMap->getExtReportTables($_GET['pid']);
|
||||
}
|
||||
|
||||
else if(isset($_GET['pid']) && $_GET['type'] == 'global')
|
||||
{
|
||||
$rows = ExtreportTablesList($_GET['pid']);
|
||||
$aTheFields = array();
|
||||
$aTheFields = getDynaformsVars($_GET['pid'], false);
|
||||
foreach ($aTheFields as $aField) {
|
||||
$rows[] = array('FIELD_UID' => $aField['sName'] . '-' . $aField['sType'],
|
||||
'FIELD_NAME' => $aField['sName']);
|
||||
}
|
||||
}
|
||||
|
||||
else if(isset($_GET['pid']) && $_GET['type'] == 'grid'){
|
||||
$aTheFields = array();
|
||||
$aTheFields = getGridsVars($_GET['pid']);
|
||||
foreach ($aTheFields as $aField) {
|
||||
$rows[] = array('FIELD_UID' => $aField['sName'] . '-' . $aField['sXmlForm'],
|
||||
'FIELD_NAME' => $aField['sName']);
|
||||
}
|
||||
}
|
||||
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
|
||||
@@ -2036,8 +2036,11 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
||||
{
|
||||
name: 'REP_TAB_TITLE',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
name: 'FIELD_NAME',
|
||||
type: 'string'
|
||||
}
|
||||
|
||||
]);
|
||||
|
||||
var reportStore = new Ext.data.JsonStore({
|
||||
@@ -2050,7 +2053,8 @@ ProcessOptions.prototype.addReportTable= function(_5625)
|
||||
url : 'proxyReportTables?pid='+pro_uid
|
||||
})
|
||||
});
|
||||
|
||||
reportStore.load();
|
||||
|
||||
var reportColumns = new Ext.grid.ColumnModel({
|
||||
columns: [
|
||||
new Ext.grid.RowNumberer(),
|
||||
@@ -2111,18 +2115,17 @@ var reportForm =new Ext.FormPanel({
|
||||
buttonAlign: 'center',
|
||||
|
||||
items:[{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Title',
|
||||
name: 'REP_TAB_TITLE',
|
||||
allowBlank: false
|
||||
},{
|
||||
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Title',
|
||||
name: 'REP_TAB_TITLE',
|
||||
allowBlank: false
|
||||
},{
|
||||
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Table Name',
|
||||
name: 'REP_TAB_NAME',
|
||||
allowBlank: false
|
||||
},
|
||||
xtype: 'textfield',
|
||||
fieldLabel: 'Table Name',
|
||||
name: 'REP_TAB_NAME',
|
||||
allowBlank: false
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -2148,16 +2151,21 @@ var reportForm =new Ext.FormPanel({
|
||||
onSelect: function(record, index) {
|
||||
//Show-Hide Format Type Field
|
||||
if(record.data.value == 'global')
|
||||
{Ext.getCmp("fields").show();
|
||||
Ext.getCmp("gridfields").hide();
|
||||
{
|
||||
Ext.getCmp("fields").show();
|
||||
Ext.getCmp("gridfields").hide();
|
||||
}
|
||||
else
|
||||
{Ext.getCmp("gridfields").show();
|
||||
Ext.getCmp("fields").hide();
|
||||
{
|
||||
Ext.getCmp("gridfields").show();
|
||||
Ext.getCmp("fields").hide();
|
||||
}
|
||||
var link = 'proxyReportTables?pid='+pro_uid+'&type='+record.data.value;
|
||||
reportStore.proxy.setUrl(link, true);
|
||||
reportStore.load();
|
||||
|
||||
}
|
||||
this.setValue(record.data[this.valueField || this.displayField]);
|
||||
this.collapse();
|
||||
this.setValue(record.data[this.valueField || this.displayField]);
|
||||
this.collapse();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2169,20 +2177,16 @@ var reportForm =new Ext.FormPanel({
|
||||
xtype: 'multiselect',
|
||||
width: 150,
|
||||
mode: 'local',
|
||||
// hidden: true,
|
||||
editable: false,
|
||||
editable:true,
|
||||
fieldLabel: 'Fields',
|
||||
triggerAction: 'all',
|
||||
forceSelection: true,
|
||||
//dataIndex : 'ENGINE',
|
||||
dataIndex : 'FIELD_NAME',
|
||||
name: 'FIELDS',
|
||||
store: new Ext.data.JsonStore({
|
||||
fields : ['name', 'value'],
|
||||
data : [
|
||||
|
||||
|
||||
]})
|
||||
}]
|
||||
valueField: 'FIELD_NAME',
|
||||
displayField: 'FIELD_NAME',
|
||||
store: reportStore
|
||||
}]
|
||||
//displayField: 'name',
|
||||
//emptyText : 'Select Format',
|
||||
// valueField : 'value',
|
||||
@@ -2216,6 +2220,21 @@ var reportForm =new Ext.FormPanel({
|
||||
}
|
||||
]
|
||||
})
|
||||
var gridWindow = new Ext.Window({
|
||||
title: 'New Report Table',
|
||||
collapsible: false,
|
||||
maximizable: true,
|
||||
width: 450,
|
||||
//autoHeight: true,
|
||||
height: 400,
|
||||
//layout: 'fit',
|
||||
plain: true,
|
||||
bodyStyle: 'padding:5px;',
|
||||
buttonAlign: 'center',
|
||||
items: reportGrid
|
||||
});
|
||||
gridWindow.show();
|
||||
|
||||
|
||||
var formWindow = new Ext.Window({
|
||||
title: 'New Report Table',
|
||||
|
||||
Reference in New Issue
Block a user