2011-10-03 11:45:25 -04:00
|
|
|
var newNoteAreaActive;
|
2011-09-22 12:50:40 -04:00
|
|
|
var caseNotesWindow;
|
2011-10-03 11:45:25 -04:00
|
|
|
var storeNotes;
|
|
|
|
|
var appUid;
|
|
|
|
|
var title;
|
2012-04-12 17:00:06 -04:00
|
|
|
var summaryWindowOpened = false;
|
2011-08-25 12:58:52 -04:00
|
|
|
|
2012-08-17 09:03:31 -04:00
|
|
|
var toolTipChkSendMail;
|
|
|
|
|
|
2011-07-14 10:45:20 -04:00
|
|
|
function closeCaseNotesWindow(){
|
|
|
|
|
if(Ext.get("caseNotesWindowPanel")){
|
2011-07-14 19:12:55 -04:00
|
|
|
Ext.get("caseNotesWindowPanel").destroy();
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-05 12:29:55 -04:00
|
|
|
function openCaseNotesWindow(appUid1, modalSw, appTitle, proUid, taskUid)
|
2011-09-22 12:50:40 -04:00
|
|
|
{
|
2012-10-05 12:29:55 -04:00
|
|
|
Ext.MessageBox.show({
|
|
|
|
|
msg: _('ID_CASE_NOTES_LOADING'),
|
|
|
|
|
progressText: 'Saving...',
|
|
|
|
|
width:300,
|
|
|
|
|
wait:true,
|
|
|
|
|
waitConfig: {interval:200},
|
|
|
|
|
animEl: 'mb7'
|
|
|
|
|
});
|
|
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
Ext.QuickTips.init();
|
2012-10-05 12:29:55 -04:00
|
|
|
appUid = !appUid1 ? "": appUid1;
|
|
|
|
|
proUid = !proUid ? "": proUid;
|
|
|
|
|
taskUid = !taskUid ? "": taskUid;
|
|
|
|
|
|
2011-07-14 19:12:55 -04:00
|
|
|
var startRecord=0;
|
|
|
|
|
var loadSize=10;
|
|
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
storeNotes = new Ext.data.JsonStore({
|
2012-10-05 12:29:55 -04:00
|
|
|
url : '../appProxy/getNotesList?appUid='+appUid+'&pro='+proUid+'&tas='+taskUid,
|
2011-07-14 10:45:20 -04:00
|
|
|
root: 'notes',
|
|
|
|
|
totalProperty: 'totalCount',
|
2011-09-22 12:50:40 -04:00
|
|
|
fields: ['USR_USERNAME','USR_FIRSTNAME','USR_LASTNAME','USR_FULL_NAME','NOTE_DATE','NOTE_CONTENT', 'USR_UID', 'user'],
|
2011-07-14 10:45:20 -04:00
|
|
|
baseParams:{
|
2011-07-14 19:12:55 -04:00
|
|
|
start:startRecord,
|
|
|
|
|
limit:startRecord+loadSize
|
|
|
|
|
},
|
|
|
|
|
listeners:{
|
|
|
|
|
load:function(){
|
2012-10-05 12:29:55 -04:00
|
|
|
Ext.MessageBox.hide();
|
|
|
|
|
if ( typeof(storeNotes.reader.jsonData.noPerms != 'undefined') &&
|
|
|
|
|
(storeNotes.reader.jsonData.noPerms == '1') ) {
|
|
|
|
|
Ext.MessageBox.show({
|
|
|
|
|
title: _('ID_WARNING'),
|
|
|
|
|
msg: _('ID_CASES_NOTES_NO_PERMISSIONS'),
|
|
|
|
|
buttons: Ext.MessageBox.OK,
|
|
|
|
|
animEl: 'mb9',
|
|
|
|
|
icon: Ext.MessageBox.WARNING
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-09-22 12:50:40 -04:00
|
|
|
caseNotesWindow.setTitle(_('ID_CASES_NOTES') + ' (' + storeNotes.data.items.length + ')');
|
2012-12-19 11:15:46 -04:00
|
|
|
title = !appTitle ? storeNotes.reader.jsonData.appTitle : appTitle ;
|
2011-09-22 12:50:40 -04:00
|
|
|
|
2011-07-14 19:12:55 -04:00
|
|
|
if(storeNotes.getCount()<storeNotes.getTotalCount()){
|
|
|
|
|
Ext.getCmp('CASES_MORE_BUTTON').show();
|
|
|
|
|
}else{
|
|
|
|
|
Ext.getCmp('CASES_MORE_BUTTON').hide();
|
|
|
|
|
}
|
2012-12-19 11:15:46 -04:00
|
|
|
|
|
|
|
|
caseNotesWindow.show();
|
|
|
|
|
newNoteAreaActive = false;
|
|
|
|
|
newNoteHandler();
|
2011-07-14 19:12:55 -04:00
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
storeNotes.load();
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-07-14 10:45:20 -04:00
|
|
|
var panelNotes = new Ext.Panel({
|
|
|
|
|
id:'notesPanel',
|
2011-07-14 19:12:55 -04:00
|
|
|
frame:true,
|
2011-07-14 10:45:20 -04:00
|
|
|
autoWidth:true,
|
|
|
|
|
autoHeight:true,
|
2011-10-03 11:45:25 -04:00
|
|
|
collapsible:false,
|
|
|
|
|
items:[
|
2011-09-22 12:50:40 -04:00
|
|
|
new Ext.DataView({
|
|
|
|
|
store: storeNotes,
|
|
|
|
|
loadingtext:_('ID_CASE_NOTES_LOADING'),
|
|
|
|
|
emptyText: _('ID_CASE_NOTES_EMPTY'),
|
|
|
|
|
cls: 'x-cnotes-view',
|
|
|
|
|
tpl: '<tpl for=".">' +
|
|
|
|
|
'<div class="x-cnotes-source"><table><tbody>' +
|
|
|
|
|
'<tr>' +
|
|
|
|
|
'<td class="x-cnotes-label"><img border="0" src="../users/users_ViewPhotoGrid?pUID={USR_UID}" width="40" height="40"/></td>' +
|
|
|
|
|
'<td class="x-cnotes-name">'+
|
|
|
|
|
'<p class="user-from">{user}</p>'+
|
|
|
|
|
'<p class="x-editable x-message">{NOTE_CONTENT}</p> '+
|
|
|
|
|
'<p class="x-editable"><small>'+_('ID_POSTED_AT')+'<i> {NOTE_DATE}</i></small></p>'+
|
|
|
|
|
'</td>' +
|
|
|
|
|
'</tr>' +
|
|
|
|
|
'</tbody></table></div>' +
|
|
|
|
|
'</tpl>',
|
|
|
|
|
itemSelector: 'div.x-cnotes-source',
|
|
|
|
|
overClass: 'x-cnotes-over',
|
|
|
|
|
selectedClass: 'x-cnotes-selected',
|
|
|
|
|
singleSelect: true,
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-09-22 12:50:40 -04:00
|
|
|
prepareData: function(data){
|
|
|
|
|
//data.shortName = Ext.util.Format.ellipsis(data.name, 15);
|
|
|
|
|
//data.sizeString = Ext.util.Format.fileSize(data.size);
|
|
|
|
|
//data.dateString = data.lastmod.format("m/d/Y g:i a");
|
2011-07-14 10:45:20 -04:00
|
|
|
|
2011-09-22 12:50:40 -04:00
|
|
|
data.user = _FNF(data.USR_USERNAME, data.USR_FIRSTNAME, data.USR_LASTNAME);
|
|
|
|
|
data.NOTE_CONTENT = data.NOTE_CONTENT.replace(/\n/g,' <br/>');
|
|
|
|
|
return data;
|
2011-07-14 10:45:20 -04:00
|
|
|
},
|
2011-09-22 12:50:40 -04:00
|
|
|
|
|
|
|
|
listeners: {
|
|
|
|
|
selectionchange: {
|
|
|
|
|
fn: function(dv,nodes){
|
|
|
|
|
var l = nodes.length;
|
|
|
|
|
var s = l != 1 ? 's' : '';
|
|
|
|
|
//panelNotes.setTitle('Process ('+l+' item'+s+' selected)');
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
click: {
|
|
|
|
|
fn: function(dv,nodes,a){
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
|
|
|
|
}
|
2011-09-22 12:50:40 -04:00
|
|
|
}),{
|
|
|
|
|
xtype:'button',
|
|
|
|
|
id:'CASES_MORE_BUTTON',
|
|
|
|
|
iconCls: '.x-pm-notes-btn',
|
|
|
|
|
hidden:true,
|
|
|
|
|
text:_('ID_CASE_NOTES_MORE'),
|
|
|
|
|
align:'center',
|
2011-10-03 11:45:25 -04:00
|
|
|
handler:function() {
|
2011-09-22 12:50:40 -04:00
|
|
|
startRecord=startRecord+loadSize;
|
|
|
|
|
limitRecord=startRecord+loadSize;
|
|
|
|
|
storeNotes.load({
|
|
|
|
|
params:{
|
|
|
|
|
start:0,
|
|
|
|
|
limit:startRecord+loadSize
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
2011-09-22 12:50:40 -04:00
|
|
|
]
|
2011-07-14 10:45:20 -04:00
|
|
|
});
|
|
|
|
|
|
2011-09-22 12:50:40 -04:00
|
|
|
caseNotesWindow = new Ext.Window({
|
|
|
|
|
title: _('ID_CASES_NOTES'), //Title of the Window
|
|
|
|
|
id: 'caseNotesWindowPanel', //ID of the Window Panel
|
2012-08-17 09:03:31 -04:00
|
|
|
width: 350, //Width of the Window
|
2011-09-22 12:50:40 -04:00
|
|
|
resizable: true, //Resize of the Window, if false - it cannot be resized
|
|
|
|
|
closable: true, //Hide close button of the Window
|
|
|
|
|
modal: modalSw, //When modal:true it make the window modal and mask everything behind it when displayed
|
|
|
|
|
//iconCls: 'ICON_CASES_NOTES',
|
|
|
|
|
autoCreate: true,
|
|
|
|
|
height:400,
|
|
|
|
|
shadow:true,
|
|
|
|
|
minWidth:300,
|
|
|
|
|
minHeight:200,
|
|
|
|
|
proxyDrag: true,
|
2011-10-03 11:45:25 -04:00
|
|
|
constrain: true,
|
2011-09-22 12:50:40 -04:00
|
|
|
keys: {
|
|
|
|
|
key: 27,
|
2012-10-05 12:29:55 -04:00
|
|
|
fn : function(){
|
2011-09-22 12:50:40 -04:00
|
|
|
caseNotesWindow.hide();
|
|
|
|
|
}
|
2011-07-14 19:12:55 -04:00
|
|
|
},
|
2011-09-22 12:50:40 -04:00
|
|
|
autoScroll:true,
|
|
|
|
|
items:[panelNotes],
|
|
|
|
|
tools:[
|
|
|
|
|
{
|
|
|
|
|
id:'refresh',
|
|
|
|
|
handler:function() {
|
|
|
|
|
storeNotes.load();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
2011-10-03 11:45:25 -04:00
|
|
|
tbar:[
|
|
|
|
|
new Ext.form.TextArea({
|
2012-10-05 12:29:55 -04:00
|
|
|
text : _('ID_NEW_NOTE'),
|
|
|
|
|
xtype : 'textarea',
|
|
|
|
|
id : 'caseNoteText',
|
|
|
|
|
name : 'caseNoteText',
|
|
|
|
|
width : 330,
|
|
|
|
|
grow : true,
|
2011-10-03 11:45:25 -04:00
|
|
|
height : 40,
|
|
|
|
|
growMin: 40,
|
|
|
|
|
growMax: 80,
|
2012-10-05 12:29:55 -04:00
|
|
|
maxLengthText : 500,
|
|
|
|
|
allowBlank :true,
|
|
|
|
|
selectOnFocus :true,
|
2011-10-03 11:45:25 -04:00
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners : {
|
2012-10-05 12:29:55 -04:00
|
|
|
scope : this,
|
|
|
|
|
keyup : updateTextCtr,
|
2011-10-03 11:45:25 -04:00
|
|
|
keydown: updateTextCtr
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
rowtbar: [
|
|
|
|
|
[
|
2012-08-17 09:03:31 -04:00
|
|
|
{
|
|
|
|
|
xtype: "checkbox",
|
|
|
|
|
id: "chkSendMail",
|
|
|
|
|
name: "chkSendMail",
|
|
|
|
|
checked: true,
|
|
|
|
|
boxLabel: _("ID_CASE_NOTES_LABEL_SEND")
|
|
|
|
|
},
|
2011-10-03 11:45:25 -04:00
|
|
|
'->',
|
2012-07-12 09:47:26 -04:00
|
|
|
'<span id="countChar">500</span>',
|
2011-10-03 11:45:25 -04:00
|
|
|
' ',
|
|
|
|
|
{
|
|
|
|
|
id: 'sendBtn',
|
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
|
|
|
text: _('ID_SEND'),
|
2011-10-03 11:45:25 -04:00
|
|
|
cls: 'x-toolbar1',
|
|
|
|
|
handler: sendNote
|
|
|
|
|
}, ' ',
|
|
|
|
|
{
|
|
|
|
|
id: 'addCancelBtn',
|
2012-04-23 10:23:09 -04:00
|
|
|
text: _('ID_CANCEL'),
|
2011-10-03 11:45:25 -04:00
|
|
|
cls: 'x-toolbar1',
|
|
|
|
|
//iconCls: 'xx',
|
2012-12-11 15:10:02 -04:00
|
|
|
//icon: '/images/add_notes.png',
|
2011-10-03 11:45:25 -04:00
|
|
|
handler: newNoteHandler,
|
|
|
|
|
tooltip: {
|
2012-04-23 10:23:09 -04:00
|
|
|
title: _('ID_CASES_NOTES_ADD'),
|
|
|
|
|
text: _('ID_CASE') + ': ' + title
|
2011-10-03 11:45:25 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
],
|
2011-09-22 12:50:40 -04:00
|
|
|
bbar:[
|
|
|
|
|
new Ext.ux.StatusBar({
|
|
|
|
|
defaultText : _('ID_NOTES_READY'),
|
|
|
|
|
id : 'notesStatusPanel',
|
|
|
|
|
//defaultIconCls: 'ICON_CASES_NOTES',
|
|
|
|
|
text: _('ID_NOTES_READY'), // values to set initially:
|
|
|
|
|
//iconCls: 'ready-icon',
|
|
|
|
|
statusAlign: 'left',
|
|
|
|
|
items: [] // any standard Toolbar items:
|
2011-10-03 11:45:25 -04:00
|
|
|
})
|
2011-09-22 12:50:40 -04:00
|
|
|
],
|
|
|
|
|
listeners: {
|
|
|
|
|
show:function() {
|
|
|
|
|
this.loadMask = new Ext.LoadMask(this.body, {
|
|
|
|
|
msg:_('ID_LOADING')
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
close:function(){
|
|
|
|
|
if (Ext.get("caseNotes")) {
|
|
|
|
|
Ext.getCmp("caseNotes").toggle(false);
|
|
|
|
|
//Ext.getCmp('caseNotes').show();
|
|
|
|
|
}
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
|
|
|
|
}
|
2011-09-22 12:50:40 -04:00
|
|
|
});
|
|
|
|
|
|
2012-08-17 09:03:31 -04:00
|
|
|
toolTipChkSendMail = new Ext.ToolTip({
|
|
|
|
|
dismissDelay: 3000, //auto hide after 3 seconds
|
|
|
|
|
title: _("ID_CASE_NOTES_HINT_SEND"),
|
|
|
|
|
//html "",
|
|
|
|
|
//text: "",
|
|
|
|
|
width: 200
|
|
|
|
|
});
|
2011-10-03 11:45:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateTextCtr(body, event) {
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
ctr = document.getElementById('countChar').innerHTML;
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
text = Ext.getCmp('caseNoteText').getValue();
|
2012-07-12 09:47:26 -04:00
|
|
|
maxLength = 500;
|
2011-10-03 11:45:25 -04:00
|
|
|
|
|
|
|
|
if (text.length > maxLength) {
|
2012-07-12 09:47:26 -04:00
|
|
|
Ext.getCmp('caseNoteText').setValue(Ext.getCmp('caseNoteText').getValue().substr(0,500));
|
2011-10-03 11:45:25 -04:00
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
document.getElementById('countChar').innerHTML = maxLength - text.length;
|
|
|
|
|
}
|
2011-09-22 12:50:40 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function newNoteHandler()
|
|
|
|
|
{
|
|
|
|
|
newNoteAreaActive = newNoteAreaActive ? false : true;
|
|
|
|
|
if (newNoteAreaActive) {
|
2011-10-03 11:45:25 -04:00
|
|
|
Ext.getCmp('addCancelBtn').setText('');
|
|
|
|
|
Ext.getCmp('addCancelBtn').setTooltip({
|
|
|
|
|
title: _('ID_CASES_NOTES_ADD'),
|
|
|
|
|
text: _('ID_CASE') +': '+ title
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.getCmp('addCancelBtn').setIcon('/images/comment_add.gif');
|
|
|
|
|
|
|
|
|
|
caseNotesWindow.getTopToolbar().hide();
|
2012-08-17 09:03:31 -04:00
|
|
|
Ext.getCmp("chkSendMail").hide();
|
|
|
|
|
Ext.getCmp("sendBtn").hide();
|
2011-10-03 11:45:25 -04:00
|
|
|
document.getElementById('countChar').style.display = 'none';
|
|
|
|
|
caseNotesWindow.doLayout();
|
|
|
|
|
}
|
|
|
|
|
else {
|
2012-08-17 09:03:31 -04:00
|
|
|
toolTipChkSendMail.initTarget("chkSendMail");
|
|
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
Ext.getCmp('addCancelBtn').setText('');
|
|
|
|
|
Ext.getCmp('addCancelBtn').setTooltip({title: _('ID_CASES_NOTES_CANCEL')});
|
|
|
|
|
Ext.getCmp('addCancelBtn').setIcon('/images/cancel.png');
|
|
|
|
|
|
2011-09-22 12:50:40 -04:00
|
|
|
caseNotesWindow.getTopToolbar().show();
|
2012-08-17 09:03:31 -04:00
|
|
|
Ext.getCmp("chkSendMail").show();
|
|
|
|
|
Ext.getCmp("sendBtn").show();
|
2011-10-03 11:45:25 -04:00
|
|
|
document.getElementById('countChar').style.display = 'block';
|
2011-09-22 12:50:40 -04:00
|
|
|
Ext.getCmp('caseNoteText').focus();
|
|
|
|
|
Ext.getCmp('caseNoteText').reset();
|
2012-07-12 09:47:26 -04:00
|
|
|
document.getElementById('countChar').innerHTML = '500';
|
2011-10-03 11:45:25 -04:00
|
|
|
caseNotesWindow.doLayout();
|
2011-07-14 19:12:55 -04:00
|
|
|
}
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-09-22 12:50:40 -04:00
|
|
|
caseNotesWindow.doLayout();
|
2011-07-14 10:45:20 -04:00
|
|
|
}
|
2011-07-14 19:12:55 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
function sendNote()
|
|
|
|
|
{
|
|
|
|
|
var noteText = Ext.getCmp('caseNoteText').getValue();
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
if (noteText == "") {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
newNoteHandler();
|
|
|
|
|
|
|
|
|
|
Ext.getCmp('caseNoteText').focus();
|
|
|
|
|
Ext.getCmp('caseNoteText').reset();
|
|
|
|
|
statusBarMessage( _('ID_CASES_NOTE_POSTING'), true);
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : '../appProxy/postNote' ,
|
|
|
|
|
params : {
|
2012-08-17 09:03:31 -04:00
|
|
|
appUid: appUid,
|
|
|
|
|
noteText: noteText,
|
|
|
|
|
swSendMail: (Ext.getCmp("chkSendMail").checked == true)? 1 : 0
|
2011-10-03 11:45:25 -04:00
|
|
|
},
|
|
|
|
|
success: function ( result, request ) {
|
|
|
|
|
var data = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
if(data.success=="success"){
|
|
|
|
|
statusBarMessage( _('ID_CASES_NOTE_POST_SUCCESS'), false,true);
|
|
|
|
|
storeNotes.load();
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
statusBarMessage( _('ID_CASES_NOTE_POST_ERROR'), false,false);
|
|
|
|
|
Ext.MessageBox.alert(_('ID_CASES_NOTE_POST_ERROR'), data.message);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
failure: function ( result, request) {
|
|
|
|
|
statusBarMessage( _('ID_CASES_NOTE_POST_FAILED'), false,false);
|
|
|
|
|
Ext.MessageBox.alert(_('ID_CASES_NOTE_POST_FAILED'), result.responseText);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2011-07-14 10:45:20 -04:00
|
|
|
function statusBarMessage( msg, isLoading, success ) {
|
2011-07-14 19:12:55 -04:00
|
|
|
var statusBar = Ext.getCmp('notesStatusPanel');
|
|
|
|
|
if( !statusBar ) return;
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-07-14 19:12:55 -04:00
|
|
|
if( isLoading ) {
|
|
|
|
|
statusBar.showBusy(msg);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
//statusBar.setStatus("Done.");
|
|
|
|
|
statusBar.clearStatus();
|
|
|
|
|
if( success ) {
|
|
|
|
|
statusBar.setStatus({
|
|
|
|
|
text: '' + msg,
|
2011-10-03 11:45:25 -04:00
|
|
|
iconCls: 'x-status-valid',
|
2011-07-14 19:12:55 -04:00
|
|
|
clear: true
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
statusBar.setStatus({
|
|
|
|
|
text: 'Error: ' + msg,
|
2011-10-03 11:45:25 -04:00
|
|
|
iconCls: 'x-status-error',
|
2011-07-14 19:12:55 -04:00
|
|
|
clear: true
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-08-19 16:47:44 -04:00
|
|
|
}
|
|
|
|
|
|
2011-08-25 12:58:52 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------------------
|
|
|
|
|
|
2011-08-25 12:58:52 -04:00
|
|
|
/* Case Notes - End */
|
2011-10-03 11:45:25 -04:00
|
|
|
|
2011-08-25 12:58:52 -04:00
|
|
|
/* Case Summary - Start */
|
2012-11-09 15:43:32 -04:00
|
|
|
var openSummaryWindow = function(appUid, delIndex, action)
|
2011-09-21 12:20:45 -04:00
|
|
|
{
|
2012-04-12 17:00:06 -04:00
|
|
|
if (summaryWindowOpened) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
summaryWindowOpened = true;
|
2011-09-21 12:20:45 -04:00
|
|
|
Ext.Ajax.request({
|
|
|
|
|
url : '../appProxy/requestOpenSummary',
|
|
|
|
|
params : {
|
|
|
|
|
appUid : appUid,
|
2012-11-09 15:43:32 -04:00
|
|
|
delIndex: delIndex,
|
|
|
|
|
action: action
|
2011-08-25 12:58:52 -04:00
|
|
|
},
|
2011-09-21 12:20:45 -04:00
|
|
|
success: function (result, request) {
|
|
|
|
|
var response = Ext.util.JSON.decode(result.responseText);
|
|
|
|
|
if (response.success) {
|
2012-11-09 15:43:32 -04:00
|
|
|
var sumaryInfPanel = PMExt.createInfoPanel('../appProxy/getSummary', {appUid: appUid, delIndex: delIndex, action: action});
|
2011-09-21 12:20:45 -04:00
|
|
|
sumaryInfPanel.setTitle(_('ID_GENERATE_INFO'));
|
2011-08-25 12:58:52 -04:00
|
|
|
|
2011-09-21 12:20:45 -04:00
|
|
|
var summaryWindow = new Ext.Window({
|
|
|
|
|
title: _('ID_SUMMARY'),
|
2011-10-07 09:29:47 -04:00
|
|
|
layout: 'fit',
|
2012-02-23 12:34:33 -04:00
|
|
|
width: 600,
|
|
|
|
|
height: 450,
|
2011-10-07 09:29:47 -04:00
|
|
|
resizable: true,
|
2011-09-21 12:20:45 -04:00
|
|
|
closable: true,
|
|
|
|
|
modal: true,
|
|
|
|
|
autoScroll:true,
|
2011-10-03 11:55:47 -04:00
|
|
|
constrain: true,
|
2011-09-21 12:20:45 -04:00
|
|
|
keys: {
|
|
|
|
|
key: 27,
|
|
|
|
|
fn: function() {
|
|
|
|
|
summaryWindow.close();
|
2011-08-25 12:58:52 -04:00
|
|
|
}
|
2011-10-03 11:55:47 -04:00
|
|
|
}/*,
|
2011-09-21 12:20:45 -04:00
|
|
|
buttons : [{
|
|
|
|
|
text : _('ID_CANCEL'),
|
|
|
|
|
handler : function(){
|
|
|
|
|
summaryWindow.close();
|
|
|
|
|
}}
|
2011-10-18 17:50:55 -04:00
|
|
|
],*/
|
2011-08-25 12:58:52 -04:00
|
|
|
});
|
2011-09-21 12:20:45 -04:00
|
|
|
|
2012-02-23 12:34:33 -04:00
|
|
|
var tabs = new Array();
|
|
|
|
|
tabs.push(sumaryInfPanel);
|
2011-09-21 12:20:45 -04:00
|
|
|
if (response.dynUid != '') {
|
|
|
|
|
tabs.push({title: Ext.util.Format.capitalize(_('ID_MORE_INFORMATION')), bodyCfg: {
|
|
|
|
|
tag: 'iframe',
|
|
|
|
|
id: 'summaryIFrame',
|
|
|
|
|
src: '../cases/summary?APP_UID=' + appUid + '&DEL_INDEX=' + delIndex + '&DYN_UID=' + response.dynUid,
|
2012-02-23 12:34:33 -04:00
|
|
|
style: {border: '0px none', height: '300px'},
|
2011-09-21 12:20:45 -04:00
|
|
|
onload: ''
|
|
|
|
|
}});
|
|
|
|
|
}
|
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
|
|
|
tabs.push({title: Ext.util.Format.capitalize(_('ID_UPLOADED_DOCUMENTS')), bodyCfg: {
|
2012-02-23 12:34:33 -04:00
|
|
|
tag: 'iframe',
|
|
|
|
|
id: 'summaryIFrame',
|
|
|
|
|
src: '../cases/ajaxListener?action=uploadedDocumentsSummary',
|
|
|
|
|
style: {border: '0px none', height: '300px'},
|
|
|
|
|
onload: ''
|
|
|
|
|
}});
|
2012-04-12 17:00:06 -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
|
|
|
tabs.push({title: Ext.util.Format.capitalize(_('ID_GENERATED_DOCUMENTS')), bodyCfg: {
|
2012-02-23 12:34:33 -04:00
|
|
|
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
|
|
|
|
|
});
|
|
|
|
|
summaryWindow.add(summaryTabs);
|
2011-09-21 12:20:45 -04:00
|
|
|
summaryWindow.doLayout();
|
|
|
|
|
summaryWindow.show();
|
2011-08-25 12:58:52 -04:00
|
|
|
}
|
2011-09-21 12:20:45 -04:00
|
|
|
else {
|
|
|
|
|
PMExt.warning(_('ID_WARNING'), response.message);
|
|
|
|
|
}
|
2012-04-12 17:00:06 -04:00
|
|
|
summaryWindowOpened = false;
|
2011-09-21 12:20:45 -04:00
|
|
|
},
|
|
|
|
|
failure: function (result, request) {
|
2012-08-17 09:03:31 -04:00
|
|
|
summaryWindowOpened = false;
|
2011-08-25 12:58:52 -04:00
|
|
|
}
|
|
|
|
|
});
|
2011-09-21 12:20:45 -04:00
|
|
|
}
|
2011-08-29 16:33:33 -04:00
|
|
|
/* Case Summary - End*/
|
2011-10-03 11:45:25 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.Panel.prototype.originalonRender = Ext.Panel.prototype.onRender;
|
|
|
|
|
|
|
|
|
|
// override onRender method
|
|
|
|
|
Ext.Panel.prototype.onRender = function(ct, position) {
|
|
|
|
|
this.originalonRender(ct, position);
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
// use the custom rowtbar argument to add it to this TopToolbar
|
|
|
|
|
if(this.tbar && this.rowtbar){
|
|
|
|
|
var rowtbar = this.rowtbar;
|
|
|
|
|
if(!Ext.isArray(rowtbar))
|
|
|
|
|
return;
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
for(var i = 0; i < rowtbar.length; i ++) {
|
|
|
|
|
new Ext.Toolbar(rowtbar[i]).render(this.tbar);
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
// use the custom rowbbar argument to add it to this BottomToolbar
|
|
|
|
|
if(this.bbar && this.rowbbar) {
|
|
|
|
|
var rowbbar = this.rowbbar;
|
|
|
|
|
if(!Ext.isArray(rowbbar))
|
|
|
|
|
return;
|
2012-04-12 17:00:06 -04:00
|
|
|
|
2011-10-03 11:45:25 -04:00
|
|
|
for(var i = 0; i < rowbbar.length; i ++) {
|
|
|
|
|
new Ext.Toolbar(rowbbar[i]).render(this.bbar);
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-04-12 17:00:06 -04:00
|
|
|
}
|
2012-08-17 09:03:31 -04:00
|
|
|
|