PMCORE-3432
This commit is contained in:
@@ -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({
|
Ext.MessageBox.show({
|
||||||
msg: _('ID_CASE_NOTES_LOADING'),
|
msg: _('ID_CASE_NOTES_LOADING'),
|
||||||
progressText: _('ID_SAVING'),
|
progressText: _('ID_SAVING'),
|
||||||
@@ -83,13 +82,11 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
|
|||||||
icon: Ext.MessageBox.ERROR,
|
icon: Ext.MessageBox.ERROR,
|
||||||
buttons: Ext.MessageBox.OK,
|
buttons: Ext.MessageBox.OK,
|
||||||
fn: function (btn) {
|
fn: function (btn) {
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
prnt = parent.parent;
|
prnt = parent.parent;
|
||||||
top.location = top.location;
|
top.location = top.location;
|
||||||
}
|
}
|
||||||
catch (err)
|
catch (err) {
|
||||||
{
|
|
||||||
parent.location = parent.location;
|
parent.location = parent.location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -390,8 +387,7 @@ function updateTextCtr(body, event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function newNoteHandler()
|
function newNoteHandler() {
|
||||||
{
|
|
||||||
var i;
|
var i;
|
||||||
newNoteAreaActive = newNoteAreaActive ? false : true;
|
newNoteAreaActive = newNoteAreaActive ? false : true;
|
||||||
if (newNoteAreaActive) {
|
if (newNoteAreaActive) {
|
||||||
@@ -543,8 +539,87 @@ function statusBarMessage( msg, isLoading, success ) {
|
|||||||
/* Case Notes - End */
|
/* Case Notes - End */
|
||||||
|
|
||||||
/* Case Summary - Start */
|
/* 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) {
|
if (summaryWindowOpened) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -559,7 +634,7 @@ var openSummaryWindow = function(appUid, delIndex, action)
|
|||||||
success: function (result, request) {
|
success: function (result, request) {
|
||||||
var response = Ext.util.JSON.decode(result.responseText);
|
var response = Ext.util.JSON.decode(result.responseText);
|
||||||
if (response.success) {
|
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'));
|
sumaryInfPanel.setTitle(_('ID_GENERATE_INFO'));
|
||||||
|
|
||||||
var summaryWindow = new Ext.Window({
|
var summaryWindow = new Ext.Window({
|
||||||
@@ -670,31 +745,37 @@ var openSummaryWindow = function(appUid, delIndex, action)
|
|||||||
items: [panel]
|
items: [panel]
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
tabs.push({title: _('ID_MORE_INFORMATION'), bodyCfg: {
|
tabs.push({
|
||||||
|
title: _('ID_MORE_INFORMATION'), bodyCfg: {
|
||||||
tag: 'iframe',
|
tag: 'iframe',
|
||||||
id: 'summaryIFrame',
|
id: 'summaryIFrame',
|
||||||
src: '../cases/summary?APP_UID=' + appUid + '&DEL_INDEX=' + delIndex + '&DYN_UID=' + response.dynUid,
|
src: '../cases/summary?APP_UID=' + appUid + '&DEL_INDEX=' + delIndex + '&DYN_UID=' + response.dynUid,
|
||||||
style: { border: '0px none', height: '300px', overflow: 'auto' },
|
style: { border: '0px none', height: '300px', overflow: 'auto' },
|
||||||
onload: ''
|
onload: ''
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tabs.push({title: _('ID_UPLOADED_DOCUMENTS'), bodyCfg: {
|
tabs.push({
|
||||||
|
title: _('ID_UPLOADED_DOCUMENTS'), bodyCfg: {
|
||||||
tag: 'iframe',
|
tag: 'iframe',
|
||||||
id: 'summaryIFrame',
|
id: 'summaryIFrame',
|
||||||
src: '../cases/ajaxListener?action=uploadedDocumentsSummary',
|
src: '../cases/ajaxListener?action=uploadedDocumentsSummary',
|
||||||
style: { border: '0px none', height: '300px' },
|
style: { border: '0px none', height: '300px' },
|
||||||
onload: ''
|
onload: ''
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
tabs.push({title: _('ID_GENERATED_DOCUMENTS'), bodyCfg: {
|
tabs.push({
|
||||||
|
title: _('ID_GENERATED_DOCUMENTS'), bodyCfg: {
|
||||||
tag: 'iframe',
|
tag: 'iframe',
|
||||||
id: 'summaryIFrame',
|
id: 'summaryIFrame',
|
||||||
src: '../cases/ajaxListener?action=generatedDocumentsSummary',
|
src: '../cases/ajaxListener?action=generatedDocumentsSummary',
|
||||||
style: { border: '0px none', height: '450px' },
|
style: { border: '0px none', height: '450px' },
|
||||||
onload: ''
|
onload: ''
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
var summaryTabs = new Ext.TabPanel({
|
var summaryTabs = new Ext.TabPanel({
|
||||||
activeTab: 0,
|
activeTab: 0,
|
||||||
items: tabs
|
items: tabs
|
||||||
@@ -709,13 +790,11 @@ var openSummaryWindow = function(appUid, delIndex, action)
|
|||||||
icon: Ext.MessageBox.ERROR,
|
icon: Ext.MessageBox.ERROR,
|
||||||
buttons: Ext.Msg.OK,
|
buttons: Ext.Msg.OK,
|
||||||
fn: function (btn) {
|
fn: function (btn) {
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
prnt = parent.parent;
|
prnt = parent.parent;
|
||||||
top.location = top.location;
|
top.location = top.location;
|
||||||
}
|
}
|
||||||
catch (err)
|
catch (err) {
|
||||||
{
|
|
||||||
parent.location = parent.location;
|
parent.location = parent.location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user