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