2011-02-04 15:57:06 +00:00
|
|
|
var Actions = {};
|
|
|
|
|
var showCaseNavigatorPanel;
|
|
|
|
|
var hideCaseNavigatorPanel;
|
|
|
|
|
var informationMenu;
|
|
|
|
|
var caseMenuOpen = false;
|
2011-02-25 14:14:38 +00:00
|
|
|
var toReviseTreeOpen = false;
|
2011-02-04 15:57:06 +00:00
|
|
|
var menuSelectedTitle = Array();
|
|
|
|
|
var _ENV_CURRENT_DATE;
|
2012-02-13 12:55:23 -04:00
|
|
|
var winTree;
|
2011-02-04 15:57:06 +00:00
|
|
|
|
2012-03-26 16:54:43 -04:00
|
|
|
historyGridListChangeLogGlobal = {};
|
|
|
|
|
historyGridListChangeLogGlobal.idHistory = '';
|
|
|
|
|
historyGridListChangeLogGlobal.tasTitle = '';
|
|
|
|
|
|
|
|
|
|
historyGridListChangeLogGlobal.viewIdDin = '';
|
|
|
|
|
historyGridListChangeLogGlobal.viewIdHistory = '';
|
|
|
|
|
historyGridListChangeLogGlobal.viewDynaformName = '';
|
|
|
|
|
historyGridListChangeLogGlobal.dynDate = '';
|
|
|
|
|
|
|
|
|
|
ActionTabFrameGlobal = {};
|
|
|
|
|
ActionTabFrameGlobal.tabName = '';
|
|
|
|
|
ActionTabFrameGlobal.tabTitle = '';
|
|
|
|
|
ActionTabFrameGlobal.tabData = '';
|
|
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Ext.onReady(function(){
|
|
|
|
|
Ext.QuickTips.init();
|
2011-03-25 09:14:06 -04:00
|
|
|
showCaseNavigatorPanel = function(app_status) {
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-03-25 09:14:06 -04:00
|
|
|
if (typeof(treeToReviseTitle) != 'undefined'){
|
2011-02-25 14:14:38 +00:00
|
|
|
var treeToRevise = new Ext.tree.TreePanel({
|
|
|
|
|
title: treeToReviseTitle,
|
|
|
|
|
width: 250,
|
|
|
|
|
height: 250,
|
|
|
|
|
userArrows: true,
|
|
|
|
|
animate: true,
|
|
|
|
|
autoScroll: true,
|
|
|
|
|
rootVisible: false,
|
|
|
|
|
dataUrl: casesPanelUrl,
|
|
|
|
|
root: {
|
|
|
|
|
nodeType : 'async',
|
|
|
|
|
text : 'To Revise',
|
|
|
|
|
id : 'node-root'
|
|
|
|
|
},
|
|
|
|
|
listeners: {
|
|
|
|
|
render: function() {
|
|
|
|
|
this.expandAll();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2011-02-25 16:45:05 +00:00
|
|
|
|
2012-02-13 12:55:23 -04:00
|
|
|
if (typeof(winTree) == 'undefined') {
|
|
|
|
|
winTree = new Ext.Window({
|
|
|
|
|
id : 'toReviseWindow',
|
|
|
|
|
width : 220,
|
|
|
|
|
height : 300,
|
|
|
|
|
el : 'toReviseTree',
|
|
|
|
|
collapsible : true,
|
|
|
|
|
plain : true,
|
|
|
|
|
x : 100,
|
|
|
|
|
y : 100,
|
|
|
|
|
closable : false,
|
|
|
|
|
constrain : true,
|
|
|
|
|
items : [treeToRevise]
|
2011-02-25 14:14:38 +00:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!toReviseTreeOpen){
|
2011-02-25 16:45:05 +00:00
|
|
|
winTree.show(this);
|
2011-02-25 14:14:38 +00:00
|
|
|
toReviseTreeOpen = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-03-25 09:14:06 -04:00
|
|
|
if( caseMenuOpen )
|
2011-02-04 15:57:06 +00:00
|
|
|
return false;
|
|
|
|
|
else
|
|
|
|
|
caseMenuOpen = true;
|
2011-07-14 10:45:20 -04:00
|
|
|
|
|
|
|
|
//get the menu
|
2011-03-25 09:14:06 -04:00
|
|
|
Ext.Ajax.request({
|
2011-07-14 10:45:20 -04:00
|
|
|
url : 'ajaxListener',
|
2011-03-25 09:14:06 -04:00
|
|
|
params : {action : 'getCaseMenu', app_status:app_status},
|
2011-07-14 10:45:20 -04:00
|
|
|
success: function ( result, request ) {
|
2011-11-09 11:28:06 -04:00
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
2011-03-25 09:14:06 -04:00
|
|
|
for(i=0; i<data.length; i++) {
|
|
|
|
|
switch(data[i].id) {
|
|
|
|
|
case 'STEPS':
|
|
|
|
|
Ext.getCmp('casesStepTree').root.reload();
|
2012-06-08 10:22:42 -04:00
|
|
|
Ext.getCmp('stepsMenu').enable();
|
2011-03-25 09:14:06 -04:00
|
|
|
break;
|
2011-07-14 10:45:20 -04:00
|
|
|
case 'NOTES':
|
|
|
|
|
Ext.getCmp('caseNotes').show();
|
|
|
|
|
break;
|
|
|
|
|
|
2011-03-25 09:14:06 -04:00
|
|
|
case 'INFO':
|
|
|
|
|
//filling information menu
|
|
|
|
|
var informationMenu = Ext.getCmp('informationMenu');
|
|
|
|
|
informationMenu.menu.removeAll();
|
|
|
|
|
for(j=0; j<data[i].options.length; j++) {
|
|
|
|
|
informationMenu.menu.add({
|
|
|
|
|
text: data[i].options[j].text,
|
|
|
|
|
handler: data[i].options[j].fn != '' ? Actions[data[i].options[j].fn] : function(){}
|
|
|
|
|
});
|
|
|
|
|
menuSelectedTitle[data[i].options[j].fn] = data[i].options[j].text;
|
|
|
|
|
}
|
|
|
|
|
informationMenu.show();
|
2011-07-14 10:45:20 -04:00
|
|
|
break;
|
|
|
|
|
|
2011-03-25 09:14:06 -04:00
|
|
|
case 'ACTIONS':
|
|
|
|
|
var actionMenu = Ext.getCmp('actionMenu');
|
|
|
|
|
actionMenu.menu.removeAll();
|
|
|
|
|
for(j=0; j<data[i].options.length; j++) {
|
2011-11-09 11:28:06 -04:00
|
|
|
if(!data[i].options[j].hide){
|
|
|
|
|
actionMenu.menu.add({
|
|
|
|
|
text: data[i].options[j].text,
|
|
|
|
|
handler: data[i].options[j].fn != '' ? Actions[data[i].options[j].fn] : function(){}
|
|
|
|
|
});
|
|
|
|
|
menuSelectedTitle[data[i].options[j].fn] = data[i].options[j].text;
|
|
|
|
|
}
|
2011-03-25 09:14:06 -04:00
|
|
|
}
|
|
|
|
|
actionMenu.show();
|
|
|
|
|
break;
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-05-30 12:54:33 -04:00
|
|
|
// custom menus from plugins or others
|
|
|
|
|
default:
|
|
|
|
|
var navPanel = Ext.getCmp('navPanel');
|
|
|
|
|
var tb = navPanel.getTopToolbar();
|
|
|
|
|
|
|
|
|
|
var menu = new Ext.Action({
|
|
|
|
|
id: data[i].id,
|
|
|
|
|
text: data[i].label,
|
|
|
|
|
handler: function(){
|
|
|
|
|
eval(this._action);
|
|
|
|
|
},
|
2011-07-14 10:45:20 -04:00
|
|
|
_action: data[i].action.replace('javascript:', '').replace(';', '')
|
2011-05-30 12:54:33 -04:00
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-05-30 12:54:33 -04:00
|
|
|
tb.add(menu);
|
2011-03-25 09:14:06 -04:00
|
|
|
}
|
|
|
|
|
}
|
2012-06-08 10:22:42 -04:00
|
|
|
|
|
|
|
|
if (Ext.getCmp('stepsMenu').disabled === true) {
|
|
|
|
|
Ext.getCmp('stepsMenu').hide();
|
|
|
|
|
}
|
2011-03-25 09:14:06 -04:00
|
|
|
},
|
2011-07-14 10:45:20 -04:00
|
|
|
failure: function ( result, request) {
|
|
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
2011-03-25 09:14:06 -04:00
|
|
|
}
|
|
|
|
|
});
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
hideCaseNavigatorPanel = function(){
|
|
|
|
|
Ext.getCmp('stepsMenu').pressed = false;
|
|
|
|
|
caseMenuOpen = false;
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Ext.getCmp('navPanelWest').hide();
|
2011-07-14 10:45:20 -04:00
|
|
|
Ext.getCmp('navPanelWest').ownerCt.doLayout();
|
|
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
function togglePreview(btn, pressed){
|
|
|
|
|
var preview = Ext.getCmp('navPanelWest');
|
|
|
|
|
preview[pressed ? 'show' : 'hide']();
|
|
|
|
|
Ext.getCmp('navPanel').ownerCt.doLayout();
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var casesStepTree = new Ext.tree.TreePanel({
|
|
|
|
|
id: 'casesStepTree',
|
|
|
|
|
autoWidth: true,
|
|
|
|
|
userArrows: true,
|
|
|
|
|
animate: true,
|
|
|
|
|
autoScroll: true,
|
|
|
|
|
dataUrl: 'ajaxListener?action=steps',
|
|
|
|
|
rootVisible: false,
|
|
|
|
|
containerScroll: true,
|
|
|
|
|
border: false,
|
|
|
|
|
root: {
|
|
|
|
|
nodeType: 'async'
|
|
|
|
|
},
|
2011-11-03 17:36:51 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
listeners: {
|
|
|
|
|
render: function() {
|
|
|
|
|
this.getRootNode().expand();
|
|
|
|
|
},
|
|
|
|
|
click: function(tp) {
|
|
|
|
|
if( tp.attributes.url ){
|
|
|
|
|
document.getElementById('openCaseFrame').src = tp.attributes.url;
|
|
|
|
|
}
|
2011-11-16 13:19:36 -04:00
|
|
|
}
|
|
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
})
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-11-03 17:36:51 -04:00
|
|
|
var loader = casesStepTree.getLoader();
|
|
|
|
|
loader.on("load", setNodeini);
|
2011-11-16 13:19:36 -04:00
|
|
|
|
|
|
|
|
function setNodeini()
|
|
|
|
|
{
|
|
|
|
|
setNode(idfirstform);
|
2011-11-03 17:36:51 -04:00
|
|
|
}
|
|
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var navPanelWest = {
|
|
|
|
|
id: 'navPanelWest',
|
|
|
|
|
region: 'west',
|
|
|
|
|
xtype:'panel',
|
|
|
|
|
width: 250,
|
|
|
|
|
height: 500,
|
|
|
|
|
maxSize: 400,
|
|
|
|
|
split: true,
|
|
|
|
|
collapsible: false,
|
|
|
|
|
margins: '0 0 0 0',
|
|
|
|
|
items:[casesStepTree]
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var fnChangeStatus =function(){
|
|
|
|
|
alert('loaded');
|
|
|
|
|
}
|
|
|
|
|
|
2011-02-24 20:34:14 +00:00
|
|
|
var screenWidth = (PMExt.getBrowser().screen.width-140).toString() + 'px';
|
|
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var navPanelCenter = {
|
|
|
|
|
id: 'navPanelCenter',
|
2011-04-08 19:11:30 -04:00
|
|
|
region: 'center', layout:'fit',forceLayout: true,
|
2011-02-04 15:57:06 +00:00
|
|
|
xtype:'panel',
|
|
|
|
|
items:[{
|
|
|
|
|
xtype:"tabpanel",
|
|
|
|
|
id: 'caseTabPanel',
|
|
|
|
|
deferredRender:false,
|
|
|
|
|
defaults:{autoScroll: true},
|
|
|
|
|
defaultType:"iframepanel",
|
|
|
|
|
activeTab: 0,
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
//defaults: Ext.apply({}, Ext.isGecko? {style:{position:'absolute'},hideMode:'visibility'}:false),
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
items:[{
|
2011-07-04 11:14:07 -04:00
|
|
|
id: 'casesTab',
|
2011-03-17 15:32:01 -04:00
|
|
|
title: _('ID_CASE') +' ' + _APP_NUM,
|
2011-02-04 15:57:06 +00:00
|
|
|
frameConfig:{name:'openCaseFrame', id:'openCaseFrame'},
|
|
|
|
|
defaultSrc : uri,
|
2012-03-26 16:54:43 -04:00
|
|
|
loadMask:{msg:_('ID_LOADING_GRID')+'...'},
|
2011-02-24 20:34:14 +00:00
|
|
|
bodyStyle:{height: (PMExt.getBrowser().screen.height-60) + 'px', overflow:'auto'},
|
|
|
|
|
width:screenWidth
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-03-25 09:30:45 -04:00
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
],
|
|
|
|
|
listeners: {
|
2012-03-29 16:19:45 -04:00
|
|
|
tabchange: function(panel){
|
|
|
|
|
panel.ownerCt.doLayout();
|
|
|
|
|
},
|
2011-02-04 15:57:06 +00:00
|
|
|
render : function(panel){
|
2011-07-14 10:45:20 -04:00
|
|
|
Ext.each([this.el, this[this.collapseEl]] ,
|
2011-03-25 09:30:45 -04:00
|
|
|
function( elm ) {
|
|
|
|
|
elm.setVisibilityMode(Ext.Element.VISIBILITY).originalDisplay ='visible';
|
2011-02-04 15:57:06 +00:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var navPanel = {
|
|
|
|
|
id: 'navPanel',
|
|
|
|
|
region: 'center',
|
|
|
|
|
layout: 'border',
|
|
|
|
|
items:[navPanelWest, navPanelCenter],
|
|
|
|
|
tbar:[{
|
|
|
|
|
id: 'stepsMenu',
|
2011-02-10 14:37:52 +00:00
|
|
|
text: ' '+_('ID_STEPS'),
|
2011-02-04 15:57:06 +00:00
|
|
|
pressed: false,
|
|
|
|
|
enableToggle:true,
|
|
|
|
|
tooltip: {
|
2011-02-10 14:37:52 +00:00
|
|
|
title: _('ID_CASES_STEPS'),
|
|
|
|
|
text:_('ID_SHOW_HIDE_CASES_STEPS')
|
2011-02-04 15:57:06 +00:00
|
|
|
},
|
|
|
|
|
iconCls: 'ICON_STEPS',
|
2012-06-08 10:22:42 -04:00
|
|
|
toggleHandler: togglePreview,
|
|
|
|
|
disabled: true
|
2011-02-04 15:57:06 +00:00
|
|
|
}, {
|
|
|
|
|
id: 'informationMenu',
|
2011-02-10 14:37:52 +00:00
|
|
|
text: _('ID_INFORMATION'),
|
2011-03-17 15:32:01 -04:00
|
|
|
menu: []
|
2011-02-04 15:57:06 +00:00
|
|
|
}, {
|
|
|
|
|
id: 'actionMenu',
|
2011-02-10 14:37:52 +00:00
|
|
|
text: _('ID_ACTIONS'),
|
2011-02-04 15:57:06 +00:00
|
|
|
menu: []
|
2011-07-14 10:45:20 -04:00
|
|
|
}, {
|
|
|
|
|
id: 'caseNotes',
|
|
|
|
|
pressed: false,
|
|
|
|
|
enableToggle:true,
|
|
|
|
|
text: ' '+_('ID_CASES_NOTES'),
|
|
|
|
|
iconCls: 'ICON_CASES_NOTES',
|
|
|
|
|
tooltip: {
|
|
|
|
|
title: _('ID_CASES_NOTES'),
|
|
|
|
|
text:_('ID_SHOW_CASES_NOTES')
|
|
|
|
|
},
|
|
|
|
|
toggleHandler:function(btn, pressed){
|
|
|
|
|
if(pressed){
|
|
|
|
|
openCaseNotesWindow();
|
|
|
|
|
}else{
|
|
|
|
|
closeCaseNotesWindow();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}]
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var viewport = new Ext.Viewport({
|
|
|
|
|
layout: 'border',
|
|
|
|
|
items: [navPanel]
|
2011-07-14 10:45:20 -04:00
|
|
|
});
|
2011-02-04 15:57:06 +00:00
|
|
|
|
|
|
|
|
|
2012-06-08 10:22:42 -04:00
|
|
|
// Ext.getCmp('stepsMenu').hide();
|
2011-07-14 10:45:20 -04:00
|
|
|
Ext.getCmp('caseNotes').hide();
|
2011-02-04 15:57:06 +00:00
|
|
|
Ext.getCmp('informationMenu').hide();
|
2011-11-25 11:26:03 -04:00
|
|
|
Ext.getCmp('actionMenu').hide();
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
hideCaseNavigatorPanel();
|
|
|
|
|
|
|
|
|
|
// Actions methods
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.processMap = function()
|
|
|
|
|
{
|
|
|
|
|
Actions.tabFrame('processMap');
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.processInformation = function()
|
|
|
|
|
{
|
|
|
|
|
Ext.Ajax.request({
|
2011-07-14 10:45:20 -04:00
|
|
|
url : 'ajaxListener' ,
|
2011-02-24 20:34:14 +00:00
|
|
|
params : {action : 'getProcessInformation'},
|
2011-02-25 16:45:05 +00:00
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
fieldset = {
|
|
|
|
|
xtype : 'fieldset',
|
|
|
|
|
autoHeight : true,
|
2011-02-25 16:45:05 +00:00
|
|
|
defaults : {
|
2011-07-14 10:45:20 -04:00
|
|
|
width : 170,
|
2011-02-04 15:57:06 +00:00
|
|
|
xtype:'label',
|
|
|
|
|
labelStyle : 'padding: 0px;',
|
|
|
|
|
style: 'font-weight: bold'
|
|
|
|
|
},
|
|
|
|
|
items : [
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
{fieldLabel: _('ID_TITLE'), text: data.PRO_TITLE},
|
|
|
|
|
{fieldLabel: _('ID_DESCRIPTION'), text: data.PRO_DESCRIPTION},
|
|
|
|
|
{fieldLabel: _('ID_CATEGORY'), text: data.PRO_CATEGORY_LABEL},
|
|
|
|
|
{fieldLabel: _('ID_AUTHOR'), text: data.PRO_AUTHOR},
|
|
|
|
|
{fieldLabel: _('ID_CREATE_DATE'), text: data.PRO_CREATE_DATE}
|
2011-02-04 15:57:06 +00:00
|
|
|
]
|
|
|
|
|
}
|
2011-02-25 16:45:05 +00:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var frm = new Ext.FormPanel( {
|
|
|
|
|
labelAlign : 'right',
|
|
|
|
|
bodyStyle : 'padding:5px 5px 0',
|
|
|
|
|
width : 400,
|
2011-04-01 09:54:13 -04:00
|
|
|
autoScroll:true,
|
2011-02-04 15:57:06 +00:00
|
|
|
items : [fieldset],
|
|
|
|
|
buttons : [{
|
|
|
|
|
text : 'OK',
|
|
|
|
|
handler : function() {
|
|
|
|
|
win.close();
|
|
|
|
|
}
|
2011-02-25 16:45:05 +00:00
|
|
|
}]
|
2011-02-04 15:57:06 +00:00
|
|
|
});
|
2011-02-25 16:45:05 +00:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var win = new Ext.Window({
|
|
|
|
|
title: '',
|
|
|
|
|
width: 450,
|
|
|
|
|
height: 280,
|
|
|
|
|
layout:'fit',
|
|
|
|
|
autoScroll:true,
|
|
|
|
|
modal: true,
|
|
|
|
|
maximizable: false,
|
|
|
|
|
items: [frm]
|
|
|
|
|
});
|
|
|
|
|
win.show();
|
|
|
|
|
},
|
2011-07-14 10:45:20 -04:00
|
|
|
failure: function ( result, request) {
|
|
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Actions.taskInformation = function()
|
|
|
|
|
{
|
|
|
|
|
Ext.Ajax.request({
|
2011-07-14 10:45:20 -04:00
|
|
|
url : 'ajaxListener' ,
|
2011-02-24 20:34:14 +00:00
|
|
|
params : {action : 'getTaskInformation'},
|
2011-07-14 10:45:20 -04:00
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
fieldset = {
|
|
|
|
|
xtype : 'fieldset',
|
|
|
|
|
autoHeight : true,
|
2011-07-14 10:45:20 -04:00
|
|
|
defaults : {
|
|
|
|
|
width : 170,
|
2011-02-04 15:57:06 +00:00
|
|
|
xtype:'label',
|
|
|
|
|
labelStyle : 'padding: 0px;',
|
|
|
|
|
style: 'font-weight: bold'
|
|
|
|
|
},
|
|
|
|
|
items : [
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
{fieldLabel: _('ID_TITLE'), text: data.TAS_TITLE},
|
|
|
|
|
{fieldLabel: _('ID_DESCRIPTION'), text: data.TAS_DESCRIPTION},
|
|
|
|
|
{fieldLabel: _('ID_INIT_DATE'), text: data.INIT_DATE},
|
|
|
|
|
{fieldLabel: _('ID_DUE_DATE'), text: data.DUE_DATE},
|
|
|
|
|
{fieldLabel: _('ID_FINISH_DATE'), text: data.FINISH},
|
|
|
|
|
{fieldLabel: _('ID_TASK_DURATION'), text: data.DURATION}
|
2011-02-04 15:57:06 +00:00
|
|
|
]
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var frm = new Ext.FormPanel( {
|
|
|
|
|
labelAlign : 'right',
|
|
|
|
|
bodyStyle : 'padding:5px 5px 0',
|
|
|
|
|
width : 400,
|
2011-04-01 09:54:13 -04:00
|
|
|
autoScroll:true,
|
2011-02-04 15:57:06 +00:00
|
|
|
items : [fieldset],
|
|
|
|
|
buttons : [{
|
|
|
|
|
text : 'OK',
|
|
|
|
|
handler : function() {
|
|
|
|
|
win.close();
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
}]
|
2011-02-04 15:57:06 +00:00
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var win = new Ext.Window({
|
|
|
|
|
title: '',
|
|
|
|
|
width: 450,
|
|
|
|
|
height: 280,
|
|
|
|
|
layout:'fit',
|
|
|
|
|
autoScroll:true,
|
|
|
|
|
modal: true,
|
|
|
|
|
maximizable: false,
|
|
|
|
|
items: [frm]
|
|
|
|
|
});
|
|
|
|
|
win.show();
|
|
|
|
|
},
|
2011-07-14 10:45:20 -04:00
|
|
|
failure: function ( result, request) {
|
|
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.caseHistory = function()
|
|
|
|
|
{
|
|
|
|
|
Actions.tabFrame('caseHistory');
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.messageHistory = function()
|
|
|
|
|
{
|
|
|
|
|
Actions.tabFrame('messageHistory');
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.dynaformHistory = function()
|
|
|
|
|
{
|
|
|
|
|
Actions.tabFrame('dynaformHistory');
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.uploadedDocuments = function()
|
|
|
|
|
{
|
|
|
|
|
Actions.tabFrame('uploadedDocuments');
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.generatedDocuments = function()
|
|
|
|
|
{
|
|
|
|
|
Actions.tabFrame('generatedDocuments');
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.cancelCase = function()
|
|
|
|
|
{
|
2012-07-25 16:54:54 -04:00
|
|
|
var msgCancel = new Ext.Window({
|
|
|
|
|
width:500,
|
|
|
|
|
plain: true,
|
|
|
|
|
modal: true,
|
|
|
|
|
title: _('ID_CONFIRM'),
|
|
|
|
|
items: [
|
|
|
|
|
new Ext.FormPanel({
|
|
|
|
|
labelAlign: 'top',
|
|
|
|
|
labelWidth: 75,
|
|
|
|
|
border: false,
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [
|
|
|
|
|
{
|
|
|
|
|
html: '<div align="center" style="font: 14px tahoma,arial,helvetica,sans-serif">' + _('ID_CONFIRM_CANCEL_CASE')+'? </div> <br/>'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
xtype: 'textarea',
|
|
|
|
|
id: 'noteReason',
|
|
|
|
|
fieldLabel: _('ID_CASE_CANCEL_REASON'),
|
|
|
|
|
name: 'noteReason',
|
|
|
|
|
width: 450,
|
|
|
|
|
height: 50
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'notifyReason',
|
|
|
|
|
xtype:'checkbox',
|
|
|
|
|
name: 'notifyReason',
|
|
|
|
|
hideLabel: true,
|
|
|
|
|
boxLabel: _('ID_NOTIFY_USERS_CASE'),
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
buttonAlign: 'center',
|
|
|
|
|
|
|
|
|
|
buttons: [{
|
|
|
|
|
text: 'Ok',
|
|
|
|
|
handler: function(){
|
|
|
|
|
if (Ext.getCmp('noteReason').getValue() != '') {
|
|
|
|
|
var noteReasonTxt = _('ID_CASE_CANCEL_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
|
|
|
|
|
} else {
|
|
|
|
|
var noteReasonTxt = '';
|
|
|
|
|
}
|
|
|
|
|
var notifyReasonVal = Ext.getCmp('notifyReason').getValue() == true ? 1 : 0;
|
|
|
|
|
|
|
|
|
|
Ext.MessageBox.show({ msg: _('ID_PROCESSING'), wait:true,waitConfig: {interval:200} });
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'ajaxListener' ,
|
|
|
|
|
params : {action : 'cancelCase', NOTE_REASON: noteReasonTxt, NOTIFY_PAUSE: notifyReasonVal},
|
|
|
|
|
success: function ( result, request ) {
|
|
|
|
|
try {
|
|
|
|
|
parent.notify('', 'The case ' + parent._CASE_TITLE + ' was cancelled!');
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
}
|
|
|
|
|
location.href = 'casesListExtJs';
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},{
|
|
|
|
|
text: 'Cancel',
|
|
|
|
|
handler: function(){
|
|
|
|
|
msgCancel.close();
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
})
|
|
|
|
|
]
|
2011-02-04 15:57:06 +00:00
|
|
|
});
|
2012-07-25 16:54:54 -04:00
|
|
|
msgCancel.show(this);
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.getUsersToReassign = function()
|
|
|
|
|
{
|
|
|
|
|
var store = new Ext.data.Store( {
|
|
|
|
|
autoLoad: true,
|
|
|
|
|
proxy : new Ext.data.HttpProxy({
|
|
|
|
|
url: 'ajaxListener?action=getUsersToReassign'
|
|
|
|
|
}),
|
|
|
|
|
reader : new Ext.data.JsonReader( {
|
|
|
|
|
root: 'data',
|
|
|
|
|
fields : [
|
|
|
|
|
{name : 'USR_UID'},
|
2011-08-12 15:46:26 -04:00
|
|
|
{name : 'USR_USERNAME'},
|
2011-02-04 15:57:06 +00:00
|
|
|
{name : 'USR_FIRSTNAME'},
|
2011-08-12 15:46:26 -04:00
|
|
|
{name : 'USR_LASTNAME'}
|
2011-02-04 15:57:06 +00:00
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var grid = new Ext.grid.GridPanel( {
|
|
|
|
|
id: 'reassignGrid',
|
|
|
|
|
height:300,
|
|
|
|
|
width:'300',
|
|
|
|
|
title : '',
|
|
|
|
|
stateful : true,
|
|
|
|
|
stateId : 'grid',
|
|
|
|
|
enableColumnResize: true,
|
|
|
|
|
enableHdMenu: true,
|
|
|
|
|
frame:false,
|
|
|
|
|
cls : 'grid_with_checkbox',
|
|
|
|
|
columnLines: true,
|
|
|
|
|
|
|
|
|
|
viewConfig: {
|
|
|
|
|
forceFit:true
|
|
|
|
|
},
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
cm: new Ext.grid.ColumnModel({
|
|
|
|
|
defaults: {
|
|
|
|
|
width: 200,
|
|
|
|
|
sortable: true
|
2011-07-14 10:45:20 -04:00
|
|
|
},
|
2011-02-04 15:57:06 +00:00
|
|
|
columns: [
|
|
|
|
|
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
|
2011-08-12 15:46:26 -04:00
|
|
|
{header: _('ID_USER_NAME'), dataIndex: 'USR_USERNAME', width: 300},
|
2011-02-04 15:57:06 +00:00
|
|
|
{header: _('ID_FIRSTNAME'), dataIndex: 'USR_FIRSTNAME', width: 300},
|
2011-08-12 15:46:26 -04:00
|
|
|
{header: _('ID_LASTNAME'), dataIndex: 'USR_LASTNAME', width: 300}
|
2011-02-04 15:57:06 +00:00
|
|
|
]
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
store: store,
|
|
|
|
|
|
|
|
|
|
tbar:[
|
|
|
|
|
{
|
|
|
|
|
text:_('ID_REASSIGN'),
|
|
|
|
|
iconCls: 'ICON_CASES_TO_REASSIGN',
|
|
|
|
|
handler: Actions.reassignCase
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
listeners: {
|
|
|
|
|
//rowdblclick: openCase,
|
|
|
|
|
render: function(){
|
|
|
|
|
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
|
|
|
|
|
this.ownerCt.doLayout();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var win = new Ext.Window({
|
|
|
|
|
title: '',
|
|
|
|
|
width: 450,
|
|
|
|
|
height: 280,
|
|
|
|
|
layout:'fit',
|
|
|
|
|
autoScroll:true,
|
|
|
|
|
modal: true,
|
|
|
|
|
maximizable: false,
|
|
|
|
|
items: [grid]
|
|
|
|
|
});
|
|
|
|
|
win.show();
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.reassignCase = function()
|
|
|
|
|
{
|
|
|
|
|
var rowSelected = Ext.getCmp('reassignGrid').getSelectionModel().getSelected();
|
|
|
|
|
if( rowSelected ) {
|
|
|
|
|
PMExt.confirm(_('ID_CONFIRM'), _('ID_REASSIGN_CONFIRM'), function(){
|
|
|
|
|
Ext.Ajax.request({
|
2011-07-14 10:45:20 -04:00
|
|
|
url : 'ajaxListener' ,
|
2011-02-24 20:34:14 +00:00
|
|
|
params : {action : 'reassignCase', USR_UID: rowSelected.data.USR_UID},
|
2011-02-04 15:57:06 +00:00
|
|
|
success: function ( result, request ) {
|
2011-07-14 10:45:20 -04:00
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
2011-02-04 15:57:06 +00:00
|
|
|
if( data.status == 0 ) {
|
2011-09-13 19:31:36 -04:00
|
|
|
try {
|
|
|
|
|
parent.notify('', data.msg);
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
location.href = 'casesListExtJs';
|
|
|
|
|
} else {
|
|
|
|
|
alert(data.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
2011-07-14 10:45:20 -04:00
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.setUnpauseCaseDate = function()
|
|
|
|
|
{
|
2011-05-30 12:54:33 -04:00
|
|
|
curDate = _ENV_CURRENT_DATE_NO_FORMAT.split('-');
|
2011-04-04 15:15:27 -04:00
|
|
|
filterDate = curDate[0]+'-'+curDate[1]+'-';
|
|
|
|
|
nDay = '' + (parseInt(curDate[2])+1);
|
2011-05-11 15:34:13 -04:00
|
|
|
nDay = nDay.length == 1 ? '0' + nDay : nDay;
|
2011-04-04 15:15:27 -04:00
|
|
|
filterDate += nDay;
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var fieldset = {
|
|
|
|
|
xtype : 'fieldset',
|
2012-07-25 16:54:54 -04:00
|
|
|
labelWidth: 150,
|
|
|
|
|
//autoHeight : true,
|
2011-04-04 15:15:27 -04:00
|
|
|
defaults : {
|
2011-02-04 15:57:06 +00:00
|
|
|
width : 170,
|
2012-07-25 16:54:54 -04:00
|
|
|
xtype:'label',
|
2011-02-04 15:57:06 +00:00
|
|
|
labelStyle : 'padding: 0px;',
|
|
|
|
|
style: 'font-weight: bold'
|
|
|
|
|
},
|
|
|
|
|
items : [
|
2011-07-14 10:45:20 -04:00
|
|
|
{fieldLabel: 'Case', text: parent._CASE_TITLE},
|
2011-02-04 15:57:06 +00:00
|
|
|
{fieldLabel: 'Pause Date', text: _ENV_CURRENT_DATE},
|
|
|
|
|
new Ext.form.DateField({
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
id: 'unpauseDate',
|
2011-02-04 15:57:06 +00:00
|
|
|
format: 'Y-m-d',
|
|
|
|
|
fieldLabel: 'Unpause Date',
|
|
|
|
|
name: 'unpauseDate',
|
2011-04-04 15:15:27 -04:00
|
|
|
allowBlank: false,
|
2012-03-29 11:09:44 -04:00
|
|
|
value: filterDate,
|
|
|
|
|
minValue: filterDate
|
2012-07-25 16:54:54 -04:00
|
|
|
}),
|
|
|
|
|
{
|
|
|
|
|
xtype: 'textarea',
|
|
|
|
|
id: 'noteReason',
|
|
|
|
|
fieldLabel: _('ID_CASE_PAUSE_REASON'),
|
|
|
|
|
name: 'noteReason',
|
|
|
|
|
width: 170,
|
|
|
|
|
height: 50
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'notifyReason',
|
|
|
|
|
xtype:'checkbox',
|
|
|
|
|
name: 'notifyReason',
|
|
|
|
|
fieldLabel: _('ID_NOTIFY_USERS_CASE'),
|
|
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
],
|
|
|
|
|
buttons : [
|
|
|
|
|
{
|
|
|
|
|
id: 'submitPauseCase',
|
2011-02-10 14:37:52 +00:00
|
|
|
text : _('ID_PAUSE_CASE'),
|
2011-02-04 15:57:06 +00:00
|
|
|
handler : Actions.pauseCase,
|
2011-02-09 21:21:33 +00:00
|
|
|
disabled:false
|
2011-02-04 15:57:06 +00:00
|
|
|
},{
|
|
|
|
|
text : 'Cancel',
|
|
|
|
|
handler : function() {
|
|
|
|
|
win.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
]
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var frm = new Ext.FormPanel( {
|
|
|
|
|
id: 'unpauseFrm',
|
|
|
|
|
labelAlign : 'right',
|
2012-07-25 16:54:54 -04:00
|
|
|
//bodyStyle : 'padding:5px 5px 0',
|
2011-02-04 15:57:06 +00:00
|
|
|
width : 250,
|
|
|
|
|
items : [fieldset]
|
|
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
|
|
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var win = new Ext.Window({
|
|
|
|
|
title: 'Pause Case',
|
2012-07-25 16:54:54 -04:00
|
|
|
width: 370,
|
|
|
|
|
height: 230,
|
2011-02-04 15:57:06 +00:00
|
|
|
layout:'fit',
|
|
|
|
|
autoScroll:true,
|
|
|
|
|
modal: true,
|
|
|
|
|
maximizable: false,
|
|
|
|
|
items: [frm]
|
|
|
|
|
});
|
|
|
|
|
win.show();
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Actions.pauseCase = function()
|
|
|
|
|
{
|
2012-07-25 16:54:54 -04:00
|
|
|
if (Ext.getCmp('noteReason').getValue() != '') {
|
|
|
|
|
var noteReasonTxt = _('ID_CASE_PAUSE_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
|
|
|
|
|
} else {
|
|
|
|
|
var noteReasonTxt = '';
|
|
|
|
|
}
|
|
|
|
|
var notifyReasonVal = Ext.getCmp('notifyReason').getValue() == true ? 1 : 0;
|
|
|
|
|
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
|
|
|
|
|
if( unpauseDate == '') {
|
|
|
|
|
//Ext.getCmp('submitPauseCase').setDisabled(true);
|
|
|
|
|
return;
|
2011-07-14 10:45:20 -04:00
|
|
|
} else
|
2011-02-04 15:57:06 +00:00
|
|
|
//Ext.getCmp('submitPauseCase').enable();
|
|
|
|
|
|
|
|
|
|
unpauseDate = unpauseDate.format('Y-m-d');
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
Ext.getCmp('unpauseFrm').getForm().submit({
|
2012-07-25 16:54:54 -04:00
|
|
|
url:'ajaxListener?action=pauseCase&unpauseDate=' + unpauseDate + paramsNote,
|
2011-02-04 15:57:06 +00:00
|
|
|
waitMsg:'Pausing Case '+parent._CASE_TITLE+'...',
|
|
|
|
|
timeout : 36000,
|
|
|
|
|
success : function(res, req) {
|
|
|
|
|
if(req.result.success) {
|
2011-09-13 19:31:36 -04:00
|
|
|
try {
|
|
|
|
|
parent.notify('PAUSE CASE', req.result.msg);
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
location.href = 'casesListExtJs';
|
|
|
|
|
} else {
|
2011-02-09 21:21:33 +00:00
|
|
|
PMExt.error(_('ID_ERROR'), req.result.msg);
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Actions.unpauseCase = function()
|
|
|
|
|
{
|
2011-02-09 21:21:33 +00:00
|
|
|
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_UNPAUSE_CASE'), function(){
|
|
|
|
|
var loadMask = new Ext.LoadMask(document.body, {msg:'Unpausing case...'});
|
|
|
|
|
loadMask.show();
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-09 21:21:33 +00:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'ajaxListener' ,
|
2011-02-24 20:34:14 +00:00
|
|
|
params : {action : 'unpauseCase'},
|
2011-02-09 21:21:33 +00:00
|
|
|
success: function ( result, request ) {
|
|
|
|
|
loadMask.hide();
|
2011-07-14 10:45:20 -04:00
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
2011-02-09 21:21:33 +00:00
|
|
|
if( data.success ) {
|
2011-09-13 19:31:36 -04:00
|
|
|
try {
|
|
|
|
|
parent.PMExt.notify(_('ID_UNPAUSE_ACTION'), data.msg);
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
}
|
2011-02-09 21:21:33 +00:00
|
|
|
location.href = 'casesListExtJs';
|
|
|
|
|
} else {
|
|
|
|
|
PMExt.error(_('ID_ERROR'), data.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Actions.deleteCase = function()
|
|
|
|
|
{
|
|
|
|
|
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_DELETE_CASE'), function(){
|
2011-02-09 21:21:33 +00:00
|
|
|
var loadMask = new Ext.LoadMask(document.body, {msg:'Deleting case...'});
|
|
|
|
|
loadMask.show();
|
2011-02-04 15:57:06 +00:00
|
|
|
Ext.Ajax.request({
|
2011-05-09 11:48:31 -04:00
|
|
|
url : '../adhocUserProxy/deleteCase',
|
2011-02-04 15:57:06 +00:00
|
|
|
success: function ( result, request ) {
|
2011-02-09 21:21:33 +00:00
|
|
|
loadMask.hide();
|
2011-07-14 10:45:20 -04:00
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
2011-02-09 21:21:33 +00:00
|
|
|
if( data.success ) {
|
2011-09-13 19:31:36 -04:00
|
|
|
try {
|
|
|
|
|
parent.PMExt.notify(_('ID_DELETE_ACTION'), data.msg);
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
}
|
2011-02-09 21:21:33 +00:00
|
|
|
location.href = 'casesListExtJs';
|
|
|
|
|
} else {
|
|
|
|
|
PMExt.error(_('ID_ERROR'), data.msg);
|
|
|
|
|
}
|
2011-02-04 15:57:06 +00:00
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Actions.reactivateCase = function()
|
|
|
|
|
{
|
2011-02-09 21:21:33 +00:00
|
|
|
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_REACTIVATE_CASE'), function(){
|
|
|
|
|
var loadMask = new Ext.LoadMask(document.body, {msg:'Reactivating case...'});
|
|
|
|
|
loadMask.show();
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : 'ajaxListener' ,
|
2011-02-24 20:34:14 +00:00
|
|
|
params : {action : 'reactivateCase'},
|
2011-02-09 21:21:33 +00:00
|
|
|
success: function ( result, request ) {
|
|
|
|
|
loadMask.hide();
|
2011-07-14 10:45:20 -04:00
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
2011-02-09 21:21:33 +00:00
|
|
|
if( data.success ) {
|
2011-09-13 19:31:36 -04:00
|
|
|
try {
|
|
|
|
|
parent.PMExt.notify(_('ID_REACTIVATE_ACTION'), data.msg);
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
}
|
2011-02-09 21:21:33 +00:00
|
|
|
location.href = 'casesListExtJs';
|
|
|
|
|
} else {
|
|
|
|
|
PMExt.error(_('ID_ERROR'), data.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
Ext.MessageBox.alert('Failed', result.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2011-02-04 15:57:06 +00:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
//
|
|
|
|
|
Actions.tabFrame = function(name)
|
2012-03-26 16:54:43 -04:00
|
|
|
{
|
2011-02-04 15:57:06 +00:00
|
|
|
tabId = name + 'MenuOption';
|
|
|
|
|
var uri = 'ajaxListener?action=' + name;
|
|
|
|
|
var TabPanel = Ext.getCmp('caseTabPanel');
|
|
|
|
|
var tab = TabPanel.getItem(tabId);
|
2012-03-26 16:54:43 -04:00
|
|
|
//!dataInput
|
|
|
|
|
var tabName = ActionTabFrameGlobal.tabName;
|
|
|
|
|
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
|
|
|
|
|
|
|
|
|
//!dataSystem
|
|
|
|
|
var loadMaskMsg = _('ID_LOADING_GRID');
|
|
|
|
|
|
|
|
|
|
if (name == "dynaformViewFromHistory") {
|
|
|
|
|
var responseObject = Ext.util.JSON.decode(historyGridListChangeLogGlobal.viewDynaformName);
|
|
|
|
|
var dynTitle = responseObject.dynTitle;
|
|
|
|
|
var md5Hash = responseObject.md5Hash;
|
|
|
|
|
name = "dynaformViewFromHistory"+md5Hash;
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2012-03-26 16:54:43 -04:00
|
|
|
var caseHistoryIframeRest = name!="caseHistory"?0:-20;
|
|
|
|
|
tabId = name + 'MenuOption';
|
|
|
|
|
var uri = 'ajaxListener?action=' + name;
|
|
|
|
|
|
|
|
|
|
if (name.indexOf("changeLogTab") != -1) {
|
|
|
|
|
var uri = 'ajaxListener?action=' + 'changeLogTab';
|
|
|
|
|
//!historyGridListChangeLogGlobal
|
|
|
|
|
historyGridListChangeLogGlobal.idHistory = historyGridListChangeLogGlobal.idHistory;
|
|
|
|
|
historyGridListChangeLogGlobal.tasTitle = historyGridListChangeLogGlobal.tasTitle;
|
|
|
|
|
//dataSystem
|
|
|
|
|
idHistory = historyGridListChangeLogGlobal.idHistory;
|
|
|
|
|
var tasTitle = historyGridListChangeLogGlobal.tasTitle;
|
|
|
|
|
menuSelectedTitle[name] = tasTitle;
|
|
|
|
|
Actions[name];
|
|
|
|
|
uri += "&idHistory="+idHistory;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name.indexOf("dynaformViewFromHistory") != -1) {
|
|
|
|
|
var uri = 'ajaxListener?action=' + 'dynaformViewFromHistory';
|
|
|
|
|
uri += '&DYN_UID='+historyGridListChangeLogGlobal.viewIdDin+'&HISTORY_ID='+historyGridListChangeLogGlobal.viewIdHistory;
|
|
|
|
|
menuSelectedTitle[name] = 'View('+dynTitle+' '+historyGridListChangeLogGlobal.dynDate+')';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name.indexOf("previewMessage") != -1) {
|
|
|
|
|
var uri = 'caseMessageHistory_Ajax?actionAjax=' + 'showHistoryMessage';
|
|
|
|
|
var tabNameArray = tabName.split('_');
|
|
|
|
|
var APP_UID = tabNameArray[1];
|
|
|
|
|
var APP_MSG_UID = tabNameArray[2];
|
|
|
|
|
uri += '&APP_UID='+APP_UID+'&APP_MSG_UID='+APP_MSG_UID;
|
|
|
|
|
menuSelectedTitle[tabName] = tabTitle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name.indexOf("previewMessage") != -1) {
|
|
|
|
|
var uri = 'caseMessageHistory_Ajax?actionAjax=' + 'showHistoryMessage';
|
|
|
|
|
var tabNameArray = tabName.split('_');
|
|
|
|
|
var APP_UID = tabNameArray[1];
|
|
|
|
|
var APP_MSG_UID = tabNameArray[2];
|
|
|
|
|
uri += '&APP_UID='+APP_UID+'&APP_MSG_UID='+APP_MSG_UID;
|
|
|
|
|
menuSelectedTitle[tabName] = tabTitle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name.indexOf("sendMailMessage") != -1) {
|
|
|
|
|
var uri = 'caseMessageHistory_Ajax?actionAjax=' + 'sendMailMessage_JXP';
|
|
|
|
|
var tabNameArray = tabName.split('_');
|
|
|
|
|
var APP_UID = tabNameArray[1];
|
|
|
|
|
var APP_MSG_UID = tabNameArray[2];
|
|
|
|
|
uri += '&APP_UID='+APP_UID+'&APP_MSG_UID='+APP_MSG_UID;
|
|
|
|
|
menuSelectedTitle[tabName] = tabTitle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name=="dynaformHistory") {
|
|
|
|
|
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=historyDynaformPage';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name.indexOf("historyDynaformGridHistory") != -1) {
|
|
|
|
|
var historyDynaformGridHistoryGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
|
|
|
|
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
|
|
|
|
var PRO_UID = historyDynaformGridHistoryGlobal.PRO_UID;
|
|
|
|
|
var APP_UID = historyDynaformGridHistoryGlobal.APP_UID;
|
|
|
|
|
var TAS_UID = historyDynaformGridHistoryGlobal.TAS_UID;
|
|
|
|
|
var DYN_UID = historyDynaformGridHistoryGlobal.DYN_UID;
|
|
|
|
|
var DYN_TITLE = historyDynaformGridHistoryGlobal.DYN_TITLE;
|
|
|
|
|
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=showDynaformListHistory';
|
|
|
|
|
uri += '&PRO_UID='+PRO_UID+'&APP_UID='+APP_UID+'&TAS_UID='+TAS_UID+'&DYN_UID='+DYN_UID;
|
|
|
|
|
menuSelectedTitle[name] = tabTitle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name.indexOf("dynaformChangeLogViewHistory") != -1) {
|
|
|
|
|
var showDynaformHistoryGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
|
|
|
|
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
|
|
|
|
var dynUID = showDynaformHistoryGlobal.dynUID;
|
|
|
|
|
var tablename = showDynaformHistoryGlobal.tablename;
|
|
|
|
|
var dynDate = showDynaformHistoryGlobal.dynDate;
|
|
|
|
|
var dynTitle = showDynaformHistoryGlobal.dynTitle;
|
|
|
|
|
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=dynaformChangeLogViewHistory';
|
|
|
|
|
uri += '&DYN_UID='+dynUID+'&HISTORY_ID='+tablename;
|
|
|
|
|
menuSelectedTitle[name] = tabTitle;
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
}
|
2012-03-26 16:54:43 -04:00
|
|
|
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
if (name.indexOf("historyDynaformGridPreview") != -1) {
|
2012-03-26 16:54:43 -04:00
|
|
|
var historyDynaformGridPreviewGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
|
|
|
|
var DYN_UID = historyDynaformGridPreviewGlobal.DYN_UID;
|
2012-03-26 16:54:43 -04:00
|
|
|
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=historyDynaformGridPreview';
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
uri += '&DYN_UID='+DYN_UID;
|
2012-04-12 09:28:35 -04:00
|
|
|
menuSelectedTitle[name] = tabTitle;
|
2012-03-26 16:54:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name == "uploadDocumentGridDownload") {
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
var uploadDocumentGridDownloadGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
2012-03-26 16:54:43 -04:00
|
|
|
var APP_DOC_UID = uploadDocumentGridDownloadGlobal.APP_DOC_UID;
|
|
|
|
|
var DOWNLOAD_LINK = uploadDocumentGridDownloadGlobal.DOWNLOAD_LINK;
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
var TITLE = uploadDocumentGridDownloadGlobal.TITLE;
|
2012-03-26 16:54:43 -04:00
|
|
|
var uri = DOWNLOAD_LINK;
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
menuSelectedTitle[name] = ActionTabFrameGlobal.tabTitle;
|
2012-03-26 16:54:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (name == "generatedDocuments") {
|
|
|
|
|
var uri = 'casesGenerateDocumentPage_Ajax.php?actionAjax=casesGenerateDocumentPage';
|
|
|
|
|
}
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
if( tab ) {
|
|
|
|
|
TabPanel.setActiveTab(tabId);
|
2011-11-16 10:07:14 -04:00
|
|
|
}
|
|
|
|
|
else {
|
2011-02-04 15:57:06 +00:00
|
|
|
TabPanel.add({
|
|
|
|
|
id: tabId,
|
|
|
|
|
title: menuSelectedTitle[name],
|
|
|
|
|
frameConfig:{name: name + 'Frame', id: name + 'Frame'},
|
|
|
|
|
defaultSrc : uri,
|
2012-03-26 16:54:43 -04:00
|
|
|
loadMask:{msg:_('ID_LOADING_GRID')+'...'},
|
2011-04-08 19:11:30 -04:00
|
|
|
autoWidth: true,
|
|
|
|
|
closable:true,
|
|
|
|
|
autoScroll: true,
|
2011-04-11 09:40:01 -04:00
|
|
|
bodyStyle:{height: (PMExt.getBrowser().screen.height-60) + 'px', overflow:'auto'}
|
2011-02-04 15:57:06 +00:00
|
|
|
}).show();
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
TabPanel.doLayout();
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-02-04 15:57:06 +00:00
|
|
|
});
|
|
|
|
|
|
2011-05-09 11:48:31 -04:00
|
|
|
Actions.adhocAssignmentUsers = function()
|
2011-05-11 10:53:17 -04:00
|
|
|
{
|
|
|
|
|
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
|
|
|
|
Ext.QuickTips.init();
|
|
|
|
|
store = new Ext.data.GroupingStore( {
|
|
|
|
|
proxy : new Ext.data.HttpProxy({
|
|
|
|
|
url : '../adhocUserProxy/adhocAssignUsersk'
|
|
|
|
|
}),
|
|
|
|
|
reader : new Ext.data.JsonReader( {
|
|
|
|
|
root: 'data',
|
|
|
|
|
fields : [
|
|
|
|
|
{name : 'USR_UID'},
|
|
|
|
|
{name : 'USR_FIRSTNAME'},
|
|
|
|
|
{name : 'USR_LASTNAME'}
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-05-11 10:53:17 -04:00
|
|
|
cmk = new Ext.grid.ColumnModel({
|
|
|
|
|
defaults: {
|
|
|
|
|
width: 40,
|
|
|
|
|
sortable: true
|
2011-07-14 10:45:20 -04:00
|
|
|
},
|
2011-05-11 10:53:17 -04:00
|
|
|
columns: [
|
|
|
|
|
{ id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
{ header : _('ID_FIRST_NAME'), dataIndex : 'USR_FIRSTNAME', sortable : true, width: 130, align:'center'},
|
|
|
|
|
{ header : _('ID_LAST_NAME'), dataIndex : 'USR_LASTNAME', sortable : true,width: 130, align:'center' }
|
2011-05-11 10:53:17 -04:00
|
|
|
]
|
|
|
|
|
});
|
2011-05-09 11:48:31 -04:00
|
|
|
|
2011-05-11 10:53:17 -04:00
|
|
|
pbark = new Ext.PagingToolbar({
|
|
|
|
|
pageSize: 8,
|
|
|
|
|
store: store,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: 'Displaying Users {0} - {1} of {2}',
|
|
|
|
|
emptyMsg: "",
|
|
|
|
|
items:[]
|
|
|
|
|
});
|
2011-02-04 15:57:06 +00:00
|
|
|
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
var adHocUserGrid = new Ext.grid.GridPanel( {
|
2011-11-16 10:07:14 -04:00
|
|
|
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',
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
icon: '/images/cases-selfservice.png',
|
2011-11-16 10:07:14 -04:00
|
|
|
handler: assignAdHocUser
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
}
|
2011-11-16 10:07:14 -04:00
|
|
|
],
|
|
|
|
|
bbar: '',
|
|
|
|
|
listeners:{
|
|
|
|
|
rowdblclick: assignAdHocUser
|
|
|
|
|
}
|
2011-05-11 10:53:17 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var w = new Ext.Window({
|
2011-11-16 10:07:14 -04:00
|
|
|
title: _('ID_ADHOC_ASSIGNMENT'),
|
|
|
|
|
width: 500,
|
|
|
|
|
height: 240,
|
|
|
|
|
resizable: false,
|
|
|
|
|
items: [ adHocUserGrid ],
|
|
|
|
|
id: 'w'
|
2011-07-14 10:45:20 -04:00
|
|
|
});
|
2011-05-09 11:48:31 -04:00
|
|
|
adHocUserGrid.store.load();
|
BUG 8932 Untranslatable strings Information process Information... SOLVED
- It was found that had several labels that are hardcoded.
- Changed hardcoded labels reusing some existing labels and some things were created some labels.
- labels created: ID_INIT_DATE(Init Date), ID_OVERWRITE(Overwrite),ID_BROWSE(Browse),ID_UPLOADING_TRANSLATION_FILE(Uploading the translation file...),
ID_EVALUATION_RESULT ([Success] Evaluation result)
- Labels reused: ID_TITLE, ID_DESCRIPTION, ID_DUE_DATE, ID_FINISH_DATE, ID_SEND, ID_UPLOADED_DOCUMENTS, ID_GENERATED_DOCUMENTS, ID_FILE, ID_FIRST_NAME,
ID_LAST_NAME,ID_ACTIVE,ID_INACTIVE, ID_MSJ_REPORSTO
- image for Starting a case ...
it is labeled translation.ID_TITLE_START_CASE which works only if you change the language to es-ES
-
2012-04-12 09:07:31 -04:00
|
|
|
w.show();
|
2011-05-09 11:48:31 -04:00
|
|
|
|
2011-11-16 10:07:14 -04:00
|
|
|
function assignAdHocUser()
|
|
|
|
|
{
|
|
|
|
|
rowSelected = adHocUserGrid.getSelectionModel().getSelected();
|
|
|
|
|
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_ADHOCUSER_CASE'), function(){
|
2011-05-11 10:53:17 -04:00
|
|
|
var loadMask = new Ext.LoadMask(document.body, {msg:'Assignment case...'});
|
|
|
|
|
loadMask.show();
|
|
|
|
|
Ext.Ajax.request({
|
2011-11-16 10:07:14 -04:00
|
|
|
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);
|
2011-05-11 10:53:17 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
2011-05-09 11:48:31 -04:00
|
|
|
}
|
2011-11-16 10:07:14 -04:00
|
|
|
|
2011-05-11 10:53:17 -04:00
|
|
|
CloseWindow = function(){
|
2011-11-16 10:07:14 -04:00
|
|
|
Ext.getCmp('w').hide();
|
2011-05-09 11:48:31 -04:00
|
|
|
};
|
2011-11-03 17:36:51 -04:00
|
|
|
|
2011-11-16 10:07:14 -04:00
|
|
|
setNode = function(uid){
|
|
|
|
|
var stepsTree = Ext.getCmp('casesStepTree');
|
2011-11-03 17:36:51 -04:00
|
|
|
|
2011-11-16 10:07:14 -04:00
|
|
|
if (!stepsTree) {
|
|
|
|
|
return false;
|
2011-04-04 15:15:27 -04:00
|
|
|
}
|
2011-11-16 10:07:14 -04:00
|
|
|
|
|
|
|
|
var node = stepsTree.getNodeById(uid);
|
|
|
|
|
|
|
|
|
|
if (!node) {
|
|
|
|
|
return false;
|
2011-04-04 15:15:27 -04:00
|
|
|
}
|
2011-11-16 10:07:14 -04:00
|
|
|
|
2011-11-16 13:19:36 -04:00
|
|
|
node.select();
|
2011-11-16 10:07:14 -04:00
|
|
|
}
|