BUG 8743 Migrate Case Informations lists to ExtJS SOLVED
- Migrate Case "Information" lists to ExtJS (from master branch) - migrated the following items: Case history, Messages History, Dynaforms, Uploaded Documents, Generated Documents
This commit is contained in:
@@ -4898,6 +4898,57 @@ class Cases {
|
||||
return $oCriteria;
|
||||
}
|
||||
|
||||
/*
|
||||
* funcion History messages for case tracker ExtJS
|
||||
* @name getHistoryMessagesTrackerExt
|
||||
* @param string sApplicationUID
|
||||
* @param string Msg_UID
|
||||
* @return array
|
||||
*/
|
||||
|
||||
function getHistoryMessagesTrackerExt($sApplicationUID) {
|
||||
|
||||
G::LoadClass('ArrayPeer');
|
||||
global $_DBArray;
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(AppMessagePeer::APP_UID, $sApplicationUID);
|
||||
$oCriteria->addAscendingOrderByColumn(AppMessagePeer::APP_MSG_DATE);
|
||||
$oDataset = AppMessagePeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
$aMessages = array();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aMessages[] = array('APP_MSG_UID' => $aRow['APP_MSG_UID'],
|
||||
'APP_UID' => $aRow['APP_UID'],
|
||||
'DEL_INDEX' => $aRow['DEL_INDEX'],
|
||||
'APP_MSG_TYPE' => $aRow['APP_MSG_TYPE'],
|
||||
'APP_MSG_SUBJECT' => $aRow['APP_MSG_SUBJECT'],
|
||||
'APP_MSG_FROM' => $aRow['APP_MSG_FROM'],
|
||||
'APP_MSG_TO' => $aRow['APP_MSG_TO'],
|
||||
'APP_MSG_BODY' => $aRow['APP_MSG_BODY'],
|
||||
'APP_MSG_DATE' => $aRow['APP_MSG_DATE'],
|
||||
'APP_MSG_CC' => $aRow['APP_MSG_CC'],
|
||||
'APP_MSG_BCC' => $aRow['APP_MSG_BCC'],
|
||||
'APP_MSG_TEMPLATE' => $aRow['APP_MSG_TEMPLATE'],
|
||||
'APP_MSG_STATUS' => $aRow['APP_MSG_STATUS'],
|
||||
'APP_MSG_ATTACH' => $aRow['APP_MSG_ATTACH']
|
||||
);
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
$_DBArray['messages'] = $aMessages;
|
||||
$_SESSION['_DBArray'] = $_DBArray;
|
||||
|
||||
$oCriteria = new Criteria('dbarray');
|
||||
$oCriteria->setDBArrayTable('messages');
|
||||
|
||||
return $aMessages;
|
||||
}
|
||||
|
||||
/*
|
||||
* funcion History messages for case tracker
|
||||
* by Everth The Answer
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
183
workflow/engine/methods/cases/caseHistory_Ajax.php
Normal file
183
workflow/engine/methods/cases/caseHistory_Ajax.php
Normal file
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
/**
|
||||
* processes_List.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
|
||||
|
||||
|
||||
if($actionAjax=='historyGridList_JXP'){
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$c = Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']);
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
|
||||
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
for($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
$result["ID_HISTORY"] = $result["PRO_UID"].'_'.$result["APP_UID"].'_'.$result["TAS_UID"];
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = 2;
|
||||
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
|
||||
if($actionAjax=='historyGridListChangeLogPanelBody_JXP'){
|
||||
//!dataInput
|
||||
$idHistory = $_REQUEST["idHistory"];
|
||||
//!dataInput
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode("*",$idHistory );
|
||||
$_REQUEST["PRO_UID"]= $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"]= $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"]= $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"]= "";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<table bgcolor="white" height=100% width=100%>
|
||||
<tr>
|
||||
<td height=99% >
|
||||
<div style="width:100%; overflow-y: scroll; overflow-x: hidden; max-height: 310px;_height:310px;height:310px; visibility: inherit;" >
|
||||
|
||||
<?php
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
G::RenderPage('publish', 'raw');
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=30 valign=top>
|
||||
|
||||
<table align=center cellspacing="0" class="x-btn x-btn-noicon" id="ext-comp-1043" style="width: 75px;margin-top:0px;">
|
||||
<tbody class="x-btn-small x-btn-icon-small-left">
|
||||
<tr>
|
||||
<td class="x-btn-tl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-tc">
|
||||
</td>
|
||||
<td class="x-btn-tr">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-ml">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-mc">
|
||||
<em unselectable="on" class="">
|
||||
<button type="button" id="ext-gen105" class=" x-btn-text">
|
||||
OK
|
||||
</button>
|
||||
</em>
|
||||
</td>
|
||||
<td class="x-btn-mr">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-bl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-bc">
|
||||
</td>
|
||||
<td class="x-btn-br">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($actionAjax=="showDynaformHistoryGetNomDynaform_JXP"){
|
||||
require_once 'classes/model/ContentPeer.php';
|
||||
|
||||
//!dataInput
|
||||
$idDin = $_REQUEST['idDin'];
|
||||
$dynDate = $_REQUEST["dynDate"];
|
||||
|
||||
//!dataOuput
|
||||
$md5Hash = "";
|
||||
$dynTitle = '';
|
||||
|
||||
$c = new Criteria();
|
||||
$c0 = $c->getNewCriterion(ContentPeer::CON_ID,$idDin);
|
||||
$c1 = $c->getNewCriterion(ContentPeer::CON_CATEGORY,'DYN_TITLE');
|
||||
$c0->addAnd($c1);
|
||||
$c->add($c0);
|
||||
$contentObjeto = ContentPeer::doSelectOne($c);
|
||||
|
||||
|
||||
if(is_object($contentObjeto)){
|
||||
$dynTitle = $contentObjeto->getConValue();
|
||||
}
|
||||
|
||||
$md5Hash = md5($idDin.$dynDate);
|
||||
|
||||
|
||||
//assign task
|
||||
$result = new stdClass;
|
||||
$result->dynTitle = $dynTitle;
|
||||
$result->md5Hash = $md5Hash;
|
||||
|
||||
echo G::json_encode($result);
|
||||
|
||||
}
|
||||
|
||||
199
workflow/engine/methods/cases/caseMessageHistory_Ajax.php
Normal file
199
workflow/engine/methods/cases/caseMessageHistory_Ajax.php
Normal file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/**
|
||||
* processes_List.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
|
||||
|
||||
|
||||
if($actionAjax=='messageHistoryGridList_JXP'){
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt($_SESSION['APPLICATION']);
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
|
||||
$totalCount = 0;
|
||||
foreach( $appMessageArray as $index => $value){
|
||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'].'_'.$appMessageArray[$index]['APP_MSG_UID'];
|
||||
$aProcesses[] = $appMessageArray[$index];
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
|
||||
|
||||
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
if($actionAjax=='showHistoryMessage'){
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST["APP_MSG_UID"];
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
if($actionAjax=='sendMailMessage_JXP'){
|
||||
//!dataSystem
|
||||
$errorMessage = "";
|
||||
try{
|
||||
//!dataInput
|
||||
$_POST['APP_UID'] = $_REQUEST['APP_UID'];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST['APP_MSG_UID'];
|
||||
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
|
||||
|
||||
require_once 'classes/model/Configuration.php';
|
||||
G::LoadClass('spool');
|
||||
|
||||
$oCase = new Cases();
|
||||
$data = $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']);
|
||||
//print_r($data);
|
||||
|
||||
$oConfiguration = new Configuration();
|
||||
$sDelimiter = DBAdapter::getStringDelimiter();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ConfigurationPeer::CFG_UID, 'Emails');
|
||||
$oCriteria->add(ConfigurationPeer::OBJ_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::PRO_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::USR_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::APP_UID, '');
|
||||
if(ConfigurationPeer::doCount($oCriteria) == 0) {
|
||||
$oConfiguration->create(array('CFG_UID'=>'Emails', 'OBJ_UID'=>'', 'CFG_VALUE'=>'', 'PRO_UID'=>'', 'USR_UID'=>'', 'APP_UID'=>''));
|
||||
$aConfiguration = array();
|
||||
} else {
|
||||
$aConfiguration = $oConfiguration->load('Emails', '', '', '', '');
|
||||
if($aConfiguration['CFG_VALUE'] != '') {
|
||||
$aConfiguration = unserialize($aConfiguration['CFG_VALUE']);
|
||||
} else {
|
||||
$aConfiguration = array();
|
||||
}
|
||||
}
|
||||
$passwd = $aConfiguration['MESS_PASSWORD'];
|
||||
$passwdDec = G::decrypt($passwd,'EMAILENCRYPT');
|
||||
if (strpos( $passwdDec, 'hash:' ) !== false) {
|
||||
list($hash, $pass) = explode(":", $passwdDec);
|
||||
$passwd = $pass;
|
||||
}
|
||||
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
$oSpool->setConfig(array(
|
||||
'MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],
|
||||
'MESS_SERVER' => $aConfiguration['MESS_SERVER'],
|
||||
'MESS_PORT' => $aConfiguration['MESS_PORT'],
|
||||
'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],
|
||||
'MESS_PASSWORD' => $passwd,
|
||||
'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
||||
));
|
||||
|
||||
$oSpool->create(array(
|
||||
'msg_uid' => $data['MSG_UID'],
|
||||
'app_uid' => $data['APP_UID'],
|
||||
'del_index' => $data['DEL_INDEX'],
|
||||
'app_msg_type' => $data['APP_MSG_TYPE'],
|
||||
'app_msg_subject'=> $data['APP_MSG_SUBJECT'],
|
||||
'app_msg_from' => $data['APP_MSG_FROM'],
|
||||
'app_msg_to' => $data['APP_MSG_TO'],
|
||||
'app_msg_body' => $data['APP_MSG_BODY'],
|
||||
'app_msg_cc' => $data['APP_MSG_CC'],
|
||||
'app_msg_bcc' => $data['APP_MSG_BCC'],
|
||||
'app_msg_attach'=> $data['APP_MSG_ATTACH'],
|
||||
'app_msg_template'=>$data['APP_MSG_TEMPLATE'],
|
||||
'app_msg_status'=> 'pending'
|
||||
));
|
||||
$oSpool->sendMail();
|
||||
|
||||
}
|
||||
catch(Exception $e){
|
||||
|
||||
$errorMessage = $e->getMessage();
|
||||
}
|
||||
|
||||
echo $errorMessage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
149
workflow/engine/methods/cases/casesGenerateDocumentPage_Ajax.php
Normal file
149
workflow/engine/methods/cases/casesGenerateDocumentPage_Ajax.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* casesGenerateDocumentPage_Ajax.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
|
||||
function casesShowOuputDocumentExist($url){
|
||||
|
||||
$urlArray = explode("?",$url);
|
||||
$urlParametroString = $urlArray[1];
|
||||
|
||||
parse_str($urlParametroString, $_GET);
|
||||
|
||||
|
||||
require_once ( "classes/model/AppDocumentPeer.php" );
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load($_GET['a'],(isset($_GET['v']) )? $_GET['v'] : NULL );
|
||||
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||
if (!isset($_GET['ext'])) {
|
||||
$ext = $info['extension'];
|
||||
}
|
||||
else {
|
||||
if ($_GET['ext'] != '') {
|
||||
$ext = $_GET['ext'];
|
||||
}
|
||||
else {
|
||||
$ext = $info['extension'];
|
||||
}
|
||||
}
|
||||
$ver= (isset($_GET['v']) && $_GET['v']!='') ? '_'.$_GET['v'] : '';
|
||||
|
||||
if(!$ver) //This code is in the case the outputdocument won't be versioned
|
||||
$ver='_1';
|
||||
|
||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $sAppDocUid .$ver. '.' . $ext ;
|
||||
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] .$ver. '.' . $ext ;
|
||||
$realPath2 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename']. '.' . $ext ;
|
||||
$sw_file_exists=false;
|
||||
if(file_exists($realPath)){
|
||||
$sw_file_exists=true;
|
||||
}elseif(file_exists($realPath1)){
|
||||
$sw_file_exists=true;
|
||||
$realPath=$realPath1;
|
||||
}elseif(file_exists($realPath2)){
|
||||
$sw_file_exists=true;
|
||||
$realPath=$realPath2;
|
||||
}
|
||||
|
||||
$swFileExist = 0;
|
||||
if($sw_file_exists){
|
||||
$swFileExist = 1;
|
||||
}
|
||||
return $swFileExist;
|
||||
}
|
||||
|
||||
if($actionAjax=='casesGenerateDocumentPage'){
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
G::loadClass('configuration');
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesGenerateDocumentPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
if($actionAjax=='generateDocumentGrid_Ajax'){
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$aProcesses = Array();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
if ( $c->getDbName() == 'dbarray' ){
|
||||
$rs = ArrayBasePeer::doSelectRs ($c);
|
||||
}
|
||||
else{
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
}
|
||||
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
$totalCount = 0;
|
||||
for($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
|
||||
$result["FILEDOCEXIST"] = casesShowOuputDocumentExist($result["FILEDOC"]);
|
||||
$result["FILEPDFEXIST"] = casesShowOuputDocumentExist($result["FILEPDF"]);
|
||||
|
||||
$aProcesses[] = $result;
|
||||
|
||||
|
||||
$rs->next();
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
//!dateFormat
|
||||
G::LoadClass ( 'configuration' );
|
||||
$conf = new Configurations();
|
||||
try {
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '' );
|
||||
}
|
||||
catch (Exception $e){
|
||||
$generalConfCasesList = array();
|
||||
}
|
||||
$dateFormat = "";
|
||||
if (isset($generalConfCasesList['casesListDateFormat'])&&!empty($generalConfCasesList['casesListDateFormat'])) {
|
||||
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
$r->dataFormat = $dateFormat;
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
?>
|
||||
337
workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php
Normal file
337
workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php
Normal file
File diff suppressed because one or more lines are too long
@@ -493,15 +493,117 @@ switch(($_POST['action'])?$_POST['action']:$_REQUEST['action']) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', G::array_merges($Fields, $oAppDocument->Fields), '');
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
|
||||
case 'showGeneratedDocuments':
|
||||
$oCase = new Cases();
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllOutputdocsList', $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
case 'showGeneratedDocument':
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
|
||||
case 'uploadDocumentGrid_Ajax':
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
|
||||
if ( $c->getDbName() == 'dbarray' ) {
|
||||
$rs = ArrayBasePeer::doSelectRs ($c);
|
||||
}
|
||||
else {
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
}
|
||||
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
$totalCount = 0;
|
||||
|
||||
for ($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
|
||||
echo G::json_encode($r);
|
||||
break;
|
||||
|
||||
case 'generateDocumentGrid_Ajax':
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
G::LoadClass ( 'configuration' );
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
|
||||
if ( $c->getDbName() == 'dbarray' ){
|
||||
$rs = ArrayBasePeer::doSelectRs ($c);
|
||||
}
|
||||
else {
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
}
|
||||
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
$totalCount = 0;
|
||||
|
||||
for ($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
$result["FILEDOCEXIST"] = ($result["FILEDOC"]);
|
||||
$result["FILEPDFEXIST"] = ($result["FILEPDF"]);
|
||||
$aProcesses[] = $result;
|
||||
|
||||
$rs->next();
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
//!dateFormat
|
||||
$conf = new Configurations();
|
||||
|
||||
try {
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '' );
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$generalConfCasesList = array();
|
||||
}
|
||||
|
||||
$dateFormat = "";
|
||||
|
||||
if (isset($generalConfCasesList['casesListDateFormat'])&&!empty($generalConfCasesList['casesListDateFormat'])) {
|
||||
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
$r->dataFormat = $dateFormat;
|
||||
|
||||
echo G::json_encode($r);
|
||||
|
||||
break;
|
||||
|
||||
case 'showGeneratedDocument' :
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$aFields = $oAppDocument->load($_POST['APP_DOC_UID']);
|
||||
|
||||
11
workflow/engine/templates/cases/caseHistory.html
Normal file
11
workflow/engine/templates/cases/caseHistory.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<div id="processes-panel" width="80%" />
|
||||
|
||||
412
workflow/engine/templates/cases/caseHistory.js
Normal file
412
workflow/engine/templates/cases/caseHistory.js
Normal file
File diff suppressed because it is too large
Load Diff
11
workflow/engine/templates/cases/caseHistoryDynaformPage.html
Normal file
11
workflow/engine/templates/cases/caseHistoryDynaformPage.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<div id="processes-panel" width="80%" />
|
||||
|
||||
569
workflow/engine/templates/cases/caseHistoryDynaformPage.js
Normal file
569
workflow/engine/templates/cases/caseHistoryDynaformPage.js
Normal file
File diff suppressed because it is too large
Load Diff
11
workflow/engine/templates/cases/caseMessageHistory.html
Normal file
11
workflow/engine/templates/cases/caseMessageHistory.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<div id="processes-panel" width="80%" />
|
||||
|
||||
475
workflow/engine/templates/cases/caseMessageHistory.js
Normal file
475
workflow/engine/templates/cases/caseMessageHistory.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<div id="processes-panel" width="80%" />
|
||||
|
||||
511
workflow/engine/templates/cases/casesGenerateDocumentPage.js
Normal file
511
workflow/engine/templates/cases/casesGenerateDocumentPage.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<div id="processes-panel" width="80%" />
|
||||
|
||||
528
workflow/engine/templates/cases/casesUploadedDocumentsPage.js
Normal file
528
workflow/engine/templates/cases/casesUploadedDocumentsPage.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,20 @@ var menuSelectedTitle = Array();
|
||||
var _ENV_CURRENT_DATE;
|
||||
var winTree;
|
||||
|
||||
historyGridListChangeLogGlobal = {};
|
||||
historyGridListChangeLogGlobal.idHistory = '';
|
||||
historyGridListChangeLogGlobal.tasTitle = '';
|
||||
|
||||
historyGridListChangeLogGlobal.viewIdDin = '';
|
||||
historyGridListChangeLogGlobal.viewIdHistory = '';
|
||||
historyGridListChangeLogGlobal.viewDynaformName = '';
|
||||
historyGridListChangeLogGlobal.dynDate = '';
|
||||
|
||||
ActionTabFrameGlobal = {};
|
||||
ActionTabFrameGlobal.tabName = '';
|
||||
ActionTabFrameGlobal.tabTitle = '';
|
||||
ActionTabFrameGlobal.tabData = '';
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.QuickTips.init();
|
||||
showCaseNavigatorPanel = function(app_status) {
|
||||
@@ -217,7 +231,7 @@ Ext.onReady(function(){
|
||||
title: _('ID_CASE') +' ' + _APP_NUM,
|
||||
frameConfig:{name:'openCaseFrame', id:'openCaseFrame'},
|
||||
defaultSrc : uri,
|
||||
loadMask:{msg:'Loading...'},
|
||||
loadMask:{msg:_('ID_LOADING_GRID')+'...'},
|
||||
bodyStyle:{height: (PMExt.getBrowser().screen.height-60) + 'px', overflow:'auto'},
|
||||
width:screenWidth
|
||||
|
||||
@@ -756,12 +770,126 @@ Ext.onReady(function(){
|
||||
|
||||
//
|
||||
Actions.tabFrame = function(name)
|
||||
{
|
||||
{
|
||||
tabId = name + 'MenuOption';
|
||||
var uri = 'ajaxListener?action=' + name;
|
||||
var TabPanel = Ext.getCmp('caseTabPanel');
|
||||
var tab = TabPanel.getItem(tabId);
|
||||
//!dataInput
|
||||
var tabName = ActionTabFrameGlobal.tabName;
|
||||
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
||||
|
||||
//!dataSystem
|
||||
var loadMaskMsg = _('ID_LOADING_GRID');
|
||||
|
||||
if (name == "dynaformViewFromHistory") {
|
||||
var responseObject = Ext.util.JSON.decode(historyGridListChangeLogGlobal.viewDynaformName);
|
||||
var dynTitle = responseObject.dynTitle;
|
||||
var md5Hash = responseObject.md5Hash;
|
||||
name = "dynaformViewFromHistory"+md5Hash;
|
||||
}
|
||||
|
||||
var caseHistoryIframeRest = name!="caseHistory"?0:-20;
|
||||
tabId = name + 'MenuOption';
|
||||
var uri = 'ajaxListener?action=' + name;
|
||||
|
||||
if (name.indexOf("changeLogTab") != -1) {
|
||||
var uri = 'ajaxListener?action=' + 'changeLogTab';
|
||||
//!historyGridListChangeLogGlobal
|
||||
historyGridListChangeLogGlobal.idHistory = historyGridListChangeLogGlobal.idHistory;
|
||||
historyGridListChangeLogGlobal.tasTitle = historyGridListChangeLogGlobal.tasTitle;
|
||||
//dataSystem
|
||||
idHistory = historyGridListChangeLogGlobal.idHistory;
|
||||
var tasTitle = historyGridListChangeLogGlobal.tasTitle;
|
||||
menuSelectedTitle[name] = tasTitle;
|
||||
Actions[name];
|
||||
uri += "&idHistory="+idHistory;
|
||||
}
|
||||
|
||||
if (name.indexOf("dynaformViewFromHistory") != -1) {
|
||||
var uri = 'ajaxListener?action=' + 'dynaformViewFromHistory';
|
||||
uri += '&DYN_UID='+historyGridListChangeLogGlobal.viewIdDin+'&HISTORY_ID='+historyGridListChangeLogGlobal.viewIdHistory;
|
||||
menuSelectedTitle[name] = 'View('+dynTitle+' '+historyGridListChangeLogGlobal.dynDate+')';
|
||||
}
|
||||
|
||||
if (name.indexOf("previewMessage") != -1) {
|
||||
var uri = 'caseMessageHistory_Ajax?actionAjax=' + 'showHistoryMessage';
|
||||
var tabNameArray = tabName.split('_');
|
||||
var APP_UID = tabNameArray[1];
|
||||
var APP_MSG_UID = tabNameArray[2];
|
||||
uri += '&APP_UID='+APP_UID+'&APP_MSG_UID='+APP_MSG_UID;
|
||||
menuSelectedTitle[tabName] = tabTitle;
|
||||
}
|
||||
|
||||
if (name.indexOf("previewMessage") != -1) {
|
||||
var uri = 'caseMessageHistory_Ajax?actionAjax=' + 'showHistoryMessage';
|
||||
var tabNameArray = tabName.split('_');
|
||||
var APP_UID = tabNameArray[1];
|
||||
var APP_MSG_UID = tabNameArray[2];
|
||||
uri += '&APP_UID='+APP_UID+'&APP_MSG_UID='+APP_MSG_UID;
|
||||
menuSelectedTitle[tabName] = tabTitle;
|
||||
}
|
||||
|
||||
if (name.indexOf("sendMailMessage") != -1) {
|
||||
var uri = 'caseMessageHistory_Ajax?actionAjax=' + 'sendMailMessage_JXP';
|
||||
var tabNameArray = tabName.split('_');
|
||||
var APP_UID = tabNameArray[1];
|
||||
var APP_MSG_UID = tabNameArray[2];
|
||||
uri += '&APP_UID='+APP_UID+'&APP_MSG_UID='+APP_MSG_UID;
|
||||
menuSelectedTitle[tabName] = tabTitle;
|
||||
}
|
||||
|
||||
if (name=="dynaformHistory") {
|
||||
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=historyDynaformPage';
|
||||
}
|
||||
|
||||
if (name.indexOf("historyDynaformGridHistory") != -1) {
|
||||
var historyDynaformGridHistoryGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
||||
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
||||
var PRO_UID = historyDynaformGridHistoryGlobal.PRO_UID;
|
||||
var APP_UID = historyDynaformGridHistoryGlobal.APP_UID;
|
||||
var TAS_UID = historyDynaformGridHistoryGlobal.TAS_UID;
|
||||
var DYN_UID = historyDynaformGridHistoryGlobal.DYN_UID;
|
||||
var DYN_TITLE = historyDynaformGridHistoryGlobal.DYN_TITLE;
|
||||
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=showDynaformListHistory';
|
||||
uri += '&PRO_UID='+PRO_UID+'&APP_UID='+APP_UID+'&TAS_UID='+TAS_UID+'&DYN_UID='+DYN_UID;
|
||||
menuSelectedTitle[name] = tabTitle;
|
||||
}
|
||||
|
||||
if (name.indexOf("dynaformChangeLogViewHistory") != -1) {
|
||||
var showDynaformHistoryGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
||||
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
||||
var dynUID = showDynaformHistoryGlobal.dynUID;
|
||||
var tablename = showDynaformHistoryGlobal.tablename;
|
||||
var dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
var dynTitle = showDynaformHistoryGlobal.dynTitle;
|
||||
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=dynaformChangeLogViewHistory';
|
||||
uri += '&DYN_UID='+dynUID+'&HISTORY_ID='+tablename;
|
||||
menuSelectedTitle[name] = tabTitle;
|
||||
}
|
||||
|
||||
if (name.indexOf("historyDynaformGridPreview") != -1) {
|
||||
var historyDynaformGridPreviewGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
||||
var tabTitle = ActionTabFrameGlobal.tabTitle;
|
||||
var DYN_UID = historyDynaformGridPreviewGlobal.DYN_UID;
|
||||
var uri = 'casesHistoryDynaformPage_Ajax?actionAjax=historyDynaformGridPreview';
|
||||
uri += '&DYN_UID='+DYN_UID;
|
||||
menuSelectedTitle[name] = tabTitle;
|
||||
}
|
||||
|
||||
if (name == "uploadDocumentGridDownload") {
|
||||
var uploadDocumentGridDownloadGlobal = Ext.util.JSON.decode(ActionTabFrameGlobal.tabData);
|
||||
var APP_DOC_UID = uploadDocumentGridDownloadGlobal.APP_DOC_UID;
|
||||
var DOWNLOAD_LINK = uploadDocumentGridDownloadGlobal.DOWNLOAD_LINK;
|
||||
var TITLE = uploadDocumentGridDownloadGlobal.TITLE;
|
||||
var uri = DOWNLOAD_LINK;
|
||||
menuSelectedTitle[name] = ActionTabFrameGlobal.tabTitle;
|
||||
}
|
||||
|
||||
if (name == "generatedDocuments") {
|
||||
var uri = 'casesGenerateDocumentPage_Ajax.php?actionAjax=casesGenerateDocumentPage';
|
||||
}
|
||||
|
||||
if( tab ) {
|
||||
TabPanel.setActiveTab(tabId);
|
||||
}
|
||||
@@ -771,7 +899,7 @@ Ext.onReady(function(){
|
||||
title: menuSelectedTitle[name],
|
||||
frameConfig:{name: name + 'Frame', id: name + 'Frame'},
|
||||
defaultSrc : uri,
|
||||
loadMask:{msg:'Loading...'},
|
||||
loadMask:{msg:_('ID_LOADING_GRID')+'...'},
|
||||
autoWidth: true,
|
||||
closable:true,
|
||||
autoScroll: true,
|
||||
|
||||
BIN
workflow/public_html/images/documents/_downGreen.png
Normal file
BIN
workflow/public_html/images/documents/_downGreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 799 B |
BIN
workflow/public_html/images/extensionDoc.png
Normal file
BIN
workflow/public_html/images/extensionDoc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 625 B |
BIN
workflow/public_html/images/extensionPdf.png
Normal file
BIN
workflow/public_html/images/extensionPdf.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 656 B |
BIN
workflow/public_html/images/mail-send16x16.png
Normal file
BIN
workflow/public_html/images/mail-send16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 742 B |
Reference in New Issue
Block a user