updating designer
This commit is contained in:
@@ -282,6 +282,7 @@ class Ajax
|
||||
|
||||
$rootNode->id = $process->getProUid();
|
||||
$rootNode->type = 'process';
|
||||
$rootNode->typeLabel = G::LoadTranslation('ID_PROCESS');
|
||||
$rootNode->text = $process->getProTitle();
|
||||
$rootNode->leaf = count($tasksList) > 0 ? false : true;
|
||||
$rootNode->iconCls = 'ss_sprite ss_application';
|
||||
@@ -290,6 +291,7 @@ class Ajax
|
||||
$node = new stdClass;
|
||||
$node->id = $task['TAS_UID'];
|
||||
$node->type = 'task';
|
||||
$node->typeLabel = G::LoadTranslation('ID_TASK');
|
||||
$node->text = $task['TAS_TITLE'];
|
||||
$node->iconCls = 'ss_sprite ss_layout';
|
||||
$node->leaf = true;
|
||||
@@ -355,7 +357,10 @@ class Ajax
|
||||
switch ($param['property']) {
|
||||
case 'Title': $fieldName = 'PRO_TITLE'; break;
|
||||
case 'Description': $fieldName = 'PRO_DESCRIPTION'; break;
|
||||
case 'Debug': $fieldName = 'PRO_DEBUG'; break;
|
||||
case 'Debug':
|
||||
$fieldName = 'PRO_DEBUG';
|
||||
$param['value'] = $param['value'] == 'true' ? '1' : '0';
|
||||
break;
|
||||
case 'Category':
|
||||
$fieldName = 'PRO_CATEGORY';
|
||||
$category = ProcessCategory::loadByCategoryName($param['value']);
|
||||
@@ -391,7 +396,7 @@ class Ajax
|
||||
|
||||
$response->rows = array_merge($defaultOption, $processCategory->getAll('array'));
|
||||
|
||||
echo G::json_encode($response);
|
||||
print G::json_encode($response);
|
||||
}
|
||||
|
||||
function getCaledarList()
|
||||
@@ -403,8 +408,20 @@ class Ajax
|
||||
|
||||
$response->rows = $calendarObj['array'];
|
||||
|
||||
echo G::json_encode($response);
|
||||
print G::json_encode($response);
|
||||
}
|
||||
|
||||
function getPMVariables($param)
|
||||
{
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new processMap(new DBConnection);
|
||||
$response->rows = getDynaformsVars($param['PRO_UID']);
|
||||
foreach($response->rows as $i=>$var){
|
||||
$response->rows[$i]['sName'] = "@@{$var['sName']}";
|
||||
}
|
||||
print G::json_encode($response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ Ext.onReady ( function() {
|
||||
UID : node.attributes.id,
|
||||
type : node.attributes.type
|
||||
}});
|
||||
|
||||
Ext.getCmp('eastPanelCenter').setTitle(node.attributes.typeLabel+': '+node.attributes.text);
|
||||
//propertiesGrid.store.sort('name','DESC');
|
||||
propertiesGrid.setSource(propertyStore.reader.jsonData.prop);
|
||||
|
||||
@@ -224,7 +224,7 @@ Ext.onReady ( function() {
|
||||
name : 'category',
|
||||
allowBlank : true,
|
||||
store : new Ext.data.Store( {
|
||||
autoLoad: true, //autoload the data
|
||||
//autoLoad: true, //autoload the data
|
||||
proxy : new Ext.data.HttpProxy( {
|
||||
url : '../processes/ajaxListener',
|
||||
method : 'POST'
|
||||
@@ -234,20 +234,20 @@ Ext.onReady ( function() {
|
||||
},
|
||||
reader : new Ext.data.JsonReader( {
|
||||
root : 'rows',
|
||||
fields : [ {
|
||||
name : 'CATEGORY_UID'
|
||||
}, {
|
||||
name : 'CATEGORY_NAME'
|
||||
} ]
|
||||
fields : [
|
||||
{name : 'CATEGORY_UID'},
|
||||
{name : 'CATEGORY_NAME'}
|
||||
]
|
||||
})
|
||||
}),
|
||||
valueField : 'CATEGORY_NAME',
|
||||
displayField : 'CATEGORY_NAME',
|
||||
typeAhead : true,
|
||||
mode : 'local',
|
||||
//mode : 'local',
|
||||
triggerAction : 'all',
|
||||
editable: true,
|
||||
forceSelection: true
|
||||
forceSelection: true,
|
||||
selectOnFocus : true
|
||||
});
|
||||
|
||||
var comboCalendar = new Ext.form.ComboBox({
|
||||
@@ -255,37 +255,57 @@ Ext.onReady ( function() {
|
||||
name : 'calendar',
|
||||
allowBlank : true,
|
||||
store : new Ext.data.Store( {
|
||||
autoLoad: true, //autoload the data
|
||||
//autoLoad: true, //autoload the data
|
||||
proxy : new Ext.data.HttpProxy({ url: '../processes/ajaxListener'}),
|
||||
baseParams : {action: 'getCaledarList'},
|
||||
reader : new Ext.data.JsonReader( {
|
||||
root : 'rows',
|
||||
fields : [ {
|
||||
name : 'CALENDAR_UID'
|
||||
}, {
|
||||
name : 'CALENDAR_NAME'
|
||||
} ]
|
||||
fields : [
|
||||
{name : 'CALENDAR_UID'},
|
||||
{name : 'CALENDAR_NAME'}
|
||||
]
|
||||
})
|
||||
}),
|
||||
valueField : 'CALENDAR_NAME',
|
||||
displayField : 'CALENDAR_NAME',
|
||||
typeAhead : true,
|
||||
mode : 'local',
|
||||
//mode : 'local',
|
||||
triggerAction : 'all',
|
||||
editable: true,
|
||||
forceSelection: true
|
||||
});
|
||||
|
||||
var comboPMVariables = new Ext.form.ComboBox({
|
||||
fieldLabel : 'Calendar',
|
||||
name : 'calendar',
|
||||
allowBlank : true,
|
||||
store : new Ext.data.Store( {
|
||||
//autoLoad: false, //autoload the data
|
||||
proxy : new Ext.data.HttpProxy({ url: '../processes/ajaxListener'}),
|
||||
baseParams : {action: 'getPMVariables', PRO_UID: pro_uid},
|
||||
reader : new Ext.data.JsonReader( {
|
||||
root : 'rows',
|
||||
fields : [
|
||||
{name : 'sName'},
|
||||
{name : 'sName'}
|
||||
]
|
||||
})
|
||||
}),
|
||||
valueField : 'sName',
|
||||
displayField : 'sName',
|
||||
typeAhead : true,
|
||||
//mode : 'local',
|
||||
triggerAction: 'all',
|
||||
editable: true,
|
||||
forceSelection: true
|
||||
});
|
||||
|
||||
|
||||
var propertiesGrid = new Ext.grid.PropertyGrid({
|
||||
id: 'propGrid',
|
||||
title: 'Properties',
|
||||
//width: 300,
|
||||
loadMask : {msg:"Loading..."},
|
||||
autoHeight: true,
|
||||
propertyNames: {
|
||||
tested: 'QA',
|
||||
borderWidth: 'Border Width'
|
||||
},
|
||||
viewConfig : {
|
||||
forceFit: true,
|
||||
scrollOffset: 2 // the grid will never have scrollbars
|
||||
@@ -293,7 +313,8 @@ Ext.onReady ( function() {
|
||||
customEditors: {
|
||||
//'Debug' : new Ext.grid.GridEditor(ActiveProperty),
|
||||
'Category' : new Ext.grid.GridEditor(comboCategory),
|
||||
'Calendar' : new Ext.grid.GridEditor(comboCalendar)
|
||||
'Calendar' : new Ext.grid.GridEditor(comboCalendar),
|
||||
'Variable for case priority' : new Ext.grid.GridEditor(comboPMVariables)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -357,11 +378,11 @@ Ext.onReady ( function() {
|
||||
//collapseMode:'mini',
|
||||
//hideCollapseTool: false,
|
||||
items:[
|
||||
eastPanelTree
|
||||
, {
|
||||
eastPanelTree,
|
||||
{
|
||||
id: 'eastPanelCenter',
|
||||
xtype: 'panel',
|
||||
title: 'Process: ',
|
||||
title: _('ID_PROCESS')+': '+pro_title,
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
items:[
|
||||
|
||||
Reference in New Issue
Block a user