From 1a077fd8d7cf95c5dc67999b3b1f03a18d823f56 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Fri, 6 Jul 2012 12:41:27 -0400 Subject: [PATCH 1/4] BUG 9406 Se debe agregar en la parte superior de library una opcion... SOLVED - Can not leaving the option library. - was added a menu which can return a Designer --- .../engine/xmlform/processes/processes_ListPublic.xml | 4 ++-- .../xmlform/processes/processes_ListPublicMenu.xml | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 workflow/engine/xmlform/processes/processes_ListPublicMenu.xml diff --git a/workflow/engine/xmlform/processes/processes_ListPublic.xml b/workflow/engine/xmlform/processes/processes_ListPublic.xml index 256cc4583..7aff0161d 100755 --- a/workflow/engine/xmlform/processes/processes_ListPublic.xml +++ b/workflow/engine/xmlform/processes/processes_ListPublic.xml @@ -1,5 +1,5 @@ - + <en>Title</en> @@ -40,4 +40,4 @@ <en/> </LINK> -</dynaForm> \ No newline at end of file +</dynaForm> diff --git a/workflow/engine/xmlform/processes/processes_ListPublicMenu.xml b/workflow/engine/xmlform/processes/processes_ListPublicMenu.xml new file mode 100644 index 000000000..04527d56b --- /dev/null +++ b/workflow/engine/xmlform/processes/processes_ListPublicMenu.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<dynaForm type="xmlmenu"> + +<SelectAll type="link" link="../processes/mainInit" colAlign="left" colWidth="100"> + <en>Back</en> +</SelectAll> +<PAGE type="hidden" value="1"/> +<PAGED_TABLE_ID type="private"/> + +</dynaForm> From 6bd65e052ad4c330ff5804381965158b8571f7f4 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina <marcoantonionina@colosa.com> Date: Fri, 6 Jul 2012 15:02:37 -0400 Subject: [PATCH 2/4] BUG 9304 Notice al derivar un caso que esta configurado con... SOLVED - In the single application out notice. - were validated the data to to avoid these notice. --- workflow/engine/controllers/home.php | 67 +++++++++++++++------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/workflow/engine/controllers/home.php b/workflow/engine/controllers/home.php index bd04ed24c..3e9f932f2 100755 --- a/workflow/engine/controllers/home.php +++ b/workflow/engine/controllers/home.php @@ -222,46 +222,49 @@ class Home extends Controller $this->render(); } - public function getAppsData($type, $start=null, $limit=null) - { - require_once ( "classes/model/AppNotes.php" ); - G::LoadClass('applications'); + public function getAppsData($type, $start=null, $limit=null) + { + require_once ( "classes/model/AppNotes.php" ); + G::LoadClass('applications'); - $apps = new Applications(); - $appNotes = new AppNotes(); + $apps = new Applications(); + $appNotes = new AppNotes(); - $start = empty($start) ? $this->appListStart : $start; - $limit = empty($limit) ? $this->appListLimit : $limit; + $start = empty($start) ? $this->appListStart : $start; + $limit = empty($limit) ? $this->appListLimit : $limit; - $notesStart = 0; - $notesLimit = 4; + $notesStart = 0; + $notesLimit = 4; - $cases = $apps->getAll($this->userID, $start, $limit, $type); - //g::pr($cases['data']); die; + $cases = $apps->getAll($this->userID, $start, $limit, $type); + //g::pr($cases['data']); die; - // formating & complitting apps data with 'Notes' - foreach ($cases['data'] as $i => $row) { - // Formatting - $appTitle = str_replace('#', '', $row['APP_TITLE']); + // formating & complitting apps data with 'Notes' + foreach ($cases['data'] as $i => $row) { + // Formatting + $appTitle = str_replace('#', '', $row['APP_TITLE']); - if (is_numeric($appTitle)) { - $cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE'). ' ' . $appTitle; - } + if (is_numeric($appTitle)) { + $cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE'). ' ' . $appTitle; + } - $cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], 'M d, yyyy - h:i:s'); - $cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']); - - // Completting with Notes - $notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit); - $notes = $notes['array']; - - $cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount']; - $cases['data'][$i]['NOTES_LIST'] = $notes['notes']; + if (isset($row['DEL_DELEGATE_DATE'])) { + $cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], + 'M d, yyyy - h:i:s'); + } + if (isset($row['APP_DEL_PREVIOUS_USER'])) { + $cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']); + } + // Completting with Notes + $notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit); + $notes = $notes['array']; + + $cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount']; + $cases['data'][$i]['NOTES_LIST'] = $notes['notes']; + } + return $cases; } - return $cases; - } - public function startCase($httpData) { G::LoadClass('case'); @@ -296,4 +299,4 @@ class Home extends Controller $this->setView($tpl); $this->render(); } -} \ No newline at end of file +} From 5df21ae1e552380fb2a6d23132b958c6211df84d Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura <juliocesar@colosa.com> Date: Fri, 6 Jul 2012 16:33:07 -0400 Subject: [PATCH 3/4] BUG 0000 Add validation in case history with value null - The function "startDateRender" don't validate null values --- .../engine/templates/cases/caseHistory.js | 172 +++++++++--------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/workflow/engine/templates/cases/caseHistory.js b/workflow/engine/templates/cases/caseHistory.js index 7e3bab5f6..2ffd95920 100644 --- a/workflow/engine/templates/cases/caseHistory.js +++ b/workflow/engine/templates/cases/caseHistory.js @@ -1,35 +1,35 @@ /* * @author: Douglas Medrano - * May 03, 2011 + * May 03, 2011 */ - function onResizeIframe(idIframe){ - window.parent.tabIframeWidthFix2(idIframe); - } - + function onResizeIframe(idIframe){ + window.parent.tabIframeWidthFix2(idIframe); + } + 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){ - + } } } @@ -37,17 +37,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 + ')'); } @@ -55,8 +55,8 @@ } http_request.open('GET', url, true); http_request.send(null); - } - + } + var processesGrid; var store; @@ -68,7 +68,7 @@ table.style.display = ''; } } - + new Ext.KeyMap( document, { @@ -91,31 +91,31 @@ Ext.onReady(function(){ Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); Ext.QuickTips.init(); - + historyGridList(); - - }); - - //!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, @@ -136,23 +136,23 @@ }, { name:'ajaxAction', - xtype:'hidden', + xtype:'hidden', 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(); } @@ -167,10 +167,10 @@ buttons: Ext.MessageBox.OK }); } - + } //!!historyGridList|changeLog - + function historyGridList(){ store = new Ext.data.GroupingStore({ proxy : new Ext.data.HttpProxy @@ -178,8 +178,8 @@ { url: 'caseHistory_Ajax.php?actionAjax=historyGridList_JXP' } - ), - + ), + reader : new Ext.data.JsonReader ( { @@ -203,24 +203,24 @@ {name : 'APP_DISABLE_ACTION_DATE', type:'float'} ] } - ) + ) }); - + var expander = new Ext.ux.grid.RowExpander({ tpl : new Ext.Template( '<p><b>'+TRANSLATIONS.ID_PRO_DESCRIPTION+':</b> {PRO_DESCRIPTION}</p><br>' ) - }); - - + }); + + startDateRender = function(v){ var dateString = "-"; - if(v!="-"){ - dateString = _DF(v,"m/d/Y H:i:s"); + if(v != "-" && v != null){ + dateString = _DF(v,"m/d/Y H:i:s"); } - return dateString; + return dateString; } - + actionRenderingTranslation = function(v){ var actionTranslate = ""; if(v=="PAUSE"){ @@ -237,11 +237,11 @@ } else if(v==""||v==null){ actionTranslate = _("ID_DERIVATED"); - } + } return actionTranslate; }; - - + + processesGrid = new Ext.grid.GridPanel({ region: 'center', layout: 'fit', @@ -257,15 +257,15 @@ frame:false, //plugins: expander, cls : 'grid_with_checkbox', - columnLines: true, + columnLines: true, viewConfig: { forceFit:true - }, + }, cm: new Ext.grid.ColumnModel({ defaults: { width: 200, sortable: true - }, + }, columns: [ //expander, {id:'ID_HISTORY', dataIndex: 'ID_HISTORY', hidden:true, hideable:false}, @@ -277,7 +277,7 @@ return String.format("<font color='{0}'>{1}</font>", color, v); }},*/ {header: _("ID_TASK_TRANSFER"), dataIndex: 'DEL_DELEGATE_DATE', width: 60, renderer:startDateRender}, - {header: _("ID_START_DATE"), dataIndex: 'DEL_INIT_DATE', width: 60, renderer: startDateRender}, + {header: _("ID_START_DATE"), dataIndex: 'DEL_INIT_DATE', width: 60, renderer: startDateRender}, {header: _("ID_END_DATE"), dataIndex: 'DEL_FINISH_DATE', width: 60, renderer:startDateRender}, {header: _("ID_ACTION"), dataIndex: 'APP_TYPE', width: 50, renderer: actionRenderingTranslation}, {header: _("ID_ENABLE_ACTION"), dataIndex: 'APP_ENABLE_ACTION_DATE', width: 70, renderer:startDateRender}, @@ -295,11 +295,11 @@ icon: '/images/ext/gray/shapes/hourglass.png', handler: function(){ var rowSelected = processesGrid.getSelectionModel().getSelected(); - - if( rowSelected ){ + + if( rowSelected ){ window.parent.historyGridListChangeLogGlobal.idHistory = rowSelected.data.ID_HISTORY; window.parent.historyGridListChangeLogGlobal.tasTitle = rowSelected.data.TAS_TITLE; - + var idHistory = window.parent.historyGridListChangeLogGlobal.idHistory; window.parent.Actions.tabFrame('changeLogTab'+idHistory); } @@ -312,10 +312,10 @@ animEl: 'elId', icon: Ext.MessageBox.INFO, buttons: Ext.MessageBox.OK - }); + }); } - - + + }, disabled:false }, @@ -335,16 +335,16 @@ rowdblclick: emptyReturn, render: function(){ this.loadMask = new Ext.LoadMask(this.body, {msg:'Loading...'}); - processesGrid.getSelectionModel().on('rowselect', function(){ + processesGrid.getSelectionModel().on('rowselect', function(){ var rowSelected = processesGrid.getSelectionModel().getSelected(); - + }); } } }); - + processesGrid.store.load({params: {"function":"languagesList"}}); - + processesGrid.store.on( 'load', function() @@ -356,16 +356,16 @@ single: true } ); - + processesGrid.addListener('rowcontextmenu', emptyReturn,this); processesGrid.on('rowcontextmenu', function (grid, rowIndex, evt) { var sm = grid.getSelectionModel(); sm.selectRow(rowIndex, sm.isSelected(rowIndex)); - + var rowSelected = Ext.getCmp('processesGrid').getSelectionModel().getSelected(); var activator = Ext.getCmp('activator2'); var debug = Ext.getCmp('debug'); - + if( rowSelected.data.PRO_STATUS == 'ACTIVE' ){ activator.setIconClass('icon-deactivate'); activator.setText(TRANSLATIONS.ID_DEACTIVATE); @@ -373,7 +373,7 @@ activator.setIconClass('icon-activate'); activator.setText(TRANSLATIONS.ID_ACTIVATE); } - + if( rowSelected.data.PRO_DEBUG == 1){ debug.setIconClass('icon-debug-disabled'); debug.setText(_('ID_DISABLE_DEBUG')); @@ -382,22 +382,22 @@ debug.setText(_('ID_ENABLE_DEBUG')); } }, this); - + processesGrid.on('contextmenu', function (evt) { evt.preventDefault(); }, this); - - - - - + + + + + function emptyReturn(){ - return; + return; } - - - - + + + + var viewport = new Ext.Viewport({ layout: 'border', autoScroll: true, @@ -407,6 +407,6 @@ }); } //!historyGridList| - - + + From fe447ffae858903db4691b561b735d250972c9cf Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina <marcoantonionina@colosa.com> Date: Fri, 6 Jul 2012 16:41:19 -0400 Subject: [PATCH 4/4] BUG 9406 Se debe agregar en la parte superior de library una opcion... SOLVED - Can not leaving the option library. - was added a menu which can return a Designer --- .../engine/xmlform/processes/processes_ListPublicMenu.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/xmlform/processes/processes_ListPublicMenu.xml b/workflow/engine/xmlform/processes/processes_ListPublicMenu.xml index 04527d56b..6732ee752 100644 --- a/workflow/engine/xmlform/processes/processes_ListPublicMenu.xml +++ b/workflow/engine/xmlform/processes/processes_ListPublicMenu.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <dynaForm type="xmlmenu"> -<SelectAll type="link" link="../processes/mainInit" colAlign="left" colWidth="100"> +<BackList type="link" link="../processes/mainInit" colAlign="left" colWidth="100"> <en>Back</en> -</SelectAll> +</BackList> <PAGE type="hidden" value="1"/> <PAGED_TABLE_ID type="private"/>