Merge remote branch 'upstream/master'
This commit is contained in:
@@ -980,6 +980,13 @@ class Cases
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
$oReportTables = new ReportTables();
|
||||
$addtionalTables = new additionalTables();
|
||||
|
||||
if (!isset($Fields['APP_NUMBER'])) {
|
||||
$Fields['APP_NUMBER'] = $appFields['APP_NUMBER'];
|
||||
}
|
||||
if (!isset($Fields['APP_STATUS'])) {
|
||||
$Fields['APP_STATUS'] = $appFields['APP_STATUS'];
|
||||
}
|
||||
|
||||
$oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
|
||||
$addtionalTables->updateReportTables(
|
||||
@@ -5751,7 +5758,7 @@ class Cases
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function getHistoryMessagesTrackerExt($sApplicationUID)
|
||||
public function getHistoryMessagesTrackerExt($sApplicationUID, $onlyVisibles = false, $start = null, $limit = null)
|
||||
{
|
||||
G::LoadClass('ArrayPeer');
|
||||
global $_DBArray;
|
||||
@@ -5759,7 +5766,16 @@ class Cases
|
||||
$oAppDocument = new AppDocument();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(AppMessagePeer::APP_UID, $sApplicationUID);
|
||||
if ($onlyVisibles) {
|
||||
$oCriteria->add(AppMessagePeer::APP_MSG_SHOW_MESSAGE, 1);
|
||||
}
|
||||
$oCriteria->addAscendingOrderByColumn(AppMessagePeer::APP_MSG_DATE);
|
||||
if (!is_null($start)) {
|
||||
$oCriteria->setOffset($start);
|
||||
}
|
||||
if (!is_null($limit)) {
|
||||
$oCriteria->setLimit($limit);
|
||||
}
|
||||
$oDataset = AppMessagePeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
@@ -417,7 +417,7 @@ class Derivation
|
||||
$userFields['USR_EMAIL'] = '';
|
||||
|
||||
//get the report_to user & its full info
|
||||
$useruid = $this->getDenpendentUser( $this->checkReplacedByUser( $tasInfo['USER_UID'] ) );
|
||||
$useruid = $this->checkReplacedByUser( $this->getDenpendentUser( $tasInfo['USER_UID'] ) );
|
||||
|
||||
if (isset( $useruid ) && $useruid != '') {
|
||||
$userFields = $this->getUsersFullNameFromArray( $useruid );
|
||||
|
||||
@@ -892,7 +892,12 @@ class OutputDocument extends BaseOutputDocument
|
||||
|
||||
// Print text using writeHTMLCell()
|
||||
// $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
|
||||
$pdf->writeHTML($sContent, false, false, false, false, '');
|
||||
if (mb_detect_encoding($sContent) == 'UTF-8') {
|
||||
$sContent = utf8_decode($sContent);
|
||||
}
|
||||
$doc = new DOMDocument('1.0', 'UTF-8');
|
||||
$doc->loadHtml($sContent);
|
||||
$pdf->writeHTML($doc->saveXML(), false, false, false, false, '');
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// Close and output PDF document
|
||||
|
||||
@@ -409,7 +409,7 @@ function expandNode()
|
||||
$strExpander = $strExpander . "<a href=\"javascript:openActionDialog(this, 'download', 'pdf');\" style=\"color: #000000; text-decoration: none;\"><img src=\"/images/documents/extension/pdf.png\" style=\"margin-left: 25px; border: 0;\" alt=\"\" /> <b>" . $obj["APP_DOC_FILENAME"] . ".pdf</b> (" . $mimeInformation["description"] . ")</a>";
|
||||
$strExpander = $strExpander . "<br />";
|
||||
$mimeInformation = getMime($obj["APP_DOC_FILENAME"] . ".doc");
|
||||
$strExpander = $strExpander . "<a href=\"javascript:openActionDialog(this, 'download', 'doc');\" style=\"color: #000000; text-decoration: none;\"><img src=\"/images/documents/extension/doc.png\" style=\"margin-left: 25px; border: 0;\" alt=\"\" /> <b>" . $obj["APP_DOC_FILENAME"] . ".pdf</b> (" . $mimeInformation["description"] . ")</a>";
|
||||
$strExpander = $strExpander . "<a href=\"javascript:openActionDialog(this, 'download', 'doc');\" style=\"color: #000000; text-decoration: none;\"><img src=\"/images/documents/extension/doc.png\" style=\"margin-left: 25px; border: 0;\" alt=\"\" /> <b>" . $obj["APP_DOC_FILENAME"] . ".doc</b> (" . $mimeInformation["description"] . ")</a>";
|
||||
|
||||
$tempTree["outDocGenerate"] = $strExpander;
|
||||
|
||||
|
||||
@@ -25,6 +25,14 @@
|
||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||
|
||||
if ($actionAjax == 'messageHistoryGridList_JXP') {
|
||||
|
||||
if (!isset($_REQUEST['start'])) {
|
||||
$_REQUEST['start'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($_REQUEST['limit'])) {
|
||||
$_REQUEST['limit'] = 20;
|
||||
}
|
||||
|
||||
G::LoadClass( 'case' );
|
||||
G::LoadClass( "BasePeer" );
|
||||
@@ -32,16 +40,22 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'] );
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'], true, $_REQUEST['start'], $_REQUEST['limit']);
|
||||
$appMessageCountArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'], true);
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array ();
|
||||
|
||||
$totalCount = 0;
|
||||
foreach ($appMessageArray as $index => $value) {
|
||||
if ($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) {
|
||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID'];
|
||||
$aProcesses[] = $appMessageArray[$index];
|
||||
}
|
||||
}
|
||||
|
||||
$totalCount = 0;
|
||||
foreach ($appMessageCountArray as $index => $value) {
|
||||
if ($appMessageCountArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) {
|
||||
$totalCount ++;
|
||||
}
|
||||
}
|
||||
@@ -159,10 +173,10 @@ if ($actionAjax == 'sendMailMessage_JXP') {
|
||||
$aConfiguration['MESS_PASSWORD'] = $passwd;
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
}
|
||||
$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']
|
||||
) );
|
||||
|
||||
@@ -517,7 +517,7 @@ var ActionTabFrameGlobal = '';
|
||||
}
|
||||
],
|
||||
bbar: new Ext.PagingToolbar({
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
store: store,
|
||||
displayInfo: true,
|
||||
displayMsg: _('ID_DISPLAY_PROCESSES'),
|
||||
@@ -536,7 +536,7 @@ var ActionTabFrameGlobal = '';
|
||||
}
|
||||
});
|
||||
|
||||
processesGrid.store.load({params: {"function":"languagesList"}});
|
||||
processesGrid.store.load({params: {"actionAjax":"messageHistoryGridList_JXP"}});
|
||||
|
||||
processesGrid.store.on(
|
||||
'load',
|
||||
|
||||
Reference in New Issue
Block a user