Merge pull request #472 from marcoAntonioNina/BUG-9573
BUG 9573 Any user has the start new case button in his/her... SOLVED
This commit is contained in:
@@ -27,7 +27,8 @@ global $G_TMP_MENU;
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption('FOLDERS', '', G::LoadTranslation('ID_CASES_MENU_FOLDERS'), '', '', 'blockHeader');
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_START_CASE', 'casesStartPage?action=startCase',
|
||||
G::LoadTranslation('ID_NEW_CASE'), '');
|
||||
G::LoadTranslation('ID_NEW_CASE'), '');
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_INBOX', 'casesListExtJs?action=todo', G::LoadTranslation('ID_INBOX'),
|
||||
'icon-cases-inbox.png');
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_DRAFT', 'casesListExtJs?action=draft', G::LoadTranslation('ID_DRAFT'),
|
||||
|
||||
@@ -21,6 +21,18 @@ var processNumbers = new Ext.data.ArrayStore({
|
||||
var processNumbersData = [[0,0,0,0,0]];
|
||||
Docs = {};
|
||||
|
||||
var infoCase = new Ext.form.FormPanel({
|
||||
xtype: 'panel',
|
||||
region : 'center',
|
||||
width : '100%',
|
||||
labelAlign: 'right',
|
||||
waitMsgTarget: true,
|
||||
layout:'form',
|
||||
bodyStyle:'padding:25px',
|
||||
height: 'auto',
|
||||
html: _('ID_CASES_NOT_START')
|
||||
});
|
||||
|
||||
Ext.onReady(function() {
|
||||
var newCaseTree = new Ext.ux.MaskTree({
|
||||
id: 'startCaseTreePanel',
|
||||
@@ -91,14 +103,24 @@ Ext.onReady(function() {
|
||||
}
|
||||
],
|
||||
listeners : {
|
||||
dblclick : function(n) {
|
||||
openCaseA(n);
|
||||
},
|
||||
click : function(n) {
|
||||
showDetailsA(n);
|
||||
}
|
||||
dblclick : function(n) {
|
||||
openCaseA(n);
|
||||
},
|
||||
click : function(n) {
|
||||
showDetailsA(n);
|
||||
},
|
||||
load: function(node){
|
||||
if (node.childNodes.length == 0)
|
||||
{
|
||||
infoCase.show();
|
||||
} else {
|
||||
newCaseTree.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var details = {
|
||||
xtype:'form',
|
||||
@@ -254,13 +276,14 @@ Ext.onReady(function() {
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Ext.QuickTips.init();
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
layout : 'border',
|
||||
items : [newCaseTree, details]
|
||||
});
|
||||
|
||||
Ext.QuickTips.init();
|
||||
|
||||
newCaseTree.hide();infoCase.hide();
|
||||
var viewport = new Ext.Viewport({
|
||||
layout : 'border',
|
||||
items : [ infoCase , newCaseTree, details]
|
||||
});
|
||||
|
||||
//routine to hide the debug panel if it is open
|
||||
if( typeof parent != 'undefined' ){
|
||||
|
||||
Reference in New Issue
Block a user