diff --git a/workflow/engine/methods/users/usersAjax.php b/workflow/engine/methods/users/usersAjax.php index 10f259de6..ed0107141 100644 --- a/workflow/engine/methods/users/usersAjax.php +++ b/workflow/engine/methods/users/usersAjax.php @@ -55,7 +55,7 @@ switch($_POST['action']) $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME); $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME); $oCriteria->addSelectColumn(UsersPeer::USR_EMAIL); - $oCriteria->add(UsersPeer::USR_STATUS,'ACTIVE'); + $oCriteria->add(UsersPeer::USR_STATUS, array('ACTIVE', 'VACATION'), Criteria::IN); if (isset($_POST['USR_UID'])) { $oCriteria->add(UsersPeer::USR_UID, $_POST['USR_UID'], Criteria::NOT_EQUAL); } diff --git a/workflow/engine/templates/cases/caseMessageHistory.js b/workflow/engine/templates/cases/caseMessageHistory.js index 974cb54ef..3ccc8e009 100644 --- a/workflow/engine/templates/cases/caseMessageHistory.js +++ b/workflow/engine/templates/cases/caseMessageHistory.js @@ -1,31 +1,31 @@ /* * @author: Douglas Medrano - * May 03, 2011 + * May 03, 2011 */ - function onResizeIframe(idIframe){ - window.parent.tabIframeWidthFix2(idIframe); + function onResizeIframe(idIframe){ + window.parent.tabIframeWidthFix2(idIframe); } - + previewMessage = function() { - var rowSelected = Ext.getCmp('processesGrid').getSelectionModel().getSelected(); + var rowSelected = Ext.getCmp('processesGrid').getSelectionModel().getSelected(); if (rowSelected) { windowMessage = new Ext.Window({ - title: '', - width: 600, - height: 420, - border: false, + title: '', + width: 600, + height: 420, + border: false, layout : 'fit', items: [ - { + { xtype: 'form', - frame: true, - border: false, + frame: true, + border: false, defaults: { width: 150 }, - items: [ + items: [ { xtype: 'textfield', fieldLabel: _("ID_FROM"), @@ -61,12 +61,12 @@ readOnly: true, name: 'Status' }, - { - name : 'body', - id:'body', + { + name : 'body', + id:'body', hideLabel:true, - xtype: 'htmleditor', - autoScroll: true, + xtype: 'htmleditor', + autoScroll: true, readOnly: true, x: 1, y: 1, @@ -79,20 +79,20 @@ enableLists:false, enableSourceEdit:false, anchor: '100%', - height: 260 + height: 260 } - ] - } - ] + ] + } + ] }); - + //load fields from rowSelect Ext.getCmp('From').setValue(rowSelected.data.APP_MSG_FROM); - Ext.getCmp('To').setValue(rowSelected.data.APP_MSG_TO); - Ext.getCmp('Subjet').setValue(rowSelected.data.APP_MSG_SUBJECT); + Ext.getCmp('To').setValue(rowSelected.data.APP_MSG_TO); + Ext.getCmp('Subjet').setValue(rowSelected.data.APP_MSG_SUBJECT); Ext.getCmp('date').setValue(rowSelected.data.APP_MSG_DATE); - Ext.getCmp('body').setValue(rowSelected.data.APP_MSG_BODY); - + Ext.getCmp('body').setValue(rowSelected.data.APP_MSG_BODY); + //show windows message windowMessage.show(windowMessage); } @@ -105,33 +105,33 @@ animEl: 'elId', icon: Ext.MessageBox.INFO, buttons: Ext.MessageBox.OK - }); + }); } } - + function ajaxPostRequest(url, callback_function, id){ var d = new Date(); var time = d.getTime(); url= url + '&nocachetime='+time; - var return_xml=false; + var return_xml=false; var http_request = false; - + if (window.XMLHttpRequest){ // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType){ - http_request.overrideMimeType('text/xml'); + http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject){// IE try{ http_request = new ActiveXObject("Msxml2.XMLHTTP"); - } + } catch (e){ try{ http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ - + } } } @@ -139,17 +139,17 @@ alert('This browser is not supported.'); return false; } - + http_request.onreadystatechange = function(){ if (http_request.readyState == 4){ if (http_request.status == 200){ if (return_xml){ eval(callback_function + '(http_request.responseXML)'); } - else{ - eval(callback_function + '(http_request.responseText, \''+id+'\')'); + else{ + eval(callback_function + '(http_request.responseText, \''+id+'\')'); } - } + } else{ alert('Error found on request:(Code: ' + http_request.status + ')'); } @@ -157,8 +157,8 @@ } http_request.open('GET', url, true); http_request.send(null); - } - + } + var processesGrid; var store; var ActionTabFrameGlobal = ''; @@ -170,7 +170,7 @@ var ActionTabFrameGlobal = ''; table.style.display = ''; } } - + new Ext.KeyMap( document, { @@ -193,31 +193,31 @@ var ActionTabFrameGlobal = ''; Ext.onReady(function(){ Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); Ext.QuickTips.init(); - + messageHistoryGridList(); - - }); - - //!historyGridList| + + }); + + //!historyGridList| //!!historyGridList|changeLog function historyGridListChangeLogPanelBody_RSP(resp,id){ - var historyGridListChangeLogPanel_id_ = Ext.getCmp('historyGridListChangeLogPanel_id'); - historyGridListChangeLogPanel_id_.show(); + var historyGridListChangeLogPanel_id_ = Ext.getCmp('historyGridListChangeLogPanel_id'); + historyGridListChangeLogPanel_id_.show(); var historyGridListChangeLogPanelBody_= document.getElementById('historyGridListChangeLogPanelBody_JXP'); - historyGridListChangeLogPanelBody_.innerHTML= resp; + historyGridListChangeLogPanelBody_.innerHTML= resp; } - + function historyGridListChangeLogPanelBody_JXP(){ //!historyGridListChangeLogGlobal historyGridListChangeLogGlobal.idHistory = historyGridListChangeLogGlobal.idHistory; - + //dataSystem var idHistory = historyGridListChangeLogGlobal.idHistory; - + var url = "caseHistory_Ajax.php?actionAjax=historyGridListChangeLogPanelBody_JXP&idHistory="+idHistory; ajaxPostRequest(url,'historyGridListChangeLogPanelBody_RSP'); } - + function historyGridListChangeLogPanel(){ var w = new Ext.Window({ //draggable: Ext.util.Draggable, @@ -242,19 +242,19 @@ var ActionTabFrameGlobal = ''; value:'uploadFileNewProcess' } ] - }); - historyGridListChangeLogPanelBody_JXP(); - } - + }); + historyGridListChangeLogPanelBody_JXP(); + } + var historyGridListChangeLogGlobal = {}; historyGridListChangeLogGlobal.idHistory =''; - + function historyGridListChangeLog(){ - - historyGridListChangeLogGlobal.idHistory = historyGridListChangeLogGlobal.idHistory; + + historyGridListChangeLogGlobal.idHistory = historyGridListChangeLogGlobal.idHistory; var rowSelected = processesGrid.getSelectionModel().getSelected(); - if( rowSelected ){ - var idHistory = rowSelected.data.ID_HISTORY; + if( rowSelected ){ + var idHistory = rowSelected.data.ID_HISTORY; historyGridListChangeLogGlobal.idHistory = idHistory; historyGridListChangeLogPanel(); } @@ -269,15 +269,14 @@ var ActionTabFrameGlobal = ''; buttons: Ext.MessageBox.OK }); } - + } //!!historyGridList|changeLog - + function caseMessageHistory_RSP(response,id){ + messageHistoryGridListMask.hide(); if(response==""){ - - messageHistoryGridListMask.hide(); - + Ext.Msg.show({ title:'', msg: _('ID_MAIL_SENT_SUCCESSFULLY'), @@ -287,23 +286,23 @@ var ActionTabFrameGlobal = ''; icon: Ext.MessageBox.INFO, buttons: Ext.MessageBox.OK }); - - - - - - + + + + + + Ext.destroy(Ext.getCmp('processesGrid')); - - messageHistoryGridList(); + + messageHistoryGridList(); } - else{ + else{ alert(response); } } - + function messageHistoryGridList(){ store = new Ext.data.GroupingStore({ proxy : new Ext.data.HttpProxy @@ -311,8 +310,8 @@ var ActionTabFrameGlobal = ''; { url: 'caseMessageHistory_Ajax.php?actionAjax=messageHistoryGridList_JXP' } - ), - + ), + reader : new Ext.data.JsonReader ( { @@ -327,26 +326,26 @@ var ActionTabFrameGlobal = ''; {name : 'APP_MSG_FROM'}, {name : 'APP_MSG_TO'}, {name : 'APP_MSG_STATUS'}, - {name : 'APP_MSG_BODY'} - + {name : 'APP_MSG_BODY'} + ] } - ) + ) }); - + var expander = new Ext.ux.grid.RowExpander({ tpl : new Ext.Template( '
'+TRANSLATIONS.ID_PRO_DESCRIPTION+': {PRO_DESCRIPTION}