BUG 0000 Fixing a litle bug when opening a case
- problem found when a case was open and a node need to set into cases steps tree - validation missing added
This commit is contained in:
@@ -766,7 +766,8 @@ Ext.onReady(function(){
|
||||
|
||||
if( tab ) {
|
||||
TabPanel.setActiveTab(tabId);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
TabPanel.add({
|
||||
id: tabId,
|
||||
title: menuSelectedTitle[name],
|
||||
@@ -783,10 +784,8 @@ Ext.onReady(function(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
/*-----added by krlos------------*/
|
||||
Actions.adhocAssignmentUsers = function()
|
||||
{
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
@@ -827,98 +826,94 @@ Ext.onReady(function(){
|
||||
});
|
||||
|
||||
var adHocUserGrid = new Ext.grid.GridPanel( {
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
id: 'adHocUserGrid',
|
||||
height:210,
|
||||
//autoWidth : true,
|
||||
width:'',
|
||||
title : '',
|
||||
stateful : true,
|
||||
stateId : 'grid',
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: true,
|
||||
frame:false,
|
||||
columnLines: true,
|
||||
viewConfig: {
|
||||
forceFit:true
|
||||
},
|
||||
cm: cmk,
|
||||
store: store,
|
||||
tbar:[{text:_('ID_ASSIGN'), iconCls: 'silk-add', icon: '/images/cases-selfservice.png', handler: assignAdHocUser} ],
|
||||
bbar: '',
|
||||
listeners:{
|
||||
rowdblclick: assignAdHocUser
|
||||
}
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
id: 'adHocUserGrid',
|
||||
height:210,
|
||||
//autoWidth : true,
|
||||
width:'',
|
||||
title : '',
|
||||
stateful : true,
|
||||
stateId : 'grid',
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: true,
|
||||
frame:false,
|
||||
columnLines: true,
|
||||
viewConfig: {
|
||||
forceFit:true
|
||||
},
|
||||
cm: cmk,
|
||||
store: store,
|
||||
tbar:[
|
||||
{
|
||||
text:_('ID_ASSIGN'),
|
||||
iconCls: 'silk-add',
|
||||
icon: '/images/cases-selfservice.png',
|
||||
handler: assignAdHocUser
|
||||
}
|
||||
],
|
||||
bbar: '',
|
||||
listeners:{
|
||||
rowdblclick: assignAdHocUser
|
||||
}
|
||||
});
|
||||
|
||||
var w = new Ext.Window({
|
||||
title: _('ID_ADHOC_ASSIGNMENT'),
|
||||
width: 500,
|
||||
height: 240,
|
||||
resizable: false,
|
||||
items: [ adHocUserGrid ],
|
||||
id: 'w'
|
||||
title: _('ID_ADHOC_ASSIGNMENT'),
|
||||
width: 500,
|
||||
height: 240,
|
||||
resizable: false,
|
||||
items: [ adHocUserGrid ],
|
||||
id: 'w'
|
||||
});
|
||||
adHocUserGrid.store.load();
|
||||
w.show();
|
||||
|
||||
function assignAdHocUser(){
|
||||
rowSelected = adHocUserGrid.getSelectionModel().getSelected();
|
||||
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_ADHOCUSER_CASE'), function(){
|
||||
function assignAdHocUser()
|
||||
{
|
||||
rowSelected = adHocUserGrid.getSelectionModel().getSelected();
|
||||
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_ADHOCUSER_CASE'), function(){
|
||||
var loadMask = new Ext.LoadMask(document.body, {msg:'Assignment case...'});
|
||||
loadMask.show();
|
||||
Ext.Ajax.request({
|
||||
url : '../adhocUserProxy/reassignCase' ,
|
||||
method: 'POST',
|
||||
params : {USR_UID: rowSelected.data.USR_UID, THETYPE: 'ADHOC'},
|
||||
success: function ( result, request ) {
|
||||
loadMask.hide();
|
||||
var data = Ext.util.JSON.decode(result.responseText);
|
||||
if( data.success ) {
|
||||
CloseWindow();
|
||||
location.href = 'casesListExtJs';
|
||||
} else {
|
||||
PMExt.error(_('ID_ERROR'), data.msg);
|
||||
url : '../adhocUserProxy/reassignCase' ,
|
||||
method: 'POST',
|
||||
params : {USR_UID: rowSelected.data.USR_UID, THETYPE: 'ADHOC'},
|
||||
success: function ( result, request ) {
|
||||
loadMask.hide();
|
||||
var data = Ext.util.JSON.decode(result.responseText);
|
||||
if( data.success ) {
|
||||
CloseWindow();
|
||||
location.href = 'casesListExtJs';
|
||||
}
|
||||
else {
|
||||
PMExt.error(_('ID_ERROR'), data.msg);
|
||||
}
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
Ext.MessageBox.alert('Failed', result.responseText);
|
||||
}
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
Ext.MessageBox.alert('Failed', result.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
CloseWindow = function(){
|
||||
Ext.getCmp('w').hide();
|
||||
Ext.getCmp('w').hide();
|
||||
};
|
||||
|
||||
setNode = function (uid){
|
||||
var aNode = Ext.getCmp('casesStepTree').getNodeById(uid);
|
||||
setNode = function(uid){
|
||||
var stepsTree = Ext.getCmp('casesStepTree');
|
||||
|
||||
if (!stepsTree) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var node = stepsTree.getNodeById(uid);
|
||||
|
||||
if (!node) {
|
||||
return false;
|
||||
}
|
||||
|
||||
aNode.select();
|
||||
}
|
||||
|
||||
/*-----added by krlos end------------*/
|
||||
/*Date.prototype.dateFormat = function(format) {
|
||||
var result = "";
|
||||
for (var i = 0; i < format.length; ++i) {
|
||||
result += this.dateToString(format.charAt(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Date.prototype.dateToString = function(character) {
|
||||
switch (character) {
|
||||
case "Y":
|
||||
return this.getFullYear();
|
||||
|
||||
case "d":
|
||||
return this.getDate();
|
||||
|
||||
case "m":
|
||||
return this.getMonth();
|
||||
// snip a bunch of lines
|
||||
default:
|
||||
return character;
|
||||
}
|
||||
}*/
|
||||
|
||||
Reference in New Issue
Block a user