Merged in bugfix/PMCORE-3432 (pull request #8231)
PMCORE-3432 Approved-by: Rodrigo Quelca
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
20f41b0eca
@@ -14,8 +14,7 @@ function closeCaseNotesWindow(){
|
||||
}
|
||||
}
|
||||
|
||||
function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskUid)
|
||||
{
|
||||
function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskUid) {
|
||||
Ext.MessageBox.show({
|
||||
msg: _('ID_CASE_NOTES_LOADING'),
|
||||
progressText: _('ID_SAVING'),
|
||||
@@ -83,13 +82,11 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
|
||||
icon: Ext.MessageBox.ERROR,
|
||||
buttons: Ext.MessageBox.OK,
|
||||
fn: function (btn) {
|
||||
try
|
||||
{
|
||||
try {
|
||||
prnt = parent.parent;
|
||||
top.location = top.location;
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
catch (err) {
|
||||
parent.location = parent.location;
|
||||
}
|
||||
}
|
||||
@@ -390,8 +387,7 @@ function updateTextCtr(body, event) {
|
||||
}
|
||||
}
|
||||
|
||||
function newNoteHandler()
|
||||
{
|
||||
function newNoteHandler() {
|
||||
var i;
|
||||
newNoteAreaActive = newNoteAreaActive ? false : true;
|
||||
if (newNoteAreaActive) {
|
||||
@@ -543,8 +539,87 @@ function statusBarMessage( msg, isLoading, success ) {
|
||||
/* Case Notes - End */
|
||||
|
||||
/* Case Summary - Start */
|
||||
var openSummaryWindow = function(appUid, delIndex, action)
|
||||
{
|
||||
var createInfoPanel = function (url, params, columnsSize, root, title) {
|
||||
var labelColumnWidth = 170;
|
||||
var valueColumnWidth = 350;
|
||||
params = params || {};
|
||||
if (typeof columnsSize !== 'undefined') {
|
||||
labelColumnWidth = columnsSize[0] || labelColumnWidth;
|
||||
valueColumnWidth = columnsSize[1] || valueColumnWidth;
|
||||
}
|
||||
return new Ext.grid.GridPanel({
|
||||
store: new Ext.data.GroupingStore({
|
||||
autoLoad: true,
|
||||
proxy: new Ext.data.HttpProxy({
|
||||
url: url,
|
||||
method: 'POST'
|
||||
}),
|
||||
baseParams: params,
|
||||
reader: new Ext.data.JsonReader({
|
||||
root: function (o) {
|
||||
var out = [], title, obj = o["caseProperties"], obj2, index, i;
|
||||
title = o["caseProperties"][0];
|
||||
label = title["label"];
|
||||
for (index = 1; index < obj.length; index = index + 1) {
|
||||
obj[index].section = label;
|
||||
out.push(obj[index]);
|
||||
}
|
||||
if (o["taskProperties"].length > 0) {
|
||||
title = o["taskProperties"][0];
|
||||
label = title["label"];
|
||||
obj2 = o["taskProperties"];
|
||||
|
||||
for (index = 1; index < obj2.length; index = index + 1) {
|
||||
for (i = 0; i < obj2[index].length; i = i + 1) {
|
||||
obj2[index][i].section = label;
|
||||
obj2[index][i].id = obj2[index][i].id + index;
|
||||
out.push(obj2[index][i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
},
|
||||
fields: [{
|
||||
name: 'label'
|
||||
}, {
|
||||
name: 'value'
|
||||
}, {
|
||||
name: 'section'
|
||||
}]
|
||||
}),
|
||||
groupField: 'section'
|
||||
}),
|
||||
columns: [{
|
||||
width: labelColumnWidth,
|
||||
dataIndex: "label",
|
||||
renderer: function (v) {
|
||||
return "<b><font class='selectText' color=\"#465070\">" + v + "</font></b>";
|
||||
},
|
||||
align: "right"
|
||||
}, {
|
||||
width: valueColumnWidth,
|
||||
dataIndex: "value",
|
||||
renderer: function (v) {
|
||||
return "<b class='selectText'>" + v + "</b>";
|
||||
}
|
||||
}, {
|
||||
hidden: true,
|
||||
dataIndex: "section"
|
||||
}],
|
||||
autoHeight: true,
|
||||
columnLines: true,
|
||||
trackMouseOver: false,
|
||||
disableSelection: true,
|
||||
view: new Ext.grid.GroupingView({
|
||||
forceFit: true,
|
||||
headersDisabled: true,
|
||||
groupTextTpl: '{group}'
|
||||
}),
|
||||
loadMask: true
|
||||
});
|
||||
};
|
||||
|
||||
var openSummaryWindow = function (appUid, delIndex, action) {
|
||||
if (summaryWindowOpened) {
|
||||
return;
|
||||
}
|
||||
@@ -559,7 +634,7 @@ var openSummaryWindow = function(appUid, delIndex, action)
|
||||
success: function (result, request) {
|
||||
var response = Ext.util.JSON.decode(result.responseText);
|
||||
if (response.success) {
|
||||
var sumaryInfPanel = PMExt.createInfoPanel('../appProxy/getSummary', {appUid: appUid, delIndex: delIndex, action: action});
|
||||
var sumaryInfPanel = createInfoPanel('../appProxy/getSummary', { appUid: appUid, delIndex: delIndex, action: action }, [], "caseProperties", _("ID_CASE_PROPERTIES"));
|
||||
sumaryInfPanel.setTitle(_('ID_GENERATE_INFO'));
|
||||
|
||||
var summaryWindow = new Ext.Window({
|
||||
@@ -670,31 +745,37 @@ var openSummaryWindow = function(appUid, delIndex, action)
|
||||
items: [panel]
|
||||
});
|
||||
} else {
|
||||
tabs.push({title: _('ID_MORE_INFORMATION'), bodyCfg: {
|
||||
tabs.push({
|
||||
title: _('ID_MORE_INFORMATION'), bodyCfg: {
|
||||
tag: 'iframe',
|
||||
id: 'summaryIFrame',
|
||||
src: '../cases/summary?APP_UID=' + appUid + '&DEL_INDEX=' + delIndex + '&DYN_UID=' + response.dynUid,
|
||||
style: { border: '0px none', height: '300px', overflow: 'auto' },
|
||||
onload: ''
|
||||
}});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
tabs.push({title: _('ID_UPLOADED_DOCUMENTS'), bodyCfg: {
|
||||
tabs.push({
|
||||
title: _('ID_UPLOADED_DOCUMENTS'), bodyCfg: {
|
||||
tag: 'iframe',
|
||||
id: 'summaryIFrame',
|
||||
src: '../cases/ajaxListener?action=uploadedDocumentsSummary',
|
||||
style: { border: '0px none', height: '300px' },
|
||||
onload: ''
|
||||
}});
|
||||
}
|
||||
});
|
||||
|
||||
tabs.push({title: _('ID_GENERATED_DOCUMENTS'), bodyCfg: {
|
||||
tabs.push({
|
||||
title: _('ID_GENERATED_DOCUMENTS'), bodyCfg: {
|
||||
tag: 'iframe',
|
||||
id: 'summaryIFrame',
|
||||
src: '../cases/ajaxListener?action=generatedDocumentsSummary',
|
||||
style: { border: '0px none', height: '450px' },
|
||||
onload: ''
|
||||
}});
|
||||
}
|
||||
});
|
||||
var summaryTabs = new Ext.TabPanel({
|
||||
activeTab: 0,
|
||||
items: tabs
|
||||
@@ -709,13 +790,11 @@ var openSummaryWindow = function(appUid, delIndex, action)
|
||||
icon: Ext.MessageBox.ERROR,
|
||||
buttons: Ext.Msg.OK,
|
||||
fn: function (btn) {
|
||||
try
|
||||
{
|
||||
try {
|
||||
prnt = parent.parent;
|
||||
top.location = top.location;
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
catch (err) {
|
||||
parent.location = parent.location;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user