2011-01-07 14:16:10 +00:00
|
|
|
//Ext.BLANK_IMAGE_URL = 'resources/s.gif';
|
|
|
|
|
var startCaseFilter;
|
2015-11-10 16:19:05 -04:00
|
|
|
var newCaseNewTab;
|
2011-01-07 14:16:10 +00:00
|
|
|
|
|
|
|
|
Ext.chart.Chart.CHART_URL = '/images/charts.swf';
|
|
|
|
|
Ext.FlashComponent.EXPRESS_INSTALL_URL = '/images/expressinstall.swf';
|
|
|
|
|
// The Quicktips are used for the toolbar and Tree mouseover tooltips!
|
2011-03-30 17:52:27 -04:00
|
|
|
|
2011-01-07 14:16:10 +00:00
|
|
|
var conn = new Ext.data.Connection();
|
|
|
|
|
|
2011-03-30 17:52:27 -04:00
|
|
|
Docs = {};
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2012-08-15 10:21:09 -04:00
|
|
|
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')
|
|
|
|
|
});
|
|
|
|
|
|
2011-03-30 17:52:27 -04:00
|
|
|
Ext.onReady(function() {
|
|
|
|
|
var newCaseTree = new Ext.ux.MaskTree({
|
|
|
|
|
id: 'startCaseTreePanel',
|
|
|
|
|
region: 'center',
|
|
|
|
|
useArrows: true,
|
|
|
|
|
animate: true,
|
|
|
|
|
split : true,
|
|
|
|
|
autoScroll: true,
|
|
|
|
|
dataUrl: 'casesStartPage_Ajax?action=getProcessList',
|
|
|
|
|
rootVisible: false,
|
|
|
|
|
containerScroll: true,
|
|
|
|
|
border: false,
|
|
|
|
|
root: {
|
|
|
|
|
nodeType: 'async',
|
|
|
|
|
expanded : true
|
|
|
|
|
},
|
|
|
|
|
tbar : [
|
|
|
|
|
{
|
|
|
|
|
xtype : 'textfield',
|
|
|
|
|
name : 'processesFilter',
|
|
|
|
|
id : 'processesFilter',
|
2012-09-24 13:06:05 -04:00
|
|
|
emptyText : _('ID_FIND_A_PROCESS'),
|
2011-03-30 17:52:27 -04:00
|
|
|
enableKeyEvents : true,
|
|
|
|
|
listeners : {
|
|
|
|
|
render : function(f) {
|
|
|
|
|
startCaseFilter = new Ext.ux.tree.TreeFilterX(Ext.getCmp('startCaseTreePanel'));
|
|
|
|
|
},
|
|
|
|
|
specialkey : function(f, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
txt = Ext.getCmp('processesFilter').getValue();
|
|
|
|
|
startCaseFilter.clear();
|
|
|
|
|
var re = new RegExp('.*' + txt + '.*', 'i');
|
|
|
|
|
startCaseFilter.filter(re, 'text');
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope : this
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
text : 'X',
|
|
|
|
|
ctCls : 'pm_search_x_button',
|
|
|
|
|
handler : function() {
|
2013-06-03 18:13:38 -04:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'casesStartPage_Ajax' ,
|
|
|
|
|
params : {action : 'verifySession'},
|
|
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
if( data.lostSession ) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: _('ID_ERROR'),
|
|
|
|
|
msg: data.message,
|
|
|
|
|
animEl: 'elId',
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.MessageBox.OK,
|
|
|
|
|
fn : function(btn) {
|
BUG 11969 Web session TimeOut at HOME
Se realizo una correccion de los direccionamientos de los iframes al perder sesion, ya q siempre q se perdia sesion antes, se mostraba dentro del mismo iframe el cuadro para volverse a logear, logrando asi q el usuario se mantenga en el mismo iframe una ves se relogee, sin tener asi q volver a buscar el lugar donde estaba trabajando. A pedido de QA, ahora se muestra el cuadro de logeo en el iframe mayor, totalmente fuera de PM, y siempre al volver a logearse se redirecciona al tab HOME > Index, y ya no asi al frame o lugar exacto donde se perdio sesion.
Por ejemplo: si se pie sesion en el listado Draft, no se volvera a dicho listado, sino en cambio al volverse a logear se redireccionara a HOME > Indexdex.
El cambio se aplico a los lugares donde se podia redireccionar al parent.
Se tomo en cuenta tambien que algunos clientes utilizan el listado de casos dentro de sus propias webs.
2013-09-02 17:45:37 -04:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
prnt = parent.parent;
|
|
|
|
|
top.location = top.location;
|
|
|
|
|
}
|
|
|
|
|
catch (err)
|
|
|
|
|
{
|
|
|
|
|
parent.location = parent.location;
|
|
|
|
|
}
|
2013-06-03 18:13:38 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Ext.getCmp('processesFilter').setValue('');
|
|
|
|
|
startCaseFilter.clear();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
if (typeof(result.responseText) != 'undefined') {
|
|
|
|
|
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2011-03-30 17:52:27 -04:00
|
|
|
}
|
|
|
|
|
}, ' ', ' ', {
|
|
|
|
|
iconCls : 'icon-expand-all',
|
2012-09-24 13:06:05 -04:00
|
|
|
tooltip : _('ID_EXPAND_ALL'),
|
2011-03-30 17:52:27 -04:00
|
|
|
handler : function() {
|
2013-06-03 18:13:38 -04:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'casesStartPage_Ajax' ,
|
|
|
|
|
params : {action : 'verifySession'},
|
|
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
if( data.lostSession ) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: _('ID_ERROR'),
|
|
|
|
|
msg: data.message,
|
|
|
|
|
animEl: 'elId',
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.MessageBox.OK,
|
|
|
|
|
fn : function(btn) {
|
BUG 11969 Web session TimeOut at HOME
Se realizo una correccion de los direccionamientos de los iframes al perder sesion, ya q siempre q se perdia sesion antes, se mostraba dentro del mismo iframe el cuadro para volverse a logear, logrando asi q el usuario se mantenga en el mismo iframe una ves se relogee, sin tener asi q volver a buscar el lugar donde estaba trabajando. A pedido de QA, ahora se muestra el cuadro de logeo en el iframe mayor, totalmente fuera de PM, y siempre al volver a logearse se redirecciona al tab HOME > Index, y ya no asi al frame o lugar exacto donde se perdio sesion.
Por ejemplo: si se pie sesion en el listado Draft, no se volvera a dicho listado, sino en cambio al volverse a logear se redireccionara a HOME > Indexdex.
El cambio se aplico a los lugares donde se podia redireccionar al parent.
Se tomo en cuenta tambien que algunos clientes utilizan el listado de casos dentro de sus propias webs.
2013-09-02 17:45:37 -04:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
prnt = parent.parent;
|
|
|
|
|
top.location = top.location;
|
|
|
|
|
}
|
|
|
|
|
catch (err)
|
|
|
|
|
{
|
|
|
|
|
parent.location = parent.location;
|
|
|
|
|
}
|
2013-06-03 18:13:38 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Ext.getCmp("startCaseTreePanel").root.expand(true);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
if (typeof(result.responseText) != 'undefined') {
|
|
|
|
|
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2011-03-30 17:52:27 -04:00
|
|
|
},
|
|
|
|
|
scope : this
|
|
|
|
|
}, '-', {
|
|
|
|
|
iconCls : 'icon-collapse-all',
|
2012-09-24 13:06:05 -04:00
|
|
|
tooltip : _('ID_COLLAPSE_ALL'),
|
2011-03-30 17:52:27 -04:00
|
|
|
handler : function() {
|
2013-06-03 18:13:38 -04:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'casesStartPage_Ajax' ,
|
|
|
|
|
params : {action : 'verifySession'},
|
|
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
if( data.lostSession ) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: _('ID_ERROR'),
|
|
|
|
|
msg: data.message,
|
|
|
|
|
animEl: 'elId',
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.MessageBox.OK,
|
|
|
|
|
fn : function(btn) {
|
BUG 11969 Web session TimeOut at HOME
Se realizo una correccion de los direccionamientos de los iframes al perder sesion, ya q siempre q se perdia sesion antes, se mostraba dentro del mismo iframe el cuadro para volverse a logear, logrando asi q el usuario se mantenga en el mismo iframe una ves se relogee, sin tener asi q volver a buscar el lugar donde estaba trabajando. A pedido de QA, ahora se muestra el cuadro de logeo en el iframe mayor, totalmente fuera de PM, y siempre al volver a logearse se redirecciona al tab HOME > Index, y ya no asi al frame o lugar exacto donde se perdio sesion.
Por ejemplo: si se pie sesion en el listado Draft, no se volvera a dicho listado, sino en cambio al volverse a logear se redireccionara a HOME > Indexdex.
El cambio se aplico a los lugares donde se podia redireccionar al parent.
Se tomo en cuenta tambien que algunos clientes utilizan el listado de casos dentro de sus propias webs.
2013-09-02 17:45:37 -04:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
prnt = parent.parent;
|
|
|
|
|
top.location = top.location;
|
|
|
|
|
}
|
|
|
|
|
catch (err)
|
|
|
|
|
{
|
|
|
|
|
parent.location = parent.location;
|
|
|
|
|
}
|
2013-06-03 18:13:38 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Ext.getCmp("startCaseTreePanel").root.collapse(true);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
if (typeof(result.responseText) != 'undefined') {
|
|
|
|
|
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2011-03-30 17:52:27 -04:00
|
|
|
},
|
|
|
|
|
scope : this
|
|
|
|
|
}, ' ', ' ', {
|
|
|
|
|
xtype : 'tbbutton',
|
|
|
|
|
cls : 'x-btn-icon',
|
|
|
|
|
icon : '/images/refresh.gif',
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2011-03-30 17:52:27 -04:00
|
|
|
handler : function() {
|
2013-06-03 18:13:38 -04:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'casesStartPage_Ajax' ,
|
|
|
|
|
params : {action : 'verifySession'},
|
|
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
if( data.lostSession ) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: _('ID_ERROR'),
|
|
|
|
|
msg: data.message,
|
|
|
|
|
animEl: 'elId',
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.MessageBox.OK,
|
|
|
|
|
fn : function(btn) {
|
BUG 11969 Web session TimeOut at HOME
Se realizo una correccion de los direccionamientos de los iframes al perder sesion, ya q siempre q se perdia sesion antes, se mostraba dentro del mismo iframe el cuadro para volverse a logear, logrando asi q el usuario se mantenga en el mismo iframe una ves se relogee, sin tener asi q volver a buscar el lugar donde estaba trabajando. A pedido de QA, ahora se muestra el cuadro de logeo en el iframe mayor, totalmente fuera de PM, y siempre al volver a logearse se redirecciona al tab HOME > Index, y ya no asi al frame o lugar exacto donde se perdio sesion.
Por ejemplo: si se pie sesion en el listado Draft, no se volvera a dicho listado, sino en cambio al volverse a logear se redireccionara a HOME > Indexdex.
El cambio se aplico a los lugares donde se podia redireccionar al parent.
Se tomo en cuenta tambien que algunos clientes utilizan el listado de casos dentro de sus propias webs.
2013-09-02 17:45:37 -04:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
prnt = parent.parent;
|
|
|
|
|
top.location = top.location;
|
|
|
|
|
}
|
|
|
|
|
catch (err)
|
|
|
|
|
{
|
|
|
|
|
parent.location = parent.location;
|
|
|
|
|
}
|
2013-06-03 18:13:38 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
tree = Ext.getCmp('startCaseTreePanel');
|
|
|
|
|
tree.getLoader().load(tree.root);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
if (typeof(result.responseText) != 'undefined') {
|
|
|
|
|
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2011-03-30 17:52:27 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
listeners : {
|
2012-08-15 10:21:09 -04:00
|
|
|
dblclick : function(n) {
|
|
|
|
|
openCaseA(n);
|
|
|
|
|
},
|
|
|
|
|
click : function(n) {
|
2013-06-03 18:13:38 -04:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'casesStartPage_Ajax' ,
|
|
|
|
|
params : {action : 'verifySession'},
|
|
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
if( data.lostSession ) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title: _('ID_ERROR'),
|
|
|
|
|
msg: data.message,
|
|
|
|
|
animEl: 'elId',
|
|
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
|
|
buttons: Ext.MessageBox.OK,
|
|
|
|
|
fn : function(btn) {
|
BUG 11969 Web session TimeOut at HOME
Se realizo una correccion de los direccionamientos de los iframes al perder sesion, ya q siempre q se perdia sesion antes, se mostraba dentro del mismo iframe el cuadro para volverse a logear, logrando asi q el usuario se mantenga en el mismo iframe una ves se relogee, sin tener asi q volver a buscar el lugar donde estaba trabajando. A pedido de QA, ahora se muestra el cuadro de logeo en el iframe mayor, totalmente fuera de PM, y siempre al volver a logearse se redirecciona al tab HOME > Index, y ya no asi al frame o lugar exacto donde se perdio sesion.
Por ejemplo: si se pie sesion en el listado Draft, no se volvera a dicho listado, sino en cambio al volverse a logear se redireccionara a HOME > Indexdex.
El cambio se aplico a los lugares donde se podia redireccionar al parent.
Se tomo en cuenta tambien que algunos clientes utilizan el listado de casos dentro de sus propias webs.
2013-09-02 17:45:37 -04:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
prnt = parent.parent;
|
|
|
|
|
top.location = top.location;
|
|
|
|
|
}
|
|
|
|
|
catch (err)
|
|
|
|
|
{
|
|
|
|
|
parent.location = parent.location;
|
|
|
|
|
}
|
2013-06-03 18:13:38 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
showDetailsA(n);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
if (typeof(result.responseText) != 'undefined') {
|
|
|
|
|
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2012-08-15 10:21:09 -04:00
|
|
|
},
|
|
|
|
|
load: function(node){
|
|
|
|
|
if (node.childNodes.length == 0)
|
|
|
|
|
{
|
|
|
|
|
infoCase.show();
|
|
|
|
|
} else {
|
|
|
|
|
newCaseTree.show();
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-03-30 17:52:27 -04:00
|
|
|
}
|
|
|
|
|
});
|
2012-09-24 13:06:05 -04:00
|
|
|
|
2012-08-15 10:21:09 -04:00
|
|
|
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2011-03-30 17:52:27 -04:00
|
|
|
var details = {
|
2012-05-02 11:25:54 -04:00
|
|
|
xtype:'form',
|
|
|
|
|
id : 'process-detail-panel',
|
2012-09-24 13:06:05 -04:00
|
|
|
region : 'east',
|
2012-05-02 11:25:54 -04:00
|
|
|
split : true,
|
|
|
|
|
width : 450,
|
|
|
|
|
style : {
|
|
|
|
|
width : '450'
|
|
|
|
|
},
|
|
|
|
|
minWidth : 250,
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
labelWidth: 85,
|
|
|
|
|
waitMsgTarget: true,
|
|
|
|
|
title: TRANSLATIONS.ID_PROCESS_INFORMATION,
|
|
|
|
|
layout:'form',
|
|
|
|
|
defaults: {width: 350},
|
|
|
|
|
defaultType: 'displayfield',
|
2013-02-06 20:13:57 -04:00
|
|
|
autoScroll: true,
|
2012-05-02 11:25:54 -04:00
|
|
|
items: [{
|
|
|
|
|
fieldLabel: TRANSLATIONS.ID_PROCESS,
|
|
|
|
|
name: 'processName',
|
|
|
|
|
allowBlank:false,
|
|
|
|
|
value: '',
|
2012-06-01 15:11:28 -04:00
|
|
|
labelStyle : 'font-size:11px;',
|
|
|
|
|
style : {
|
|
|
|
|
fontSize:'11px'
|
|
|
|
|
},
|
2013-02-07 03:14:25 -04:00
|
|
|
id:"processName",
|
|
|
|
|
htmlEncode: true
|
2011-01-12 15:57:47 +00:00
|
|
|
},
|
2012-05-02 11:25:54 -04:00
|
|
|
{
|
|
|
|
|
xtype: 'compositefield',
|
2012-09-24 13:06:05 -04:00
|
|
|
fieldLabel: TRANSLATIONS.ID_TASK,
|
2012-06-01 15:11:28 -04:00
|
|
|
labelStyle : 'font-size:11px;',
|
|
|
|
|
style : {
|
|
|
|
|
fontSize:'11px'
|
|
|
|
|
},
|
2012-05-02 11:25:54 -04:00
|
|
|
items: [
|
2011-03-30 17:52:27 -04:00
|
|
|
{
|
2012-05-02 11:25:54 -04:00
|
|
|
xtype : 'button',
|
|
|
|
|
id : 'starCaseButton',
|
|
|
|
|
disabled : true,
|
2018-05-16 09:23:31 -04:00
|
|
|
iconCls : "button_menu_ext ICON_CASES_START_CASE",
|
2012-05-02 11:25:54 -04:00
|
|
|
text : TRANSLATIONS.ID_TITLE_START_CASE,
|
|
|
|
|
autoWidth : true,
|
|
|
|
|
handler : function() {
|
|
|
|
|
tree = Ext.getCmp('startCaseTreePanel');
|
|
|
|
|
var selectedNode = tree.getSelectionModel().getSelectedNode();
|
|
|
|
|
if (selectedNode) {
|
|
|
|
|
openCaseA(selectedNode);
|
2011-03-30 17:52:27 -04:00
|
|
|
}
|
2012-05-02 11:25:54 -04:00
|
|
|
}
|
2011-03-30 17:52:27 -04:00
|
|
|
},
|
|
|
|
|
{
|
2012-05-02 11:25:54 -04:00
|
|
|
xtype : 'displayfield',
|
|
|
|
|
name: 'taskName',
|
|
|
|
|
allowBlank:false,
|
|
|
|
|
value: '',
|
|
|
|
|
width:200,
|
2013-02-07 03:14:25 -04:00
|
|
|
id:"taskName",
|
|
|
|
|
htmlEncode: true
|
2012-05-02 11:25:54 -04:00
|
|
|
}
|
|
|
|
|
]},
|
|
|
|
|
{
|
2011-03-30 17:52:27 -04:00
|
|
|
xtype:'textarea',
|
2012-05-02 11:25:54 -04:00
|
|
|
fieldLabel: TRANSLATIONS.ID_DESCRIPTION,
|
|
|
|
|
name: 'processDescription',
|
2011-03-30 17:52:27 -04:00
|
|
|
value: '',
|
2012-05-02 11:25:54 -04:00
|
|
|
readOnly: true,
|
2012-06-01 15:11:28 -04:00
|
|
|
labelStyle : 'font-size:11px;',
|
|
|
|
|
style : {
|
|
|
|
|
fontSize:'11px'
|
|
|
|
|
},
|
2012-05-02 11:25:54 -04:00
|
|
|
id:"processDescription"
|
|
|
|
|
},{
|
|
|
|
|
fieldLabel: TRANSLATIONS.ID_CATEGORY,
|
|
|
|
|
name: 'processCategory',
|
|
|
|
|
value: '',
|
2011-03-30 17:52:27 -04:00
|
|
|
readOnly: true,
|
2012-06-01 15:11:28 -04:00
|
|
|
labelStyle : 'font-size:11px;',
|
|
|
|
|
style : {
|
|
|
|
|
fontSize:'11px'
|
|
|
|
|
},
|
2013-02-07 03:14:25 -04:00
|
|
|
id:"processCategory",
|
|
|
|
|
htmlEncode: true
|
2012-05-02 11:25:54 -04:00
|
|
|
},
|
|
|
|
|
{
|
2012-09-24 13:06:05 -04:00
|
|
|
fieldLabel: TRANSLATIONS.ID_CALENDAR,
|
2012-05-02 11:25:54 -04:00
|
|
|
name: 'calendarName',
|
2012-06-01 15:11:28 -04:00
|
|
|
labelStyle : 'font-size:11px;',
|
|
|
|
|
style : {
|
|
|
|
|
fontSize:'11px'
|
|
|
|
|
},
|
2012-05-02 11:25:54 -04:00
|
|
|
id:"calendarName"
|
|
|
|
|
},
|
|
|
|
|
{
|
2011-03-30 17:52:27 -04:00
|
|
|
xtype:'checkboxgroup',
|
2012-09-24 13:06:05 -04:00
|
|
|
fieldLabel: TRANSLATIONS.ID_WORKING_DAYS,
|
2012-05-02 11:25:54 -04:00
|
|
|
name: 'calendarWorkDays',
|
|
|
|
|
disabled: true,
|
|
|
|
|
readOnly: true,
|
|
|
|
|
disabledClass:"",
|
2012-06-01 15:11:28 -04:00
|
|
|
labelStyle : 'font-size:11px;',
|
|
|
|
|
style : {
|
|
|
|
|
fontSize:'11px'
|
|
|
|
|
},
|
2012-05-02 11:25:54 -04:00
|
|
|
id:"calendarWorkDays",
|
|
|
|
|
columns: 7,
|
|
|
|
|
items: [
|
|
|
|
|
{boxLabel: TRANSLATIONS.ID_SUN, name: '0',disabledClass:""},
|
|
|
|
|
{boxLabel: TRANSLATIONS.ID_MON, name: '1',disabledClass:""},
|
|
|
|
|
{boxLabel: TRANSLATIONS.ID_TUE, name: '2',disabledClass:""},
|
|
|
|
|
{boxLabel: TRANSLATIONS.ID_WEN, name: '3',disabledClass:""},
|
|
|
|
|
{boxLabel: TRANSLATIONS.ID_THU, name: '4',disabledClass:""},
|
|
|
|
|
{boxLabel: TRANSLATIONS.ID_FRI, name: '5',disabledClass:""},
|
|
|
|
|
{boxLabel: TRANSLATIONS.ID_SAT, name: '6',disabledClass:""}
|
|
|
|
|
]
|
2012-09-24 13:06:05 -04:00
|
|
|
},
|
2012-05-02 11:25:54 -04:00
|
|
|
{
|
2011-03-30 17:52:27 -04:00
|
|
|
xtype:'checkbox',
|
2012-09-24 13:06:05 -04:00
|
|
|
fieldLabel: TRANSLATIONS.ID_DEBUG_MODE,
|
2012-05-02 11:25:54 -04:00
|
|
|
name: 'processDebug',
|
2012-06-01 15:11:28 -04:00
|
|
|
labelStyle : 'font-size:11px;',
|
|
|
|
|
style : {
|
|
|
|
|
fontSize:'11px'
|
|
|
|
|
},
|
2012-05-02 11:25:54 -04:00
|
|
|
disabled: true,
|
|
|
|
|
readOnly: true,
|
|
|
|
|
id:"processDebug",
|
|
|
|
|
disabledClass:""
|
|
|
|
|
}
|
|
|
|
|
]
|
2011-03-30 17:52:27 -04:00
|
|
|
}
|
2012-08-15 10:21:09 -04:00
|
|
|
|
|
|
|
|
Ext.QuickTips.init();
|
|
|
|
|
|
|
|
|
|
newCaseTree.hide();infoCase.hide();
|
|
|
|
|
var viewport = new Ext.Viewport({
|
|
|
|
|
layout : 'border',
|
|
|
|
|
items : [ infoCase , newCaseTree, details]
|
|
|
|
|
});
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2011-02-24 21:55:00 +00:00
|
|
|
//routine to hide the debug panel if it is open
|
|
|
|
|
if( typeof parent != 'undefined' ){
|
2011-02-24 23:11:04 +00:00
|
|
|
if( parent.PANEL_EAST_OPEN ){
|
|
|
|
|
parent.PANEL_EAST_OPEN = false;
|
|
|
|
|
parent.Ext.getCmp('debugPanel').hide();
|
|
|
|
|
parent.Ext.getCmp('debugPanel').ownerCt.doLayout();
|
2011-02-24 21:55:00 +00:00
|
|
|
}
|
|
|
|
|
}
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2011-10-19 09:15:51 -04:00
|
|
|
if (FORMATS.startCaseHideProcessInf) {
|
|
|
|
|
Ext.getCmp('process-detail-panel').hide();
|
|
|
|
|
Ext.getCmp('startCaseTreePanel').ownerCt.doLayout();
|
|
|
|
|
}
|
2011-01-07 14:16:10 +00:00
|
|
|
});
|
2011-01-12 15:57:47 +00:00
|
|
|
|
2011-01-07 14:16:10 +00:00
|
|
|
function openCaseA(n){
|
2012-05-02 11:25:54 -04:00
|
|
|
if (n.attributes.optionType == "startProcess") {
|
2016-04-14 11:44:26 -04:00
|
|
|
if(!isIE) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title : '',
|
|
|
|
|
msg : TRANSLATIONS.ID_STARTING_NEW_CASE + '<br><br><b>' + n.attributes.text + '</b>',
|
|
|
|
|
wait:true,
|
|
|
|
|
waitConfig: {interval:500}
|
|
|
|
|
});
|
|
|
|
|
}
|
2012-05-02 11:25:54 -04:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'casesStartPage_Ajax.php',
|
|
|
|
|
params : {
|
|
|
|
|
action : 'startCase',
|
|
|
|
|
processId : n.attributes.pro_uid,
|
|
|
|
|
taskId : n.attributes.tas_uid
|
|
|
|
|
},
|
|
|
|
|
success : function(response) {
|
2016-03-08 18:37:38 -04:00
|
|
|
var nameTab;
|
2012-09-24 13:06:05 -04:00
|
|
|
try {
|
2012-05-02 11:25:54 -04:00
|
|
|
var res = Ext.util.JSON.decode(response.responseText);
|
|
|
|
|
if (res.openCase) {
|
2016-04-13 15:46:29 -04:00
|
|
|
if(isIE) {
|
2015-11-10 16:19:05 -04:00
|
|
|
if(newCaseNewTab) {
|
|
|
|
|
newCaseNewTab.close();
|
|
|
|
|
}
|
2016-03-08 18:37:38 -04:00
|
|
|
nameTab = PM.Sessions.getCookie('PM-TabPrimary') + '_openCase';
|
|
|
|
|
newCaseNewTab = window.open(res.openCase.PAGE, nameTab);
|
2015-11-10 16:19:05 -04:00
|
|
|
} else {
|
2012-05-02 11:25:54 -04:00
|
|
|
window.location = res.openCase.PAGE;
|
2015-11-10 16:19:05 -04:00
|
|
|
}
|
2020-01-21 14:46:42 -04:00
|
|
|
try {
|
|
|
|
|
parent.updateCasesTree();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
// Nothing to do
|
|
|
|
|
}
|
2013-06-03 18:13:38 -04:00
|
|
|
}else if (res.lostSession) {
|
|
|
|
|
Ext.Msg.show({
|
|
|
|
|
title : TRANSLATIONS.ID_ERROR_CREATING_NEW_CASE, // 'Error creating a new Case',
|
|
|
|
|
msg : res.message,
|
|
|
|
|
icon : Ext.MessageBox.ERROR,
|
|
|
|
|
buttons : Ext.Msg.OK,
|
|
|
|
|
fn : function(btn) {
|
BUG 11969 Web session TimeOut at HOME
Se realizo una correccion de los direccionamientos de los iframes al perder sesion, ya q siempre q se perdia sesion antes, se mostraba dentro del mismo iframe el cuadro para volverse a logear, logrando asi q el usuario se mantenga en el mismo iframe una ves se relogee, sin tener asi q volver a buscar el lugar donde estaba trabajando. A pedido de QA, ahora se muestra el cuadro de logeo en el iframe mayor, totalmente fuera de PM, y siempre al volver a logearse se redirecciona al tab HOME > Index, y ya no asi al frame o lugar exacto donde se perdio sesion.
Por ejemplo: si se pie sesion en el listado Draft, no se volvera a dicho listado, sino en cambio al volverse a logear se redireccionara a HOME > Indexdex.
El cambio se aplico a los lugares donde se podia redireccionar al parent.
Se tomo en cuenta tambien que algunos clientes utilizan el listado de casos dentro de sus propias webs.
2013-09-02 17:45:37 -04:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
prnt = parent.parent;
|
|
|
|
|
top.location = top.location;
|
|
|
|
|
}
|
|
|
|
|
catch (err)
|
|
|
|
|
{
|
|
|
|
|
parent.location = parent.location;
|
|
|
|
|
}
|
2013-06-03 18:13:38 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
2012-05-02 11:25:54 -04:00
|
|
|
Ext.Msg.show({
|
|
|
|
|
title : TRANSLATIONS.ID_ERROR_CREATING_NEW_CASE, // 'Error creating a new Case',
|
|
|
|
|
msg : '<textarea cols="50" rows="10">'
|
|
|
|
|
+ res.message + '</textarea>',
|
|
|
|
|
icon : Ext.MessageBox.ERROR,
|
|
|
|
|
buttons : Ext.Msg.OK
|
|
|
|
|
});
|
2012-09-24 13:06:05 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(e) {
|
2012-05-02 11:25:54 -04:00
|
|
|
Ext.Msg.show({
|
|
|
|
|
title : TRANSLATIONS.ID_ERROR_CREATING_NEW_CASE, // 'Error creating a new Case',
|
|
|
|
|
msg : 'JSON Decode Error:<br /><textarea cols="50" rows="2">'
|
|
|
|
|
+ e.message + '</textarea><br />Server Response<br /><textarea cols="50" rows="5">'+response.responseText+'</textarea>',
|
|
|
|
|
icon : Ext.MessageBox.ERROR,
|
|
|
|
|
buttons : Ext.Msg.OK
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure : function() {
|
2012-09-24 13:06:05 -04:00
|
|
|
Ext.Msg.alert(TRANSLATIONS.ID_ERROR, TRANSLATIONS.ID_UNABLE_START_CASE);
|
2012-05-02 11:25:54 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2011-01-07 14:16:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function showDetailsA(selectedNode) {
|
|
|
|
|
|
2011-03-30 17:52:27 -04:00
|
|
|
// console.log(selectedNode);
|
|
|
|
|
var detailEl = Ext.getCmp('process-detail-panel').body;
|
|
|
|
|
if ((selectedNode)&&(selectedNode.attributes.otherAttributes)) {
|
|
|
|
|
otherAttributes = selectedNode.attributes.otherAttributes;
|
|
|
|
|
calendarDays=(otherAttributes.CALENDAR_WORK_DAYS).split("|");
|
2013-02-25 12:03:24 -04:00
|
|
|
calendarObj={0: false, 1: false, 2: false, 3: false, 4: false, 5: false, 6: false};
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2011-03-30 17:52:27 -04:00
|
|
|
for(i=0;i<calendarDays.length;i++){
|
|
|
|
|
calendarObj[calendarDays[i]]=true;
|
|
|
|
|
}
|
|
|
|
|
//console.log(otherAttributes);
|
|
|
|
|
//starCaseButton
|
|
|
|
|
Ext.ComponentMgr.get("starCaseButton").enable();
|
|
|
|
|
Ext.getCmp('process-detail-panel').getForm().setValues({
|
|
|
|
|
processName : otherAttributes.PRO_TITLE,
|
|
|
|
|
taskName : otherAttributes.PRO_TAS_TITLE,
|
|
|
|
|
calendarName : otherAttributes.CALENDAR_NAME,
|
|
|
|
|
calendarDescription : otherAttributes.CALENDAR_DESCRIPTION,
|
|
|
|
|
processCalendar:otherAttributes.CALENDAR_NAME+" "+otherAttributes.CALENDAR_DESCRIPTION,
|
|
|
|
|
calendarWorkDays : calendarObj,/* (otherAttributes.CALENDAR_WORK_DAYS).split("|"), */
|
|
|
|
|
processCategory : otherAttributes.PRO_CATEGORY_LABEL,
|
|
|
|
|
processDebug : otherAttributes.PRO_DEBUG,
|
|
|
|
|
processDescription : otherAttributes.PRO_DESCRIPTION,
|
|
|
|
|
myInbox : otherAttributes.myInbox,
|
|
|
|
|
totalInbox : otherAttributes.totalInbox
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2011-03-30 17:52:27 -04:00
|
|
|
});
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2012-05-02 11:25:54 -04:00
|
|
|
} else {
|
|
|
|
|
//detailEl.update('');
|
|
|
|
|
}
|
2011-01-07 14:16:10 +00:00
|
|
|
|
2012-05-02 11:25:54 -04:00
|
|
|
return;
|
2011-01-07 14:16:10 +00:00
|
|
|
};
|
2011-03-30 17:52:27 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.ux.MaskTree = Ext.extend(Ext.tree.TreePanel, {
|
|
|
|
|
/**
|
|
|
|
|
* @cfg {Boolean} mask Indicates if the tree panel should have a loadmask applied when loading nodes
|
|
|
|
|
*/
|
|
|
|
|
mask: true,
|
|
|
|
|
/**
|
|
|
|
|
* @cfg {Object} maskConfig A configuration object that can be applied to the loadmask.
|
|
|
|
|
*/
|
|
|
|
|
maskConfig: { msg: _('ID_LOADING') },
|
|
|
|
|
|
|
|
|
|
//init
|
|
|
|
|
initComponent:function() {
|
|
|
|
|
// call parent
|
|
|
|
|
Ext.ux.MaskTree.superclass.initComponent.apply(this, arguments);
|
|
|
|
|
|
|
|
|
|
if (this.mask) { this.on('render', this.createMask, this); }
|
|
|
|
|
}, //end initComponent
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @private
|
|
|
|
|
*/
|
|
|
|
|
createMask: function() {
|
|
|
|
|
var mask = new Ext.LoadMask(Ext.getBody(), this.maskConfig);
|
|
|
|
|
this.getLoader().on('beforeload', mask.show, mask);
|
|
|
|
|
this.getLoader().on('load', mask.hide, mask);
|
|
|
|
|
}
|
|
|
|
|
}); // end of extend
|
|
|
|
|
|
2015-11-10 16:19:05 -04:00
|
|
|
Ext.reg('masktree', Ext.ux.MaskTree);
|
|
|
|
|
|
|
|
|
|
Ext.EventManager.on(window, 'beforeunload', function () {
|
|
|
|
|
if(newCaseNewTab) {
|
|
|
|
|
newCaseNewTab.close();
|
|
|
|
|
}
|
|
|
|
|
});
|