';
} else {
var html = '
';
}
for (var i = 0; i < array.length; i++) {
var item = array[i];
html += '
![](' + imageRoot + item.image + '.png)
'
+ item.title + '
';
}
html += '
';
return html;
},
/**
* this.layout = 'accordion';
*/
configLayout: function(type) {
if (!type || type == 'plain') {
//
} else if (type && type == 'accordion') {
this.layout = 'accordion';
}
},
configItems: function(type) {
if (type && type == 'accordion') {
this.createItemsForAccordion();
} else if (!type || type == 'plain') {
this.createItemsForHtml();
}
},
createItemsForAccordion: function() {
this.id = '__gef_jbs_palette__';
this.items = [{
title: '所有活动',
iconCls: 'tb-activity',
autoScroll: true,
html: this.createHtml([
{name: 'select', image: 'select32', title: '选择'},
{name: 'transition', image: '32/flow_sequence', title: '连线'},
{name: 'start', image: '32/start_event_empty', title: '开始'},
{name: 'end', image: '32/end_event_terminate', title: '结束'},
{name: 'cancel', image: '32/end_event_cancel', title: '取消'},
{name: 'error', image: '32/end_event_error', title: '错误'},
// {name: 'human', image: '32/task_empty', title: '人工'},
{name: 'task', image: '32/task_empty', title: '任务'},
{name: 'decision', image: '32/gateway_exclusive', title: '决策'},
{name: 'sql', image: '32/task_sql', title: 'SQL'},
/* {name: 'auto', image: '32/task_empty', title: '自动'},*/
/* {name: 'counter-sign', image: '32/task_empty', title: '会签'},*/
{name: 'fork', image: '32/gateway_parallel', title: '并行'},
{name: 'join', image: '32/gateway_parallel', title: '汇聚'}
])
}/*, {
title: '高级活动',
iconCls: 'tb-activity',
autoScroll: true,
html: this.createHtml([
{name: 'cancel', image: '32/end_event_cancel', title: '取消'},
{name: 'state', image: '32/task_wait', title: '等待'},
//{name: 'task', image: '32/task_empty', title: '任务'},
{name: 'human', image: '32/task_empty', title: '人工'},
{name: 'decision', image: '32/gateway_exclusive', title: '决策'},
{name: 'fork', image: '32/gateway_exclusive', title: '并行'},
{name: 'join', image: '32/gateway_parallel', title: '汇聚'},
{name: 'java', image: '32/task_java', title: 'JAVA'},
{name: 'script', image: '32/task_java', title: '脚本'},
{name: 'hql', image: '32/task_hql', title: 'HQL'},
{name: 'sql', image: '32/task_sql', title: 'SQL'},
{name: 'mail', image: '32/task_empty', title: '邮件'},
{name: 'custom', image: '32/task_empty', title: '自定义'},
{name: 'subProcess', image: '32/task_empty', title: '子流程'},
{name: 'jms', image: '32/task_empty', title: 'JMS'},
{name: 'ruleDecision', image: '32/gateway_exclusive', title: '规则决策'},
{name: 'rules', image: '32/task_empty', title: '规则'},
{name: 'foreach', image: '32/gateway_exclusive', title: '动态分支'}
])
}*/];
},
createItemsForHtml: function() {
this.autoScroll = true;
this.html = this.createHtml([
{name: 'select', image: 'select32', title: '选择'},
{name: 'transition', image: '32/flow_sequence', title: '连线'},
{name: 'start', image: '32/start_event_empty', title: '开始'},
{name: 'end', image: '32/end_event_terminate', title: '结束'},
{name: 'cancel', image: '32/end_event_cancel', title: '取消'},
{name: 'error', image: '32/end_event_error', title: '错误'},
{name: 'state', image: '32/task_wait', title: '等待'},
{name: 'task', image: '32/task_empty', title: '任务'},
{name: 'decision', image: '32/gateway_exclusive', title: '决策'},
{name: 'fork', image: '32/gateway_parallel', title: '并行'},
{name: 'join', image: '32/gateway_parallel', title: '汇聚'},
{name: 'java', image: '32/task_java', title: 'JAVA'},
{name: 'script', image: '32/task_java', title: '脚本'},
{name: 'hql', image: '32/task_hql', title: 'HQL'},
{name: 'sql', image: '32/task_sql', title: 'SQL'},
{name: 'mail', image: '32/task_empty', title: '邮件'},
{name: 'custom', image: '32/task_empty', title: '自定义'},
{name: 'subProcess', image: '32/task_empty', title: '子流程'},
{name: 'jms', image: '32/task_empty', title: 'JMS'},
{name: 'ruleDecision', image: '32/gateway_exclusive', title: '规则决策'},
{name: 'rules', image: '32/task_empty', title: '规则'},
{name: 'human', image: '32/task_empty', title: '人工节点'},
{name: 'auto', image: '32/task_empty', title: '自动节点'},
{name: 'counter-sign', image: '32/task_empty', title: '会签节点'}
], '__gef_jbs_palette__');
}
});
Ext.ux.TwoCombo = Ext.extend(Ext.form.ComboBox, {
initComponent: function() {
this.readOnly = true;
this.displayField = 'text';
this.valueField = 'value';
this.triggerAction = 'all';
this.mode = 'local';
this.emptyText = 'Please Select...';
this.store = new Ext.data.SimpleStore({
fields: ['value', 'text']
});
this.store.loadData(this.data);
Ext.ux.TwoCombo.superclass.initComponent.call(this);
}
});
Ext.reg('twocombo', Ext.ux.TwoCombo);