FBI-2358:Message History >> A blank panel overlays the page

This commit is contained in:
Fabio Guachalla
2018-04-04 09:51:53 -04:00
parent 7c90b84c2a
commit 6ea1f36592

View File

@@ -2,14 +2,12 @@
* @author: Douglas Medrano * @author: Douglas Medrano
* May 03, 2011 * May 03, 2011
*/ */
//var windowMessage; var windowMessage = new Object();
windowMessage = new Object();
function onResizeIframe(idIframe){ function onResizeIframe(idIframe){
window.parent.tabIframeWidthFix2(idIframe); window.parent.tabIframeWidthFix2(idIframe);
} }
function windowPreviewMessage(rowSelected) { function windowPreviewMessage(rowSelected) {
windowMessage = new Ext.Window({ windowMessage = new Ext.Window({
title: '', title: '',
width: 600, width: 600,
@@ -138,12 +136,13 @@
function ajaxPostRequest(url, callback_function, id){ function ajaxPostRequest (url, callback_function, id) {
var d = new Date(); var d = new Date(),
var time = d.getTime(); time = d.getTime(),
return_xml=false,
http_request = false;
url= url + '&nocachetime='+time; url= url + '&nocachetime='+time;
var return_xml=false;
var http_request = false;
if (window.XMLHttpRequest){ // Mozilla, Safari,... if (window.XMLHttpRequest){ // Mozilla, Safari,...
http_request = new XMLHttpRequest(); http_request = new XMLHttpRequest();
@@ -169,21 +168,19 @@
return false; return false;
} }
http_request.onreadystatechange = function(){ http_request.onreadystatechange = function () {
if (http_request.readyState == 4){ if (http_request.readyState === 4) {
if (http_request.status == 200){ if (http_request.status === 200) {
if (return_xml){ if (return_xml) {
eval(callback_function + '(http_request.responseXML)'); eval(callback_function + '(http_request.responseXML)');
} else {
eval(callback_function + '(http_request.responseText, \'' + id + '\')');
} }
else{ } else {
eval(callback_function + '(http_request.responseText, \''+id+'\')'); alert('Error found on request:(Code: ' + http_request.status + ')');
}
}
else{
alert('Error found on request:(Code: ' + http_request.status + ')');
} }
} }
} };
http_request.open('GET', url, true); http_request.open('GET', url, true);
http_request.send(null); http_request.send(null);
} }
@@ -302,82 +299,77 @@ var ActionTabFrameGlobal = '';
} }
//!!historyGridList|changeLog //!!historyGridList|changeLog
function caseMessageHistory_RSP(response,id){ function caseMessageHistory_RSP (response, id) {
messageHistoryGridListMask.hide(); messageHistoryGridListMask.hide();
if(response==""){ if (response === "") {
Ext.Msg.show({
Ext.Msg.show({ title: '',
title:'', msg: _('ID_MAIL_SENT_SUCCESSFULLY'),
msg: _('ID_MAIL_SENT_SUCCESSFULLY'), buttons: Ext.Msg.INFO,
buttons: Ext.Msg.INFO, animEl: 'elId',
fn: function(){}, icon: Ext.MessageBox.INFO,
animEl: 'elId', buttons: Ext.MessageBox.OK
icon: Ext.MessageBox.INFO, });
buttons: Ext.MessageBox.OK Ext.destroy(Ext.getCmp('processesGrid'));
}); store.destroy();
messageHistoryGridList();
Ext.destroy(Ext.getCmp('processesGrid'));
messageHistoryGridList();
} }
else{ else {
alert(response); alert(response);
} }
} }
function messageHistoryGridList () {
var expander,
startDateRender,
escapeHtml,
actionRenderingTranslation,
processesGrid,
viewport;
function messageHistoryGridList(){
store = new Ext.data.GroupingStore({ store = new Ext.data.GroupingStore({
remoteSort: true, remoteSort: true,
proxy : new Ext.data.HttpProxy proxy: new Ext.data.HttpProxy({
( url: 'caseMessageHistory_Ajax.php?actionAjax=messageHistoryGridList_JXP'
{ }),
url: 'caseMessageHistory_Ajax.php?actionAjax=messageHistoryGridList_JXP' reader: new Ext.data.JsonReader({
} totalProperty: 'totalCount',
), root: 'data',
fields: [
{name: 'ID_MESSAGE'},
{name: 'APP_MSG_TYPE'},
{name: 'APP_MSG_DATE'},
{name: 'APP_MSG_SUBJECT'},
{name: 'APP_MSG_FROM'},
{name: 'APP_MSG_TO'},
{name: 'APP_MSG_STATUS'},
{name: 'APP_MSG_BODY'},
{name: 'MSGS_HISTORY'}
reader : new Ext.data.JsonReader ]
( })
{
totalProperty: 'totalCount',
root: 'data',
fields :
[
{name : 'ID_MESSAGE'},
{name : 'APP_MSG_TYPE'},
{name : 'APP_MSG_DATE'},
{name : 'APP_MSG_SUBJECT'},
{name : 'APP_MSG_FROM'},
{name : 'APP_MSG_TO'},
{name : 'APP_MSG_STATUS'},
{name : 'APP_MSG_BODY'},
{name : 'MSGS_HISTORY'}
]
}
)
}); });
var expander = new Ext.ux.grid.RowExpander({ expander = new Ext.ux.grid.RowExpander({
tpl : new Ext.Template( tpl : new Ext.Template(
'<p><b>'+TRANSLATIONS.ID_PRO_DESCRIPTION+':</b> {PRO_DESCRIPTION}</p><br>' '<p><b>'+TRANSLATIONS.ID_PRO_DESCRIPTION+':</b> {PRO_DESCRIPTION}</p><br>'
) )
}); });
startDateRender = function(v){ startDateRender = function (v) {
var dateString = "-"; var dateString = "-";
if(v!="-"){ if (v !== "-") {
dateString = _DF(v,"m/d/Y H:i:s"); dateString = _DF(v,"m/d/Y H:i:s");
} }
return dateString; return dateString;
} };
escapeHtml = function(v){ escapeHtml = function (v) {
var pre = document.createElement('pre'); var pre = document.createElement('pre');
var text = document.createTextNode( v ); var text = document.createTextNode( v );
pre.appendChild(text); pre.appendChild(text);
return pre.innerHTML; return pre.innerHTML;
} };
actionRenderingTranslation = function(v){ actionRenderingTranslation = function(v){
var actionTranslate = ""; var actionTranslate = "";
@@ -399,13 +391,11 @@ var ActionTabFrameGlobal = '';
return actionTranslate; return actionTranslate;
}; };
processesGrid = new Ext.grid.GridPanel({
var processesGrid = new Ext.grid.GridPanel({
region: 'center', region: 'center',
layout: 'fit', layout: 'column',
id: 'processesGrid', id: 'processesGrid',
height:500, height:500,
//autoWidth : true,
width:'', width:'',
title : '', title : '',
stateful : true, stateful : true,
@@ -413,11 +403,9 @@ var ActionTabFrameGlobal = '';
enableColumnResize: true, enableColumnResize: true,
enableHdMenu: true, enableHdMenu: true,
frame:false, frame:false,
//plugins: expander,
// cls : 'grid_with_checkbox',
columnLines: true, columnLines: true,
viewConfig: { viewConfig: {
forceFit:true, forceFit: true,
emptyText: (_('ID_NO_RECORDS_FOUND')) emptyText: (_('ID_NO_RECORDS_FOUND'))
}, },
cm: new Ext.grid.ColumnModel({ cm: new Ext.grid.ColumnModel({
@@ -426,7 +414,6 @@ var ActionTabFrameGlobal = '';
sortable: true sortable: true
}, },
columns: [ columns: [
//expander,
{id:'ID_MESSAGE', dataIndex: 'ID_MESSAGE', hidden:true, hideable:false}, {id:'ID_MESSAGE', dataIndex: 'ID_MESSAGE', hidden:true, hideable:false},
{header: _("ID_TYPE"), dataIndex: 'APP_MSG_TYPE', width: 70}, {header: _("ID_TYPE"), dataIndex: 'APP_MSG_TYPE', width: 70},
{header: _("ID_DATE_LABEL"), dataIndex: 'APP_MSG_DATE', width: 60, renderer: startDateRender}, {header: _("ID_DATE_LABEL"), dataIndex: 'APP_MSG_DATE', width: 60, renderer: startDateRender},
@@ -437,7 +424,6 @@ var ActionTabFrameGlobal = '';
{header: _("ID_APP_MSG_BODY"), dataIndex: 'APP_MSG_BODY', width: 50,hidden:true}, {header: _("ID_APP_MSG_BODY"), dataIndex: 'APP_MSG_BODY', width: 50,hidden:true},
{id:'MSGS_HISTORY', dataIndex: 'MSGS_HISTORY', hidden:true, hideable:false}, {id:'MSGS_HISTORY', dataIndex: 'MSGS_HISTORY', hidden:true, hideable:false},
{ {
// header: _("ID_RESEND"),
xtype: 'actioncolumn', xtype: 'actioncolumn',
width: 60, width: 60,
items: [ items: [
@@ -506,33 +492,15 @@ var ActionTabFrameGlobal = '';
processesGrid.store.load({params: {"actionAjax":"messageHistoryGridList_JXP"}}); processesGrid.store.load({params: {"actionAjax":"messageHistoryGridList_JXP"}});
processesGrid.store.on(
'load',
function()
{
//window.parent.resize_iframe();
},
this,
{
single: true
}
);
processesGrid.on('contextmenu', function (evt) { processesGrid.on('contextmenu', function (evt) {
evt.preventDefault(); evt.preventDefault();
}, this); }, this);
function emptyReturn(){
}
var viewport = new Ext.Viewport({
layout: 'border',
autoScroll: true,
items: [
processesGrid
]
});
}
//!historyGridList|
viewport = new Ext.Viewport({
layout: 'fit',
autoScroll: true,
items: [
processesGrid
]
});
}