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
|
||||
|
||||
@@ -335,66 +335,88 @@ class Ajax
|
||||
print(G::json_encode($taskData));
|
||||
}
|
||||
|
||||
function caseHistory()
|
||||
{
|
||||
function caseHistory() {
|
||||
global $G_PUBLISH;
|
||||
$c = Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']);
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_TransferHistory', $c, array());
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/caseHistory'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function messageHistory()
|
||||
{
|
||||
function messageHistory() {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_Messages', $oCase->getHistoryMessagesTracker($_SESSION['APPLICATION']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseMessageHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseMessageHistory'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function dynaformHistory()
|
||||
{
|
||||
function dynaformHistory() {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllDynaformsList', $oCase->getallDynaformsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseHistoryDynaformPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function uploadedDocuments()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllInputdocsList', $oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
function uploadedDocuments() {
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function uploadedDocumentsSummary()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllInputdocsList_Summary', $oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
function uploadedDocumentsSummary() {
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function generatedDocuments()
|
||||
{
|
||||
function generatedDocuments() {
|
||||
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', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$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');
|
||||
}
|
||||
function generatedDocumentsSummary()
|
||||
{
|
||||
|
||||
function generatedDocumentsSummary() {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllOutputdocsList_Summary', $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$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');
|
||||
}
|
||||
|
||||
function cancelCase()
|
||||
@@ -512,8 +534,7 @@ class Ajax
|
||||
print G::json_encode($result);
|
||||
}
|
||||
|
||||
function deleteCase()
|
||||
{
|
||||
function deleteCase() {
|
||||
try{
|
||||
$applicationUID = (isset($_POST['APP_UID'])) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$app = new Application();
|
||||
@@ -525,11 +546,11 @@ class Ajax
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data);
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
print G::json_encode($result);
|
||||
}
|
||||
|
||||
@@ -555,4 +576,154 @@ class Ajax
|
||||
print G::json_encode($result);
|
||||
}
|
||||
|
||||
function changeLogTab(){
|
||||
try{
|
||||
global $G_PUBLISH;
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
|
||||
//!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"]= "";
|
||||
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
?>
|
||||
<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">
|
||||
function ajaxPostRequest(url, callback_function, id){
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
url= url + '&nocachetime='+time;
|
||||
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');
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject) {// IE
|
||||
try {
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e) {
|
||||
try {
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!http_request){
|
||||
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 {
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
function toggleTable(tablename) {
|
||||
table= document.getElementById(tablename);
|
||||
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function noesFuncion(idIframe) {
|
||||
window.parent.tabIframeWidthFix2(idIframe);
|
||||
}
|
||||
|
||||
function onResizeIframe(idIframe){
|
||||
window.onresize = noesFuncion(idIframe);
|
||||
}
|
||||
|
||||
function showDynaformHistoryGetNomDynaform_RSP(response,id) {
|
||||
//!showDynaformHistoryGlobal
|
||||
showDynaformHistoryGlobal.idDin = showDynaformHistoryGlobal.idDin;
|
||||
showDynaformHistoryGlobal.idHistory = showDynaformHistoryGlobal.idHistory;
|
||||
showDynaformHistoryGlobal.dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
|
||||
//!dataSystem
|
||||
var idDin = showDynaformHistoryGlobal.idDin;
|
||||
var idHistory = showDynaformHistoryGlobal.idHistory;
|
||||
var dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
|
||||
//!windowParent
|
||||
window.parent.historyGridListChangeLogGlobal.viewIdDin = idDin;
|
||||
window.parent.historyGridListChangeLogGlobal.viewIdHistory = idHistory;
|
||||
window.parent.historyGridListChangeLogGlobal.viewDynaformName = response;
|
||||
window.parent.historyGridListChangeLogGlobal.dynDate = dynDate;
|
||||
|
||||
window.parent.Actions.tabFrame('dynaformViewFromHistory');
|
||||
}
|
||||
|
||||
showDynaformHistoryGlobal = {};
|
||||
showDynaformHistoryGlobal.idDin = "";
|
||||
showDynaformHistoryGlobal.idHistory = "";
|
||||
showDynaformHistoryGlobal.dynDate = "";
|
||||
|
||||
function showDynaformHistory(idDin, idHistory,dynDate) {
|
||||
//!showDynaformHistoryGlobal
|
||||
showDynaformHistoryGlobal.idDin = showDynaformHistoryGlobal.idDin;
|
||||
showDynaformHistoryGlobal.idHistory = showDynaformHistoryGlobal.idHistory;
|
||||
showDynaformHistoryGlobal.dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
|
||||
//!dataSystem
|
||||
showDynaformHistoryGlobal.idDin = idDin;
|
||||
showDynaformHistoryGlobal.idHistory = idHistory;
|
||||
showDynaformHistoryGlobal.dynDate = dynDate;
|
||||
|
||||
var url = "caseHistory_Ajax.php?actionAjax=showDynaformHistoryGetNomDynaform_JXP&idDin="+idDin+"&dynDate="+dynDate;
|
||||
ajaxPostRequest(url, 'showDynaformHistoryGetNomDynaform_RSP');
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_REACTIVATED_SUCCESSFULLY', SYS_LANG, "success");
|
||||
}
|
||||
catch(Exception $e){
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
@@ -0,0 +1,337 @@
|
||||
<?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=="historyDynaformPage"){
|
||||
global $G_PUBLISH;
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
G::loadClass('configuration');
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseHistoryDynaformPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
if($actionAjax=='historyDynaformGrid_Ajax'){
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$aProcesses = Array();
|
||||
$c = $oCase->getallDynaformsCriteria($_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();
|
||||
|
||||
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=='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=='showDynaformListHistory'){
|
||||
|
||||
//!dataIndex
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||
$_POST["PRO_UID"] = $_REQUEST["PRO_UID"];
|
||||
$_POST["TAS_UID"] = $_REQUEST["TAS_UID"];
|
||||
|
||||
?>
|
||||
<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">
|
||||
globalMd5Return=function(s,raw,hexcase,chrsz){raw=raw||false;hexcase=hexcase||false;chrsz=chrsz||8;function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function bit_rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|(~d)),a,b,x,s,t)}function core_md5(x,len){x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd)}return[a,b,c,d]}function str2binl(str){var bin=[];var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)}return bin}function binl2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)}return str}function binl2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF)}return str}return(raw?binl2str(core_md5(str2binl(s),s.length*chrsz)):binl2hex(core_md5(str2binl(s),s.length*chrsz)))};
|
||||
|
||||
//!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){
|
||||
}
|
||||
|
||||
function toggleTable(tablename){
|
||||
//table= document.getElementByName(tablename);
|
||||
table= document.getElementById(tablename);
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function noesFuncion(idIframe) {
|
||||
window.parent.tabIframeWidthFix2(idIframe);
|
||||
}
|
||||
|
||||
function onResizeIframe(idIframe){
|
||||
|
||||
|
||||
window.onresize = noesFuncion(idIframe);
|
||||
|
||||
}
|
||||
|
||||
var showDynaformHistoryGlobal = {};
|
||||
showDynaformHistoryGlobal.dynUID = '';
|
||||
showDynaformHistoryGlobal.tablename = '';
|
||||
showDynaformHistoryGlobal.dynDate = '';
|
||||
showDynaformHistoryGlobal.dynTitle = '';
|
||||
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
||||
showDynaformHistoryGlobal.dynUID = dynUID;
|
||||
showDynaformHistoryGlobal.tablename = tablename;
|
||||
showDynaformHistoryGlobal.dynDate = dynDate;
|
||||
showDynaformHistoryGlobal.dynTitle = dynTitle;
|
||||
|
||||
var dynUID = showDynaformHistoryGlobal.dynUID;
|
||||
var tablename = showDynaformHistoryGlobal.tablename;
|
||||
var dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
var dynTitle = showDynaformHistoryGlobal.dynTitle;
|
||||
|
||||
var idUnique = globalMd5Return(dynUID+tablename+dynDate+dynTitle);
|
||||
|
||||
var tabData = window.parent.Ext.util.JSON.encode(showDynaformHistoryGlobal);
|
||||
var tabName = 'dynaformChangeLogViewHistory'+idUnique;
|
||||
var tabTitle = 'View('+dynTitle+' '+dynDate+')';
|
||||
|
||||
window.parent.ActionTabFrameGlobal.tabData = tabData;
|
||||
window.parent.ActionTabFrameGlobal.tabName = tabName;
|
||||
window.parent.ActionTabFrameGlobal.tabTitle = tabTitle;
|
||||
|
||||
window.parent.Actions.tabFrame(tabName);
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
if($actionAjax=='dynaformChangeLogViewHistory'){
|
||||
|
||||
?>
|
||||
<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
|
||||
|
||||
$_POST['DYN_UID']= $_REQUEST['DYN_UID'];
|
||||
$_POST['HISTORY_ID']= $_REQUEST['HISTORY_ID'];
|
||||
|
||||
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$FieldsHistory=unserialize($_SESSION['HISTORY_DATA']);
|
||||
$Fields['APP_DATA'] = $FieldsHistory[$_POST['HISTORY_ID']];
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
}
|
||||
if($actionAjax== 'historyDynaformGridPreview'){
|
||||
?>
|
||||
<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
|
||||
|
||||
//!dataIndex
|
||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||
|
||||
G::LoadClass('case');
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||
$_SESSION['DYN_UID_PRINT'] = $_POST['DYN_UID'];
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
}
|
||||
@@ -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
@@ -0,0 +1,412 @@
|
||||
/*
|
||||
* @author: Douglas Medrano
|
||||
* May 03, 2011
|
||||
*/
|
||||
|
||||
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 http_request = false;
|
||||
|
||||
if (window.XMLHttpRequest){ // Mozilla, Safari,...
|
||||
http_request = new XMLHttpRequest();
|
||||
if (http_request.overrideMimeType){
|
||||
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){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!http_request){
|
||||
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{
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
var processesGrid;
|
||||
var store;
|
||||
|
||||
function toggleTable(tablename){
|
||||
table= document.getElementById(tablename);
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
new Ext.KeyMap(
|
||||
document,
|
||||
{
|
||||
key: Ext.EventObject.F5,
|
||||
fn: function(keycode, e){
|
||||
if (! e.ctrlKey){
|
||||
if (Ext.isIE)
|
||||
e.browserEvent.keyCode = 8;
|
||||
e.stopEvent();
|
||||
document.location = document.location;
|
||||
}
|
||||
else{
|
||||
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
Ext.QuickTips.init();
|
||||
|
||||
historyGridList();
|
||||
|
||||
});
|
||||
|
||||
//!historyGridList|
|
||||
//!!historyGridList|changeLog
|
||||
function historyGridListChangeLogPanelBody_RSP(resp,id){
|
||||
var historyGridListChangeLogPanel_id_ = Ext.getCmp('historyGridListChangeLogPanel_id');
|
||||
historyGridListChangeLogPanel_id_.show();
|
||||
var historyGridListChangeLogPanelBody_= document.getElementById('historyGridListChangeLogPanelBody_JXP');
|
||||
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,
|
||||
title: _('Change log'),
|
||||
width: 920,
|
||||
id:'historyGridListChangeLogPanel_id',
|
||||
autoHeight: false,
|
||||
height: 400,
|
||||
modal: true,
|
||||
//autoScroll: false,
|
||||
maximizable: false,
|
||||
resizable: false,
|
||||
items:
|
||||
[
|
||||
{
|
||||
xtype: 'box',
|
||||
autoEl: { tag: 'div',html: '<div id="historyGridListChangeLogPanelBody_JXP" ></div>'}
|
||||
},
|
||||
{
|
||||
name:'ajaxAction',
|
||||
xtype:'hidden',
|
||||
value:'uploadFileNewProcess'
|
||||
}
|
||||
]
|
||||
});
|
||||
historyGridListChangeLogPanelBody_JXP();
|
||||
}
|
||||
|
||||
var historyGridListChangeLogGlobal = {};
|
||||
historyGridListChangeLogGlobal.idHistory ='';
|
||||
|
||||
function historyGridListChangeLog(){
|
||||
|
||||
historyGridListChangeLogGlobal.idHistory = historyGridListChangeLogGlobal.idHistory;
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
if( rowSelected ){
|
||||
var idHistory = rowSelected.data.ID_HISTORY;
|
||||
historyGridListChangeLogGlobal.idHistory = idHistory;
|
||||
historyGridListChangeLogPanel();
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//!!historyGridList|changeLog
|
||||
|
||||
function historyGridList(){
|
||||
store = new Ext.data.GroupingStore({
|
||||
proxy : new Ext.data.HttpProxy
|
||||
(
|
||||
{
|
||||
url: 'caseHistory_Ajax.php?actionAjax=historyGridList_JXP'
|
||||
}
|
||||
),
|
||||
|
||||
reader : new Ext.data.JsonReader
|
||||
(
|
||||
{
|
||||
totalProperty: 'totalCount',
|
||||
root: 'data',
|
||||
fields :
|
||||
[
|
||||
{name : 'ID_HISTORY'},
|
||||
{name : 'USR_NAME'},
|
||||
{name : 'TAS_TITLE'},
|
||||
{name : 'PRO_STATUS'},
|
||||
{name : 'PRO_STATUS_LABEL'},
|
||||
{name : 'DEL_INIT_DATE'},
|
||||
{name : 'PRO_DEBUG'},
|
||||
{name : 'PRO_DEBUG_LABEL'},
|
||||
{name : 'DEL_DELEGATE_DATE'},
|
||||
{name : 'CASES_COUNT', type:'float'},
|
||||
{name : 'APP_TYPE'},
|
||||
{name : 'DEL_FINISH_DATE'},
|
||||
{name : 'APP_ENABLE_ACTION_DATE', type:'float'},
|
||||
{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");
|
||||
}
|
||||
return dateString;
|
||||
}
|
||||
|
||||
actionRenderingTranslation = function(v){
|
||||
var actionTranslate = "";
|
||||
if(v=="PAUSE"){
|
||||
actionTranslate = _("ID_PAUSED");
|
||||
}
|
||||
else if(v=="CANCEL"){
|
||||
actionTranslate = _("ID_CANCELLED");
|
||||
}
|
||||
else if(v=="IN_PROGRESS"){
|
||||
actionTranslate = _("ID_IN_PROGRESS");
|
||||
}
|
||||
else if(v=="REASSIGN"){
|
||||
actionTranslate = _("ID_REASSIGNED");
|
||||
}
|
||||
else if(v==""||v==null){
|
||||
actionTranslate = _("ID_DERIVATED");
|
||||
}
|
||||
return actionTranslate;
|
||||
};
|
||||
|
||||
|
||||
processesGrid = new Ext.grid.GridPanel({
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
id: 'processesGrid',
|
||||
height:500,
|
||||
//autoWidth : true,
|
||||
width:'',
|
||||
title : '',
|
||||
stateful : true,
|
||||
stateId : 'grid',
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: true,
|
||||
frame:false,
|
||||
//plugins: expander,
|
||||
cls : 'grid_with_checkbox',
|
||||
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},
|
||||
{header: "", dataIndex: 'PRO_STATUS', width: 50, hidden:true, hideable:false},
|
||||
{header: _("ID_CASESLIST_APP_TAS_TITLE"), dataIndex: 'TAS_TITLE', width: 100},
|
||||
{header: _("ID_DELEGATE_USER"), dataIndex: 'USR_NAME', width: 60, hidden:false},
|
||||
/*{header: TRANSLATIONS.ID_STATUS, dataIndex: 'PRO_STATUS_LABEL', width: 50, renderer:function(v,p,r){
|
||||
color = r.get('PRO_STATUS') == 'ACTIVE'? 'green': 'red';
|
||||
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_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},
|
||||
{header: _("ID_DISABLE_ACTION"), dataIndex: 'APP_DISABLE_ACTION_DATE', width: 70, renderer:startDateRender}
|
||||
//{header: TRANSLATIONS.ID_TOTAL_CASES, dataIndex: 'CASES_COUNT', width: 80,renderer:function(v){return "<b>"+v+"</b>";}, align:'right'},
|
||||
//{header: TRANSLATIONS.ID_PRO_DEBUG, dataIndex: 'PRO_DEBUG_LABEL', width: 50, align:'center'}
|
||||
]
|
||||
}),
|
||||
store: store,
|
||||
tbar:[
|
||||
{
|
||||
text:_("ID_DYNAFORM_HISTORY"),
|
||||
id:'changueLogFormRadioId',
|
||||
iconCls: 'button_menu_ext',
|
||||
icon: '/images/ext/gray/shapes/hourglass.png',
|
||||
handler: function(){
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
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);
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
disabled:false
|
||||
},
|
||||
{
|
||||
xtype: 'tbfill'
|
||||
}
|
||||
],
|
||||
bbar: new Ext.PagingToolbar({
|
||||
pageSize: 15,
|
||||
store: store,
|
||||
displayInfo: true,
|
||||
displayMsg: 'Displaying Processes {0} - {1} of {2}',
|
||||
emptyMsg: "",
|
||||
items:[]
|
||||
}),
|
||||
listeners: {
|
||||
rowdblclick: emptyReturn,
|
||||
render: function(){
|
||||
this.loadMask = new Ext.LoadMask(this.body, {msg:'Loading...'});
|
||||
processesGrid.getSelectionModel().on('rowselect', function(){
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
processesGrid.store.load({params: {"function":"languagesList"}});
|
||||
|
||||
processesGrid.store.on(
|
||||
'load',
|
||||
function()
|
||||
{
|
||||
//window.parent.resize_iframe();
|
||||
},
|
||||
this,
|
||||
{
|
||||
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);
|
||||
} else {
|
||||
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'));
|
||||
} else {
|
||||
debug.setIconClass('icon-debug');
|
||||
debug.setText(_('ID_ENABLE_DEBUG'));
|
||||
}
|
||||
}, this);
|
||||
|
||||
processesGrid.on('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
}, this);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function emptyReturn(){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
layout: 'border',
|
||||
autoScroll: true,
|
||||
items: [
|
||||
processesGrid
|
||||
]
|
||||
});
|
||||
}
|
||||
//!historyGridList|
|
||||
|
||||
|
||||
|
||||
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
@@ -0,0 +1,569 @@
|
||||
/*
|
||||
* @author: Douglas Medrano
|
||||
* May 03, 2011
|
||||
*/
|
||||
md5 = function(s,raw,hexcase,chrsz){
|
||||
raw = raw || false;
|
||||
hexcase = hexcase || false;
|
||||
chrsz = chrsz || 8;
|
||||
function safe_add(x, y){
|
||||
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
|
||||
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return (msw << 16) | (lsw & 0xFFFF);
|
||||
}
|
||||
function bit_rol(num, cnt){
|
||||
return (num << cnt) | (num >>> (32 - cnt));
|
||||
}
|
||||
function md5_cmn(q, a, b, x, s, t){
|
||||
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
|
||||
}
|
||||
function md5_ff(a, b, c, d, x, s, t){
|
||||
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
|
||||
}
|
||||
function md5_gg(a, b, c, d, x, s, t){
|
||||
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
|
||||
}
|
||||
function md5_hh(a, b, c, d, x, s, t){
|
||||
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
|
||||
}
|
||||
function md5_ii(a, b, c, d, x, s, t){
|
||||
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function core_md5(x, len){
|
||||
x[len >> 5] |= 0x80 << ((len) % 32);
|
||||
x[(((len + 64) >>> 9) << 4) + 14] = len;
|
||||
var a = 1732584193;
|
||||
var b = -271733879;
|
||||
var c = -1732584194;
|
||||
var d = 271733878;
|
||||
for(var i = 0; i < x.length; i += 16){
|
||||
var olda = a;
|
||||
var oldb = b;
|
||||
var oldc = c;
|
||||
var oldd = d;
|
||||
a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
|
||||
d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
|
||||
c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
|
||||
b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
|
||||
a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
|
||||
d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
|
||||
c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
|
||||
b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
|
||||
a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
|
||||
d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
|
||||
c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
|
||||
b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
|
||||
a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
|
||||
d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
|
||||
c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
|
||||
b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
|
||||
a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
|
||||
d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
|
||||
c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
|
||||
b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
|
||||
a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
|
||||
d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
|
||||
c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
|
||||
b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
|
||||
a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
|
||||
d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
|
||||
c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
|
||||
b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
|
||||
a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
|
||||
d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
|
||||
c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
|
||||
b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
|
||||
a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
|
||||
d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
|
||||
c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
|
||||
b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
|
||||
a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
|
||||
d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
|
||||
c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
|
||||
b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
|
||||
a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
|
||||
d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
|
||||
c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
|
||||
b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
|
||||
a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
|
||||
d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
|
||||
c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
|
||||
b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
|
||||
a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
|
||||
d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
|
||||
c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
|
||||
b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
|
||||
a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
|
||||
d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
|
||||
c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
|
||||
b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
|
||||
a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
|
||||
d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
|
||||
c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
|
||||
b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
|
||||
a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
|
||||
d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
|
||||
c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
|
||||
b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
|
||||
a = safe_add(a, olda);
|
||||
b = safe_add(b, oldb);
|
||||
c = safe_add(c, oldc);
|
||||
d = safe_add(d, oldd);
|
||||
}
|
||||
return [a, b, c, d];
|
||||
}
|
||||
function str2binl(str){
|
||||
var bin = [];
|
||||
var mask = (1 << chrsz) - 1;
|
||||
for(var i = 0; i < str.length * chrsz; i += chrsz){
|
||||
bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
|
||||
}
|
||||
return bin;
|
||||
}
|
||||
function binl2str(bin){
|
||||
var str = "";
|
||||
var mask = (1 << chrsz) - 1;
|
||||
for(var i = 0; i < bin.length * 32; i += chrsz) {
|
||||
str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function binl2hex(binarray){
|
||||
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
|
||||
var str = "";
|
||||
for(var i = 0; i < binarray.length * 4; i++) {
|
||||
str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
return (raw ? binl2str(core_md5(str2binl(s), s.length * chrsz)) : binl2hex(core_md5(str2binl(s), s.length * chrsz)) );
|
||||
};
|
||||
|
||||
function ajaxPostRequest(url, callback_function, id){
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
url= url + '&nocachetime='+time;
|
||||
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');
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject){// IE
|
||||
try{
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!http_request){
|
||||
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{
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
var processesGrid;
|
||||
var store;
|
||||
|
||||
function toggleTable(tablename){
|
||||
table= document.getElementById(tablename);
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
new Ext.KeyMap(
|
||||
document,
|
||||
{
|
||||
key: Ext.EventObject.F5,
|
||||
fn: function(keycode, e){
|
||||
if (! e.ctrlKey){
|
||||
if (Ext.isIE)
|
||||
e.browserEvent.keyCode = 8;
|
||||
e.stopEvent();
|
||||
document.location = document.location;
|
||||
}
|
||||
else{
|
||||
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
Ext.QuickTips.init();
|
||||
|
||||
historyDynaformGrid();
|
||||
|
||||
});
|
||||
|
||||
var historyDynaformGridPreviewGlobal = {};
|
||||
historyDynaformGridPreviewGlobal.DYN_UID = '';
|
||||
historyDynaformGridPreviewGlobal.DYN_TITLE = '';
|
||||
|
||||
function historyDynaformGridPreview(){
|
||||
//historyDynaformGridPreviewGlobalSystem
|
||||
var DYN_UID = historyDynaformGridPreviewGlobal.DYN_UID;
|
||||
var DYN_TITLE = historyDynaformGridPreviewGlobal.DYN_TITLE;
|
||||
|
||||
var tabData = Ext.util.JSON.encode(historyDynaformGridPreviewGlobal);
|
||||
var tabName = 'historyDynaformGridPreview_'+DYN_UID;
|
||||
var tabTitle = 'Preview('+DYN_TITLE+')';
|
||||
|
||||
window.parent.ActionTabFrameGlobal.tabData = tabData;
|
||||
window.parent.ActionTabFrameGlobal.tabName = tabName;
|
||||
window.parent.ActionTabFrameGlobal.tabTitle = tabTitle;
|
||||
|
||||
window.parent.Actions.tabFrame(tabName);
|
||||
}
|
||||
var historyDynaformGridHistoryGlobal = {};
|
||||
historyDynaformGridHistoryGlobal.PRO_UID = '';
|
||||
historyDynaformGridHistoryGlobal.APP_UID = '';
|
||||
historyDynaformGridHistoryGlobal.TAS_UID = '';
|
||||
historyDynaformGridHistoryGlobal.DYN_UID = '';
|
||||
historyDynaformGridHistoryGlobal.DYN_TITLE = '';
|
||||
|
||||
function historyDynaformGridHistory(){
|
||||
//historyDynaformGridGlobal
|
||||
historyDynaformGridGlobal.ref = historyDynaformGridGlobal.ref;
|
||||
//!historyDynaformGridGlobalSystem
|
||||
var ref = historyDynaformGridGlobal.ref;
|
||||
|
||||
//historyDynaformGridHistoryGlobalSystem
|
||||
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 idUnique = md5(PRO_UID+APP_UID+TAS_UID+DYN_UID);
|
||||
console.log(window.content);
|
||||
|
||||
var tabData = Ext.util.JSON.encode(historyDynaformGridHistoryGlobal);
|
||||
var tabName = 'historyDynaformGridHistory_'+idUnique;
|
||||
var tabTitle = 'Change Log('+DYN_TITLE+')';
|
||||
|
||||
window.parent.ActionTabFrameGlobal.tabData = tabData;
|
||||
window.parent.ActionTabFrameGlobal.tabName = tabName;
|
||||
window.parent.ActionTabFrameGlobal.tabTitle = tabTitle;
|
||||
//window.parent.Actions.tabFrame('showDynaformListHistory'+"&PRO_UID="+ PRO_UID +"&APP_UID="+ APP_UID+"&TAS_UID="+ TAS_UID+"&DYN_UID="+ DYN_UID);
|
||||
window.parent.Actions.tabFrame(tabName);
|
||||
}
|
||||
|
||||
historyDynaformGridGlobal = {};
|
||||
|
||||
function historyDynaformGrid(){
|
||||
|
||||
//dataGlobalConstructor
|
||||
historyDynaformGridGlobal.ref = 'casesHistoryDynaformPage_Ajax.php';
|
||||
|
||||
//dataGlobal
|
||||
historyDynaformGridGlobal.ref = historyDynaformGridGlobal.ref;
|
||||
|
||||
//!dataSystemGlobal
|
||||
var ref = historyDynaformGridGlobal.ref;
|
||||
|
||||
//!dataSystem
|
||||
var url = ref+'?actionAjax=historyDynaformGrid_Ajax';
|
||||
|
||||
|
||||
|
||||
store = new Ext.data.GroupingStore({
|
||||
proxy : new Ext.data.HttpProxy
|
||||
(
|
||||
{
|
||||
url: url
|
||||
}
|
||||
),
|
||||
reader : new Ext.data.JsonReader
|
||||
(
|
||||
{
|
||||
totalProperty: 'totalCount',
|
||||
root: 'data',
|
||||
fields :
|
||||
[
|
||||
{name : 'PRO_UID'},
|
||||
{name : 'APP_UID'},
|
||||
{name : 'TAS_UID'},
|
||||
{name : 'DYN_UID'},
|
||||
{name : 'DYN_TITLE'}
|
||||
]
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
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");
|
||||
}
|
||||
return dateString;
|
||||
}
|
||||
escapeHtml = function(v){
|
||||
var pre = document.createElement('pre');
|
||||
var text = document.createTextNode( v );
|
||||
pre.appendChild(text);
|
||||
return pre.innerHTML;
|
||||
}
|
||||
|
||||
actionRenderingTranslation = function(v){
|
||||
var actionTranslate = "";
|
||||
if(v=="PAUSE"){
|
||||
actionTranslate = _("ID_PAUSED");
|
||||
}
|
||||
else if(v=="CANCEL"){
|
||||
actionTranslate = _("ID_CANCELLED");
|
||||
}
|
||||
else if(v=="IN_PROGRESS"){
|
||||
actionTranslate = _("ID_IN_PROGRESS");
|
||||
}
|
||||
else if(v=="REASSIGN"){
|
||||
actionTranslate = _("ID_REASSIGNED");
|
||||
}
|
||||
else if(v==""||v==null){
|
||||
actionTranslate = _("ID_DERIVATED");
|
||||
}
|
||||
return actionTranslate;
|
||||
};
|
||||
|
||||
|
||||
var processesGrid = new Ext.grid.GridPanel({
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
id: 'processesGrid',
|
||||
height:500,
|
||||
//autoWidth : true,
|
||||
width:'',
|
||||
title : '',
|
||||
stateful : true,
|
||||
stateId : 'grid',
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: true,
|
||||
frame:false,
|
||||
//plugins: expander,
|
||||
cls : 'grid_with_checkbox',
|
||||
columnLines: true,
|
||||
viewConfig: {
|
||||
forceFit:true
|
||||
},
|
||||
cm: new Ext.grid.ColumnModel({
|
||||
defaults: {
|
||||
width: 200,
|
||||
sortable: true
|
||||
},
|
||||
columns:
|
||||
[
|
||||
{id:'PRO_UID', dataIndex: 'PRO_UID', hidden:true, hideable:false},
|
||||
{id:'APP_UID', dataIndex: 'APP_UID', hidden:true, hideable:false},
|
||||
{id:'TAS_UID', dataIndex: 'TAS_UID', hidden:true, hideable:false},
|
||||
{id:'DYN_UID', dataIndex: 'DYN_UID', hidden:true, hideable:false},
|
||||
{header: _("ID_TITLE_FIELD"), dataIndex: 'DYN_TITLE', width: 70}
|
||||
]
|
||||
}),
|
||||
store: store,
|
||||
tbar:[
|
||||
{
|
||||
|
||||
text:_("ID_DYNAFORM_HISTORY"),
|
||||
id:'sendMailMessageFormRadioId',
|
||||
iconCls: 'button_menu_ext',
|
||||
icon: '/images/ext/gray/shapes/hourglass.png',
|
||||
handler: function(){
|
||||
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
if( rowSelected ){
|
||||
//!dataGrid
|
||||
|
||||
//historyDynaformGridGlobal construct
|
||||
historyDynaformGridHistoryGlobal.PRO_UID = rowSelected.data.PRO_UID;
|
||||
historyDynaformGridHistoryGlobal.APP_UID = rowSelected.data.APP_UID;
|
||||
historyDynaformGridHistoryGlobal.TAS_UID = rowSelected.data.TAS_UID;
|
||||
historyDynaformGridHistoryGlobal.DYN_UID = rowSelected.data.DYN_UID;
|
||||
historyDynaformGridHistoryGlobal.DYN_TITLE = rowSelected.data.DYN_TITLE;
|
||||
|
||||
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;
|
||||
|
||||
historyDynaformGridHistory();
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
disabled:false
|
||||
},
|
||||
{
|
||||
xtype: 'tbseparator'
|
||||
},
|
||||
{
|
||||
text:_("ID_PREVIEW"),
|
||||
id:'viewMailMessageFormRadioId',
|
||||
iconCls: 'button_menu_ext',
|
||||
icon: '/images/documents/_filefind.png',
|
||||
handler: function(){
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
if( rowSelected ){
|
||||
|
||||
//!historyDynaformGridPreviewGlobal|Constructor
|
||||
historyDynaformGridPreviewGlobal.DYN_UID = rowSelected.data.DYN_UID;
|
||||
historyDynaformGridPreviewGlobal.DYN_TITLE = rowSelected.data.DYN_TITLE;
|
||||
|
||||
|
||||
var DYN_UID = historyDynaformGridPreviewGlobal.DYN_UID;
|
||||
var DYN_TITLE = historyDynaformGridPreviewGlobal.DYN_TITLE;
|
||||
|
||||
historyDynaformGridPreview();
|
||||
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
disabled:false
|
||||
},
|
||||
{
|
||||
xtype: 'tbfill'
|
||||
}
|
||||
],
|
||||
bbar: new Ext.PagingToolbar({
|
||||
pageSize: 10,
|
||||
store: store,
|
||||
displayInfo: true,
|
||||
displayMsg: 'Displaying Processes {0} - {1} of {2}',
|
||||
emptyMsg: "",
|
||||
items:[]
|
||||
}),
|
||||
listeners: {
|
||||
rowdblclick: emptyReturn,
|
||||
render: function(){
|
||||
this.loadMask = new Ext.LoadMask(this.body, {msg:'Loading...'});
|
||||
processesGrid.getSelectionModel().on('rowselect', function(){
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
processesGrid.store.load({params: {"function":"languagesList"}});
|
||||
|
||||
processesGrid.store.on(
|
||||
'load',
|
||||
function()
|
||||
{
|
||||
//window.parent.resize_iframe();
|
||||
},
|
||||
this,
|
||||
{
|
||||
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);
|
||||
} else {
|
||||
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'));
|
||||
} else {
|
||||
debug.setIconClass('icon-debug');
|
||||
debug.setText(_('ID_ENABLE_DEBUG'));
|
||||
}
|
||||
}, this);
|
||||
|
||||
processesGrid.on('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
}, this);
|
||||
|
||||
function emptyReturn(){
|
||||
}
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
layout: 'border',
|
||||
autoScroll: true,
|
||||
items: [
|
||||
processesGrid
|
||||
]
|
||||
});
|
||||
}
|
||||
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
@@ -0,0 +1,475 @@
|
||||
/*
|
||||
* @author: Douglas Medrano
|
||||
* May 03, 2011
|
||||
*/
|
||||
|
||||
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 http_request = false;
|
||||
|
||||
if (window.XMLHttpRequest){ // Mozilla, Safari,...
|
||||
http_request = new XMLHttpRequest();
|
||||
if (http_request.overrideMimeType){
|
||||
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){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!http_request){
|
||||
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{
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
var processesGrid;
|
||||
var store;
|
||||
var ActionTabFrameGlobal = '';
|
||||
function toggleTable(tablename){
|
||||
table= document.getElementById(tablename);
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
new Ext.KeyMap(
|
||||
document,
|
||||
{
|
||||
key: Ext.EventObject.F5,
|
||||
fn: function(keycode, e){
|
||||
if (! e.ctrlKey){
|
||||
if (Ext.isIE)
|
||||
e.browserEvent.keyCode = 8;
|
||||
e.stopEvent();
|
||||
document.location = document.location;
|
||||
}
|
||||
else{
|
||||
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
Ext.QuickTips.init();
|
||||
|
||||
messageHistoryGridList();
|
||||
|
||||
});
|
||||
|
||||
//!historyGridList|
|
||||
//!!historyGridList|changeLog
|
||||
function historyGridListChangeLogPanelBody_RSP(resp,id){
|
||||
var historyGridListChangeLogPanel_id_ = Ext.getCmp('historyGridListChangeLogPanel_id');
|
||||
historyGridListChangeLogPanel_id_.show();
|
||||
var historyGridListChangeLogPanelBody_= document.getElementById('historyGridListChangeLogPanelBody_JXP');
|
||||
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,
|
||||
title: _('Change log'),
|
||||
width: 920,
|
||||
id:'historyGridListChangeLogPanel_id',
|
||||
autoHeight: false,
|
||||
height: 400,
|
||||
modal: true,
|
||||
//autoScroll: false,
|
||||
maximizable: false,
|
||||
resizable: false,
|
||||
items:
|
||||
[
|
||||
{
|
||||
xtype: 'box',
|
||||
autoEl: { tag: 'div',html: '<div id="historyGridListChangeLogPanelBody_JXP" ></div>'}
|
||||
},
|
||||
{
|
||||
name:'ajaxAction',
|
||||
xtype:'hidden',
|
||||
value:'uploadFileNewProcess'
|
||||
}
|
||||
]
|
||||
});
|
||||
historyGridListChangeLogPanelBody_JXP();
|
||||
}
|
||||
|
||||
var historyGridListChangeLogGlobal = {};
|
||||
historyGridListChangeLogGlobal.idHistory ='';
|
||||
|
||||
function historyGridListChangeLog(){
|
||||
|
||||
historyGridListChangeLogGlobal.idHistory = historyGridListChangeLogGlobal.idHistory;
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
if( rowSelected ){
|
||||
var idHistory = rowSelected.data.ID_HISTORY;
|
||||
historyGridListChangeLogGlobal.idHistory = idHistory;
|
||||
historyGridListChangeLogPanel();
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//!!historyGridList|changeLog
|
||||
|
||||
function caseMessageHistory_RSP(response,id){
|
||||
if(response==""){
|
||||
|
||||
messageHistoryGridListMask.hide();
|
||||
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: _('ID_MAIL_SENT_SUCCESSFULLY'),
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Ext.destroy(Ext.getCmp('processesGrid'));
|
||||
|
||||
messageHistoryGridList();
|
||||
}
|
||||
else{
|
||||
alert(response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function messageHistoryGridList(){
|
||||
store = new Ext.data.GroupingStore({
|
||||
proxy : new Ext.data.HttpProxy
|
||||
(
|
||||
{
|
||||
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'}
|
||||
|
||||
]
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
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");
|
||||
}
|
||||
return dateString;
|
||||
}
|
||||
escapeHtml = function(v){
|
||||
var pre = document.createElement('pre');
|
||||
var text = document.createTextNode( v );
|
||||
pre.appendChild(text);
|
||||
return pre.innerHTML;
|
||||
}
|
||||
|
||||
actionRenderingTranslation = function(v){
|
||||
var actionTranslate = "";
|
||||
if(v=="PAUSE"){
|
||||
actionTranslate = _("ID_PAUSED");
|
||||
}
|
||||
else if(v=="CANCEL"){
|
||||
actionTranslate = _("ID_CANCELLED");
|
||||
}
|
||||
else if(v=="IN_PROGRESS"){
|
||||
actionTranslate = _("ID_IN_PROGRESS");
|
||||
}
|
||||
else if(v=="REASSIGN"){
|
||||
actionTranslate = _("ID_REASSIGNED");
|
||||
}
|
||||
else if(v==""||v==null){
|
||||
actionTranslate = _("ID_DERIVATED");
|
||||
}
|
||||
return actionTranslate;
|
||||
};
|
||||
|
||||
|
||||
var processesGrid = new Ext.grid.GridPanel({
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
id: 'processesGrid',
|
||||
height:500,
|
||||
//autoWidth : true,
|
||||
width:'',
|
||||
title : '',
|
||||
stateful : true,
|
||||
stateId : 'grid',
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: true,
|
||||
frame:false,
|
||||
//plugins: expander,
|
||||
cls : 'grid_with_checkbox',
|
||||
columnLines: true,
|
||||
viewConfig: {
|
||||
forceFit:true
|
||||
},
|
||||
cm: new Ext.grid.ColumnModel({
|
||||
defaults: {
|
||||
width: 200,
|
||||
sortable: true
|
||||
},
|
||||
columns: [
|
||||
//expander,
|
||||
{id:'ID_MESSAGE', dataIndex: 'ID_MESSAGE', hidden:true, hideable:false},
|
||||
{header: _("ID_TYPE"), dataIndex: 'APP_MSG_TYPE', width: 70},
|
||||
{header: _("ID_DATE_LABEL"), dataIndex: 'APP_MSG_DATE', width: 60, renderer: startDateRender},
|
||||
{header: _("ID_SUBJECT"), dataIndex: 'APP_MSG_SUBJECT', width: 60},
|
||||
{header: _("ID_FROM"), dataIndex: 'APP_MSG_FROM', width: 60, renderer: escapeHtml},
|
||||
{header: _("ID_TO"), dataIndex: 'APP_MSG_TO', width: 60, renderer: escapeHtml},
|
||||
{header: _("ID_STATUS"), dataIndex: 'APP_MSG_STATUS', width: 50} ]
|
||||
}),
|
||||
store: store,
|
||||
tbar:[
|
||||
{
|
||||
text:_("ID_RESEND"),
|
||||
id:'sendMailMessageFormRadioId',
|
||||
iconCls: 'button_menu_ext',
|
||||
icon: '/images/mail-send16x16.png',
|
||||
handler: function(){
|
||||
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
if( rowSelected ){
|
||||
//!dataGrid
|
||||
|
||||
|
||||
// Show a dialog using config options:
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: _('ID_ARE_YOU_SURE_RESEND')+"?",
|
||||
buttons: Ext.Msg.OKCANCEL,
|
||||
icon: Ext.MessageBox.QUESTION,
|
||||
fn: function(btn, text){
|
||||
if(btn=='ok'){
|
||||
//!dataGrid
|
||||
var idMessage = rowSelected.data.ID_MESSAGE;
|
||||
var subjectMessage = rowSelected.data.APP_MSG_SUBJECT;
|
||||
var dateMessage = rowSelected.data.APP_MSG_DATE;
|
||||
|
||||
var tabName = 'sendMailMessage_'+idMessage;
|
||||
var tabTitle = 'Resend('+subjectMessage+' '+dateMessage+')';
|
||||
|
||||
ActionTabFrameGlobal.tabName = tabName;
|
||||
ActionTabFrameGlobal.tabTitle = tabTitle;
|
||||
|
||||
//window.parent.Actions.tabFrame(tabName);
|
||||
var tabNameArray = tabName.split('_');
|
||||
var APP_UID = tabNameArray[1];
|
||||
var APP_MSG_UID = tabNameArray[2];
|
||||
|
||||
|
||||
messageHistoryGridListMask = new Ext.LoadMask(Ext.getBody(), {msg:_('ID_LOADING')});
|
||||
messageHistoryGridListMask.show();
|
||||
|
||||
|
||||
|
||||
var url = "caseMessageHistory_Ajax.php?actionAjax=sendMailMessage_JXP&APP_UID="+APP_UID+"&APP_MSG_UID="+APP_MSG_UID;
|
||||
ajaxPostRequest(url,'caseMessageHistory_RSP');
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
animEl: 'elId'
|
||||
});
|
||||
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
disabled:false
|
||||
},
|
||||
|
||||
{
|
||||
xtype: 'tbfill'
|
||||
}
|
||||
],
|
||||
bbar: new Ext.PagingToolbar({
|
||||
pageSize: 10,
|
||||
store: store,
|
||||
displayInfo: true,
|
||||
displayMsg: 'Displaying Processes {0} - {1} of {2}',
|
||||
emptyMsg: "",
|
||||
items:[]
|
||||
}),
|
||||
listeners: {
|
||||
rowdblclick: emptyReturn,
|
||||
render: function(){
|
||||
this.loadMask = new Ext.LoadMask(this.body, {msg:'Loading...'});
|
||||
processesGrid.getSelectionModel().on('rowselect', function(){
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
processesGrid.store.load({params: {"function":"languagesList"}});
|
||||
|
||||
processesGrid.store.on(
|
||||
'load',
|
||||
function()
|
||||
{
|
||||
//window.parent.resize_iframe();
|
||||
},
|
||||
this,
|
||||
{
|
||||
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);
|
||||
} else {
|
||||
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'));
|
||||
} else {
|
||||
debug.setIconClass('icon-debug');
|
||||
debug.setText(_('ID_ENABLE_DEBUG'));
|
||||
}
|
||||
}, this);
|
||||
|
||||
processesGrid.on('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
}, this);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function emptyReturn(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
layout: 'border',
|
||||
autoScroll: true,
|
||||
items: [
|
||||
processesGrid
|
||||
]
|
||||
});
|
||||
}
|
||||
//!historyGridList|
|
||||
|
||||
|
||||
|
||||
@@ -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
@@ -0,0 +1,511 @@
|
||||
/*
|
||||
* @author: Douglas Medrano
|
||||
* May 03, 2011
|
||||
*/
|
||||
function ajaxPostRequest(url, callback_function, id){
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
url= url + '&nocachetime='+time;
|
||||
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');
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject){// IE
|
||||
try{
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!http_request){
|
||||
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{
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
function ajaxPostRequestUrlIntact(url, callback_function, id){
|
||||
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');
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject){// IE
|
||||
try{
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!http_request){
|
||||
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{
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
var processesGrid;
|
||||
var store;
|
||||
|
||||
new Ext.KeyMap(
|
||||
document,
|
||||
{
|
||||
key: Ext.EventObject.F5,
|
||||
fn: function(keycode, e){
|
||||
if (! e.ctrlKey){
|
||||
if (Ext.isIE)
|
||||
e.browserEvent.keyCode = 8;
|
||||
e.stopEvent();
|
||||
document.location = document.location;
|
||||
}
|
||||
else{
|
||||
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
Ext.QuickTips.init();
|
||||
|
||||
generateDocumentGrid();
|
||||
|
||||
});
|
||||
|
||||
|
||||
var generateDocumentGridDownloadGlobal = {};
|
||||
generateDocumentGridDownloadGlobal.APP_DOC_UID = '';
|
||||
generateDocumentGridDownloadGlobal.FILEDOC = '';
|
||||
generateDocumentGridDownloadGlobal.FILEPDF = '';
|
||||
generateDocumentGridDownloadGlobal.DOWNLOAD = '';
|
||||
|
||||
function generateDocumentGridDownload(){
|
||||
//!generateDocumentGridDownloadGlobalSystem
|
||||
var APP_DOC_UID = generateDocumentGridDownloadGlobal.APP_DOC_UID;
|
||||
var FILEDOC = generateDocumentGridDownloadGlobal.FILEDOC;
|
||||
var FILEPDF = generateDocumentGridDownloadGlobal.FILEPDF;
|
||||
var DOWNLOAD = generateDocumentGridDownloadGlobal.DOWNLOAD;
|
||||
|
||||
//!dataSystem
|
||||
var downloadLink = '';
|
||||
|
||||
if(DOWNLOAD=='FILEDOC'){
|
||||
downloadLink = FILEDOC;
|
||||
}
|
||||
else if(DOWNLOAD=='FILEPDF'){
|
||||
downloadLink = FILEPDF;
|
||||
}
|
||||
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
downloadLink = downloadLink + '&nocachetime='+time;
|
||||
|
||||
|
||||
window.location.href= downloadLink;
|
||||
|
||||
}
|
||||
|
||||
var generateDocumentGridGlobal = {};
|
||||
generateDocumentGridGlobal.ref = "";
|
||||
|
||||
function generateDocumentGrid(){
|
||||
|
||||
//dataGlobalConstructor
|
||||
generateDocumentGridGlobal.ref = 'cases_Ajax.php';
|
||||
|
||||
//dataGlobal
|
||||
generateDocumentGridGlobal.ref = generateDocumentGridGlobal.ref;
|
||||
|
||||
//!dataSystemGlobal
|
||||
var ref = generateDocumentGridGlobal.ref;
|
||||
|
||||
//!dataSystem
|
||||
var url = ref+'?action=generateDocumentGrid_Ajax';
|
||||
store = new Ext.data.GroupingStore({
|
||||
proxy : new Ext.data.HttpProxy
|
||||
(
|
||||
{
|
||||
url: url
|
||||
}
|
||||
),
|
||||
reader : new Ext.data.JsonReader
|
||||
(
|
||||
{
|
||||
totalProperty: 'totalCount',
|
||||
root: 'data',
|
||||
fields :
|
||||
[
|
||||
{name : 'APP_DOC_UID'},
|
||||
{name : 'FILEDOCEXIST'},
|
||||
{name : 'FILEPDFEXIST'},
|
||||
{name : 'FILEDOC'},
|
||||
{name : 'FILEPDF'},
|
||||
{name : 'TITLE'},
|
||||
{name : 'OUTDOCTITLE'},
|
||||
{name : 'ORIGIN'},
|
||||
{name : 'CREATED_BY'},
|
||||
{name : 'CREATE_DATE'},
|
||||
{name : 'FILEDOCLABEL'},
|
||||
{name : 'FILEPDFLABEL'}
|
||||
]
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
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 processesGrid_ = Ext.getCmp("processesGrid");
|
||||
var dataFormat = processesGrid_.store.reader.jsonData.dataFormat;
|
||||
dataFormat = dataFormat!=""?dataFormat:"m/d/Y H:i:s";
|
||||
var dateString = "-";
|
||||
if(v!="-"){
|
||||
dataFormat
|
||||
dateString = _DF(v,dataFormat);
|
||||
}
|
||||
return dateString;
|
||||
}
|
||||
|
||||
escapeHtml = function(v){
|
||||
var pre = document.createElement('pre');
|
||||
var text = document.createTextNode( v );
|
||||
pre.appendChild(text);
|
||||
return pre.innerHTML;
|
||||
}
|
||||
|
||||
actionRenderingTranslation = function(v){
|
||||
var actionTranslate = "";
|
||||
if(v=="PAUSE"){
|
||||
actionTranslate = _("ID_PAUSED");
|
||||
}
|
||||
else if(v=="CANCEL"){
|
||||
actionTranslate = _("ID_CANCELLED");
|
||||
}
|
||||
else if(v=="IN_PROGRESS"){
|
||||
actionTranslate = _("ID_IN_PROGRESS");
|
||||
}
|
||||
else if(v=="REASSIGN"){
|
||||
actionTranslate = _("ID_REASSIGNED");
|
||||
}
|
||||
else if(v==""||v==null){
|
||||
actionTranslate = _("ID_DERIVATED");
|
||||
}
|
||||
return actionTranslate;
|
||||
};
|
||||
var processesGrid = new Ext.grid.GridPanel({
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
id: 'processesGrid',
|
||||
height: '100%',
|
||||
//autoWidth : true,
|
||||
width:'',
|
||||
title : '',
|
||||
stateful : true,
|
||||
stateId : 'grid',
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: true,
|
||||
frame:false,
|
||||
//plugins: expander,
|
||||
cls : 'grid_with_checkbox',
|
||||
columnLines: true,
|
||||
viewConfig: {
|
||||
forceFit:true
|
||||
},
|
||||
cm: new Ext.grid.ColumnModel({
|
||||
defaults: {
|
||||
width: 200,
|
||||
sortable: true
|
||||
},
|
||||
columns:
|
||||
[
|
||||
{id:'APP_DOC_UID', dataIndex: 'APP_DOC_UID', hidden:true, hideable:false},
|
||||
{id:'FILEDOCEXIST', dataIndex: 'FILEDOCEXIST', hidden:true, hideable:false},
|
||||
{id:'FILEPDFEXIST', dataIndex: 'FILEPDFEXIST', hidden:true, hideable:false},
|
||||
{id:'FILEDOC', dataIndex: 'FILEDOC', hidden:true, hideable:false},
|
||||
{id:'FILEPDF', dataIndex: 'FILEPDF', hidden:true, hideable:false},
|
||||
{header: _("ID_TITLE_FIELD"), dataIndex: 'TITLE', width: 70},
|
||||
{header: _("ID_OUTPUT_DOCUMENT"), dataIndex: 'OUTDOCTITLE', width: 70},
|
||||
{header: _("ID_ORIGIN_TASK"), dataIndex: 'ORIGIN', width: 70},
|
||||
{header: _("ID_CREATED_BY"), dataIndex: 'CREATED_BY', width: 70},
|
||||
{header: _("ID_CREATE_DATE"), dataIndex: 'CREATE_DATE', width: 70,renderer:startDateRender}
|
||||
|
||||
]
|
||||
}),
|
||||
store: store,
|
||||
tbar:[
|
||||
{
|
||||
text:_("ID_DOWNLOAD"),
|
||||
id:'ID_DOWNLOAD_DOC',
|
||||
iconCls: 'button_menu_ext',
|
||||
icon: '/images/extensionDoc.png',
|
||||
handler: function(){
|
||||
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
if( rowSelected ){
|
||||
//generateDocumentGridGlobal construct
|
||||
generateDocumentGridDownloadGlobal.APP_DOC_UID = rowSelected.data.APP_DOC_UID;
|
||||
generateDocumentGridDownloadGlobal.FILEDOC = rowSelected.data.FILEDOC;
|
||||
generateDocumentGridDownloadGlobal.FILEPDF = rowSelected.data.FILEPDF;
|
||||
generateDocumentGridDownloadGlobal.DOWNLOAD = 'FILEDOC';
|
||||
|
||||
var APP_DOC_UID = generateDocumentGridDownloadGlobal.APP_DOC_UID;
|
||||
var FILEDOC = generateDocumentGridDownloadGlobal.FILEDOC;
|
||||
var FILEPDF = generateDocumentGridDownloadGlobal.FILEPDF;
|
||||
var DOWNLOAD = generateDocumentGridDownloadGlobal.DOWNLOAD;
|
||||
|
||||
generateDocumentGridDownload();
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
disabled:true
|
||||
},
|
||||
{
|
||||
xtype: 'tbseparator'
|
||||
},
|
||||
{
|
||||
text:_("ID_DOWNLOAD"),
|
||||
id:'ID_DOWNLOAD_PDF',
|
||||
iconCls: 'button_menu_ext',
|
||||
icon: '/images/extensionPdf.png',
|
||||
handler: function(){
|
||||
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
if( rowSelected ){
|
||||
//generateDocumentGridGlobal construct
|
||||
generateDocumentGridDownloadGlobal.APP_DOC_UID = rowSelected.data.APP_DOC_UID;
|
||||
generateDocumentGridDownloadGlobal.FILEDOC = rowSelected.data.FILEDOC;
|
||||
generateDocumentGridDownloadGlobal.FILEPDF = rowSelected.data.FILEPDF;
|
||||
generateDocumentGridDownloadGlobal.DOWNLOAD = 'FILEPDF';
|
||||
|
||||
var APP_DOC_UID = generateDocumentGridDownloadGlobal.APP_DOC_UID;
|
||||
var FILEDOC = generateDocumentGridDownloadGlobal.FILEDOC;
|
||||
var FILEPDF = generateDocumentGridDownloadGlobal.FILEPDF;
|
||||
var DOWNLOAD = generateDocumentGridDownloadGlobal.DOWNLOAD;
|
||||
|
||||
generateDocumentGridDownload();
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
disabled:true
|
||||
},
|
||||
{
|
||||
xtype: 'tbfill'
|
||||
}
|
||||
],
|
||||
bbar: new Ext.PagingToolbar({
|
||||
pageSize: 10,
|
||||
store: store,
|
||||
displayInfo: true,
|
||||
displayMsg: 'Displaying Processes {0} - {1} of {2}',
|
||||
emptyMsg: "",
|
||||
items:[]
|
||||
}),
|
||||
listeners: {
|
||||
click: function(){
|
||||
|
||||
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
var FILEDOCEXIST = rowSelected.data.FILEDOCEXIST;
|
||||
var FILEPDFEXIST = rowSelected.data.FILEPDFEXIST;
|
||||
|
||||
if (rowSelected.data.FILEDOCLABEL=='') {
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(true);
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(false);
|
||||
}
|
||||
|
||||
if (rowSelected.data.FILEPDFLABEL=='') {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(true);
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(false);
|
||||
}
|
||||
|
||||
if ((rowSelected.data.FILEPDFLABEL=='') && (rowSelected.data.FILEDOCLABEL=='')) {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(true);
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(true);
|
||||
}
|
||||
|
||||
|
||||
/* var ID_DOWNLOAD_PDF2_ = Ext.getCmp('ID_DOWNLOAD_PDF');
|
||||
var ID_DOWNLOAD_DOC2_ = Ext.getCmp('ID_DOWNLOAD_DOC');
|
||||
|
||||
if(FILEDOCEXIST== 'javascript:alert("NO DOC")') {
|
||||
ID_DOWNLOAD_DOC2_.setDisabled(false);
|
||||
}
|
||||
else {
|
||||
ID_DOWNLOAD_DOC2_.setDisabled(true);
|
||||
}
|
||||
|
||||
if(FILEPDFEXIST== 'javascript:alert("NO PDF")') {
|
||||
ID_DOWNLOAD_PDF2_.setDisabled(false);
|
||||
}
|
||||
else {
|
||||
ID_DOWNLOAD_PDF2_.setDisabled(true);
|
||||
}
|
||||
|
||||
if (!(FILEPDFEXIST== 'javascript:alert("NO PDF")') && !(FILEDOCEXIST== 'javascript:alert("NO DOC")')) {
|
||||
ID_DOWNLOAD_DOC_.setDisabled(false);
|
||||
ID_DOWNLOAD_PDF2_.setDisabled(false);
|
||||
}*/
|
||||
/*else {
|
||||
ID_DOWNLOAD_PDF_.setDisabled(true);
|
||||
ID_DOWNLOAD_DOC_.setDisabled(true);
|
||||
}*/
|
||||
|
||||
},
|
||||
render: function(){
|
||||
this.loadMask = new Ext.LoadMask(this.body, {msg:'Loading...'});
|
||||
|
||||
processesGrid.getSelectionModel().on('rowselect', function(){
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
processesGrid.store.load({params: {"function":"languagesList"}});
|
||||
|
||||
|
||||
|
||||
processesGrid.store.on(
|
||||
'load',
|
||||
function()
|
||||
{
|
||||
//window.parent.resize_iframe();
|
||||
},
|
||||
this,
|
||||
{
|
||||
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);
|
||||
} else {
|
||||
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'));
|
||||
} else {
|
||||
debug.setIconClass('icon-debug');
|
||||
debug.setText(_('ID_ENABLE_DEBUG'));
|
||||
}
|
||||
}, this);
|
||||
|
||||
processesGrid.on('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
}, this);
|
||||
|
||||
function emptyReturn(){
|
||||
}
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
layout: 'border',
|
||||
autoScroll: true,
|
||||
items: [
|
||||
processesGrid
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -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
@@ -0,0 +1,528 @@
|
||||
/*
|
||||
* @author: Douglas Medrano
|
||||
* May 03, 2011
|
||||
*/
|
||||
md5 = function(s,raw,hexcase,chrsz){
|
||||
raw = raw || false;
|
||||
hexcase = hexcase || false;
|
||||
chrsz = chrsz || 8;
|
||||
function safe_add(x, y){
|
||||
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
|
||||
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return (msw << 16) | (lsw & 0xFFFF);
|
||||
}
|
||||
function bit_rol(num, cnt){
|
||||
return (num << cnt) | (num >>> (32 - cnt));
|
||||
}
|
||||
function md5_cmn(q, a, b, x, s, t){
|
||||
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
|
||||
}
|
||||
function md5_ff(a, b, c, d, x, s, t){
|
||||
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
|
||||
}
|
||||
function md5_gg(a, b, c, d, x, s, t){
|
||||
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
|
||||
}
|
||||
function md5_hh(a, b, c, d, x, s, t){
|
||||
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
|
||||
}
|
||||
function md5_ii(a, b, c, d, x, s, t){
|
||||
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function core_md5(x, len){
|
||||
x[len >> 5] |= 0x80 << ((len) % 32);
|
||||
x[(((len + 64) >>> 9) << 4) + 14] = len;
|
||||
var a = 1732584193;
|
||||
var b = -271733879;
|
||||
var c = -1732584194;
|
||||
var d = 271733878;
|
||||
for(var i = 0; i < x.length; i += 16){
|
||||
var olda = a;
|
||||
var oldb = b;
|
||||
var oldc = c;
|
||||
var oldd = d;
|
||||
a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
|
||||
d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
|
||||
c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
|
||||
b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
|
||||
a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
|
||||
d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
|
||||
c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
|
||||
b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
|
||||
a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
|
||||
d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
|
||||
c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
|
||||
b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
|
||||
a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
|
||||
d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
|
||||
c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
|
||||
b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
|
||||
a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
|
||||
d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
|
||||
c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
|
||||
b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
|
||||
a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
|
||||
d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
|
||||
c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
|
||||
b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
|
||||
a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
|
||||
d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
|
||||
c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
|
||||
b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
|
||||
a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
|
||||
d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
|
||||
c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
|
||||
b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
|
||||
a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
|
||||
d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
|
||||
c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
|
||||
b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
|
||||
a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
|
||||
d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
|
||||
c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
|
||||
b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
|
||||
a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
|
||||
d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
|
||||
c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
|
||||
b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
|
||||
a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
|
||||
d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
|
||||
c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
|
||||
b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
|
||||
a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
|
||||
d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
|
||||
c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
|
||||
b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
|
||||
a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
|
||||
d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
|
||||
c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
|
||||
b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
|
||||
a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
|
||||
d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
|
||||
c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
|
||||
b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
|
||||
a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
|
||||
d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
|
||||
c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
|
||||
b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
|
||||
a = safe_add(a, olda);
|
||||
b = safe_add(b, oldb);
|
||||
c = safe_add(c, oldc);
|
||||
d = safe_add(d, oldd);
|
||||
}
|
||||
return [a, b, c, d];
|
||||
}
|
||||
function str2binl(str){
|
||||
var bin = [];
|
||||
var mask = (1 << chrsz) - 1;
|
||||
for(var i = 0; i < str.length * chrsz; i += chrsz){
|
||||
bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
|
||||
}
|
||||
return bin;
|
||||
}
|
||||
function binl2str(bin){
|
||||
var str = "";
|
||||
var mask = (1 << chrsz) - 1;
|
||||
for(var i = 0; i < bin.length * 32; i += chrsz) {
|
||||
str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function binl2hex(binarray){
|
||||
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
|
||||
var str = "";
|
||||
for(var i = 0; i < binarray.length * 4; i++) {
|
||||
str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
return (raw ? binl2str(core_md5(str2binl(s), s.length * chrsz)) : binl2hex(core_md5(str2binl(s), s.length * chrsz)) );
|
||||
};
|
||||
|
||||
function ajaxPostRequest(url, callback_function, id){
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
url= url + '&nocachetime='+time;
|
||||
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');
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject){// IE
|
||||
try{
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!http_request){
|
||||
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{
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
function ajaxPostRequestUrlIntact(url, callback_function, id){
|
||||
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');
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject){// IE
|
||||
try{
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
try{
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!http_request){
|
||||
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{
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
var processesGrid;
|
||||
var store;
|
||||
|
||||
new Ext.KeyMap(
|
||||
document,
|
||||
{
|
||||
key: Ext.EventObject.F5,
|
||||
fn: function(keycode, e){
|
||||
if (! e.ctrlKey){
|
||||
if (Ext.isIE)
|
||||
e.browserEvent.keyCode = 8;
|
||||
e.stopEvent();
|
||||
document.location = document.location;
|
||||
}
|
||||
else{
|
||||
Ext.Msg.alert('Refresh', 'You clicked: CTRL-F5');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
Ext.QuickTips.init();
|
||||
|
||||
uploadDocumentGrid();
|
||||
|
||||
});
|
||||
|
||||
|
||||
var uploadDocumentGridDownloadGlobal = {};
|
||||
uploadDocumentGridDownloadGlobal.APP_DOC_UID = '';
|
||||
|
||||
function uploadDocumentGridDownload(){
|
||||
|
||||
//!uploadDocumentGridDownloadGlobalSystem
|
||||
var APP_DOC_UID = uploadDocumentGridDownloadGlobal.APP_DOC_UID;
|
||||
var DOWNLOAD_LINK = uploadDocumentGridDownloadGlobal.DOWNLOAD_LINK;
|
||||
var TITLE = uploadDocumentGridDownloadGlobal.TITLE;
|
||||
|
||||
var urlString = window.location.href;
|
||||
var urlArray = urlString.split("/");
|
||||
urlArray.pop();
|
||||
urlStrin = urlArray.join("/")+"/"+DOWNLOAD_LINK;
|
||||
|
||||
window.location.href= DOWNLOAD_LINK;
|
||||
}
|
||||
|
||||
var uploadDocumentGridGlobal = {};
|
||||
uploadDocumentGridGlobal.ref = "";
|
||||
|
||||
function uploadDocumentGrid(){
|
||||
|
||||
//dataGlobalConstructor
|
||||
uploadDocumentGridGlobal.ref = 'cases_Ajax.php';
|
||||
|
||||
//dataGlobal
|
||||
uploadDocumentGridGlobal.ref = uploadDocumentGridGlobal.ref;
|
||||
|
||||
//!dataSystemGlobal
|
||||
var ref = uploadDocumentGridGlobal.ref;
|
||||
|
||||
//!dataSystem
|
||||
var url = ref+'?action=uploadDocumentGrid_Ajax';
|
||||
store = new Ext.data.GroupingStore({
|
||||
proxy : new Ext.data.HttpProxy
|
||||
(
|
||||
{
|
||||
url: url
|
||||
}
|
||||
),
|
||||
reader : new Ext.data.JsonReader
|
||||
(
|
||||
{
|
||||
totalProperty: 'totalCount',
|
||||
root: 'data',
|
||||
fields :
|
||||
[
|
||||
{name : 'APP_DOC_UID'},
|
||||
{name : 'DOWNLOAD_LINK'},
|
||||
{name : 'TITLE'},
|
||||
{name : 'APP_DOC_COMMENT'},
|
||||
{name : 'TYPE'},
|
||||
{name : 'DOC_VERSION'},
|
||||
{name : 'ORIGIN'},
|
||||
{name : 'CREATED_BY'},
|
||||
{name : 'CREATE_DATE'}
|
||||
]
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
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");
|
||||
}
|
||||
return dateString;
|
||||
}
|
||||
escapeHtml = function(v){
|
||||
var pre = document.createElement('pre');
|
||||
var text = document.createTextNode( v );
|
||||
pre.appendChild(text);
|
||||
return pre.innerHTML;
|
||||
}
|
||||
|
||||
actionRenderingTranslation = function(v){
|
||||
var actionTranslate = "";
|
||||
if(v=="PAUSE"){
|
||||
actionTranslate = _("ID_PAUSED");
|
||||
}
|
||||
else if(v=="CANCEL"){
|
||||
actionTranslate = _("ID_CANCELLED");
|
||||
}
|
||||
else if(v=="IN_PROGRESS"){
|
||||
actionTranslate = _("ID_IN_PROGRESS");
|
||||
}
|
||||
else if(v=="REASSIGN"){
|
||||
actionTranslate = _("ID_REASSIGNED");
|
||||
}
|
||||
else if(v==""||v==null){
|
||||
actionTranslate = _("ID_DERIVATED");
|
||||
}
|
||||
return actionTranslate;
|
||||
};
|
||||
var processesGrid = new Ext.grid.GridPanel({
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
id: 'processesGrid',
|
||||
height:500,
|
||||
//autoWidth : true,
|
||||
width:'',
|
||||
title : '',
|
||||
stateful : true,
|
||||
stateId : 'grid',
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: true,
|
||||
frame:false,
|
||||
//plugins: expander,
|
||||
cls : 'grid_with_checkbox',
|
||||
columnLines: true,
|
||||
viewConfig: {
|
||||
forceFit:true
|
||||
},
|
||||
cm: new Ext.grid.ColumnModel({
|
||||
defaults: {
|
||||
width: 200,
|
||||
sortable: true
|
||||
},
|
||||
columns:
|
||||
[
|
||||
{id:'APP_DOC_UID', dataIndex: 'APP_DOC_UID', hidden:true, hideable:false},
|
||||
{id:'DOWNLOAD_LINK', dataIndex: 'DOWNLOAD_LINK', hidden:true, hideable:false},
|
||||
{header: _("ID_FILENAME"), dataIndex: 'TITLE', width: 70},
|
||||
{header: _("ID_COMMENTS"), dataIndex: 'APP_DOC_COMMENT', width: 70},
|
||||
{header: _("ID_TYPE"), dataIndex: 'TYPE', width: 70},
|
||||
{header: _("ID_VERSION"), dataIndex: 'DOC_VERSION', width: 70},
|
||||
{header: _("ID_ORIGIN_TASK"), dataIndex: 'ORIGIN', width: 70},
|
||||
{header: _("ID_CREATED_BY"), dataIndex: 'CREATED_BY', width: 70},
|
||||
{header: _("ID_CREATE_DATE"), dataIndex: 'CREATE_DATE', width: 70,renderer:startDateRender}
|
||||
|
||||
]
|
||||
}),
|
||||
store: store,
|
||||
tbar:[
|
||||
{
|
||||
|
||||
text:_("ID_DOWNLOAD"),
|
||||
id:'sendMailMessageFormRadioId',
|
||||
iconCls: 'button_menu_ext',
|
||||
icon: '/images/documents/_downGreen.png',
|
||||
handler: function(){
|
||||
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
if( rowSelected ){
|
||||
//uploadDocumentGridGlobal construct
|
||||
uploadDocumentGridDownloadGlobal.APP_DOC_UID = rowSelected.data.APP_DOC_UID;
|
||||
uploadDocumentGridDownloadGlobal.DOWNLOAD_LINK = rowSelected.data.DOWNLOAD_LINK;
|
||||
uploadDocumentGridDownloadGlobal.TITLE = rowSelected.data.TITLE;
|
||||
|
||||
var APP_DOC_UID = uploadDocumentGridDownloadGlobal.APP_DOC_UID;
|
||||
var DOWNLOAD_LINK = uploadDocumentGridDownloadGlobal.DOWNLOAD_LINK;
|
||||
var TITLE = uploadDocumentGridDownloadGlobal.TITLE;
|
||||
|
||||
uploadDocumentGridDownload();
|
||||
}
|
||||
else{
|
||||
Ext.Msg.show({
|
||||
title:'',
|
||||
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,
|
||||
buttons: Ext.Msg.INFO,
|
||||
fn: function(){},
|
||||
animEl: 'elId',
|
||||
icon: Ext.MessageBox.INFO,
|
||||
buttons: Ext.MessageBox.OK
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
disabled:false
|
||||
},
|
||||
{
|
||||
xtype: 'tbfill'
|
||||
}
|
||||
],
|
||||
bbar: new Ext.PagingToolbar({
|
||||
pageSize: 10,
|
||||
store: store,
|
||||
displayInfo: true,
|
||||
displayMsg: 'Displaying Processes {0} - {1} of {2}',
|
||||
emptyMsg: "",
|
||||
items:[]
|
||||
}),
|
||||
listeners: {
|
||||
rowdblclick: emptyReturn,
|
||||
render: function(){
|
||||
this.loadMask = new Ext.LoadMask(this.body, {msg:'Loading...'});
|
||||
processesGrid.getSelectionModel().on('rowselect', function(){
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
processesGrid.store.load({params: {"function":"languagesList"}});
|
||||
|
||||
processesGrid.store.on(
|
||||
'load',
|
||||
function()
|
||||
{
|
||||
//window.parent.resize_iframe();
|
||||
},
|
||||
this,
|
||||
{
|
||||
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);
|
||||
} else {
|
||||
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'));
|
||||
} else {
|
||||
debug.setIconClass('icon-debug');
|
||||
debug.setText(_('ID_ENABLE_DEBUG'));
|
||||
}
|
||||
}, this);
|
||||
|
||||
processesGrid.on('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
}, this);
|
||||
|
||||
function emptyReturn(){
|
||||
}
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
layout: 'border',
|
||||
autoScroll: true,
|
||||
items: [
|
||||
processesGrid
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -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