@@ -250,9 +250,20 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
//Code export - exportGranular (handle)
|
//Code export - exportGranular (handle)
|
||||||
var exportProcessOption;
|
var exportProcessOption;
|
||||||
|
var granularExportProcessOption;
|
||||||
|
var normalExportProcessOption = {
|
||||||
|
id: "export",
|
||||||
|
disabled: true,
|
||||||
|
text: _("ID_EXPORT"),
|
||||||
|
iconCls: "silk-add",
|
||||||
|
icon: "/images/export.png",
|
||||||
|
handler: function () {
|
||||||
|
exportProcess();
|
||||||
|
}
|
||||||
|
};
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
if (isGranularFeature) {
|
if (isGranularFeature) {
|
||||||
exportProcessOption = {
|
granularExportProcessOption = {
|
||||||
xtype: "tbsplit",
|
xtype: "tbsplit",
|
||||||
id: "export",
|
id: "export",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
@@ -277,18 +288,10 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
exportProcessOption = granularExportProcessOption;
|
||||||
} else {
|
} else {
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
exportProcessOption = {
|
exportProcessOption = normalExportProcessOption;
|
||||||
id: "export",
|
|
||||||
disabled: true,
|
|
||||||
text: _("ID_EXPORT"),
|
|
||||||
iconCls: "silk-add",
|
|
||||||
icon: "/images/export.png",
|
|
||||||
handler: function () {
|
|
||||||
exportProcess();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
@@ -470,6 +473,17 @@ Ext.onReady(function(){
|
|||||||
var activator = Ext.getCmp('activator');
|
var activator = Ext.getCmp('activator');
|
||||||
|
|
||||||
activator.setDisabled(false);
|
activator.setDisabled(false);
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
if(rowSelected.data.PROJECT_TYPE === 'bpmn' && isGranularFeature){
|
||||||
|
processesGrid.getTopToolbar().remove('export');
|
||||||
|
processesGrid.getTopToolbar().insert(6, granularExportProcessOption);
|
||||||
|
processesGrid.getTopToolbar().doLayout();
|
||||||
|
} else {
|
||||||
|
processesGrid.getTopToolbar().remove('export');
|
||||||
|
processesGrid.getTopToolbar().insert(6, normalExportProcessOption);
|
||||||
|
processesGrid.getTopToolbar().doLayout();
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
Ext.ComponentMgr.get("export").setDisabled(false);
|
Ext.ComponentMgr.get("export").setDisabled(false);
|
||||||
|
|
||||||
if( rowSelected.data.PRO_STATUS == 'ACTIVE' ){
|
if( rowSelected.data.PRO_STATUS == 'ACTIVE' ){
|
||||||
@@ -527,13 +541,34 @@ Ext.onReady(function(){
|
|||||||
function onMessageContextMenu(grid, rowIndex, e) {
|
function onMessageContextMenu(grid, rowIndex, e) {
|
||||||
e.stopEvent();
|
e.stopEvent();
|
||||||
var coords = e.getXY();
|
var coords = e.getXY();
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
var rowSelected = grid.getStore().getAt(rowIndex);
|
||||||
|
if(rowSelected.data.PROJECT_TYPE === 'bpmn' && isGranularFeature) {
|
||||||
|
messageContextMenu.remove('export-menu');
|
||||||
|
messageContextMenu.addItem(granularMenuExportOption);
|
||||||
|
} else {
|
||||||
|
messageContextMenu.remove('export-menu');
|
||||||
|
messageContextMenu.addItem(normalMenuExportOption);
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
messageContextMenu.showAt([coords[0], coords[1]]);
|
messageContextMenu.showAt([coords[0], coords[1]]);
|
||||||
}
|
}
|
||||||
//code export - exportGranular (handler)
|
//code export - exportGranular (handler)
|
||||||
var menuExportOption;
|
var menuExportOption;
|
||||||
|
var granularMenuExportOption;
|
||||||
|
var normalMenuExportOption = {
|
||||||
|
id: 'export-menu',
|
||||||
|
text: _("ID_EXPORT"),
|
||||||
|
icon: "/images/export.png",
|
||||||
|
handler: function () {
|
||||||
|
exportProcess();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
if (isGranularFeature) {
|
if (isGranularFeature) {
|
||||||
menuExportOption = {
|
granularMenuExportOption = {
|
||||||
|
id: 'export-menu',
|
||||||
text: _("ID_EXPORT"),
|
text: _("ID_EXPORT"),
|
||||||
icon: "/images/export.png",
|
icon: "/images/export.png",
|
||||||
menu: {
|
menu: {
|
||||||
@@ -557,15 +592,10 @@ Ext.onReady(function(){
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
menuExportOption = granularMenuExportOption;
|
||||||
} else {
|
} else {
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
menuExportOption = {
|
menuExportOption = normalMenuExportOption;
|
||||||
text: _("ID_EXPORT"),
|
|
||||||
icon: "/images/export.png",
|
|
||||||
handler: function () {
|
|
||||||
exportProcess();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user