Merge branch 'master' of github.com:ralpheav/processmaker

This commit is contained in:
ralpheav
2013-06-05 12:25:40 -04:00
26 changed files with 1397 additions and 569 deletions

View File

@@ -3776,7 +3776,6 @@ class Cases
$oAppDelay = new AppDelay();
$oAppDelay->create($aData);
$aFields['APP_STATUS'] = 'PAUSED';
$oApplication->update($aFields);
//update searchindex
@@ -5370,13 +5369,13 @@ class Cases
while ($aRow = $oDataset->getRow()) {
if ($TASK_SOURCE == $aRow['TAS_UID']) {
$delIndex[] = $aRow['DEL_INDEX'];
$delIndex[] = $aRow['DEL_INDEX'];
}
$oDataset->next();
}
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
}
}
break;
}

View File

@@ -1039,7 +1039,7 @@ class AppCacheView extends BaseAppCacheView
$criteria->getNewCriterion(AppCacheViewPeer::DEL_THREAD_STATUS, "OPEN"))
)->addOr(
//Paused
$criteria->getNewCriterion(AppCacheViewPeer::APP_STATUS, "PAUSED")->addAnd(
$criteria->getNewCriterion(AppCacheViewPeer::APP_STATUS, array("DRAFT", "TO_DO"), Criteria::IN)->addAnd(
$criteria->getNewCriterion(AppCacheViewPeer::APP_UID, AppCacheViewPeer::APP_UID . " IN ($sqlAppDelay)", Criteria::CUSTOM))
)->addOr(
//Cancelled - getCancelled()

View File

@@ -105,8 +105,8 @@ class AppNotes extends BaseAppNotes
$response['success'] = G::LoadTranslation("ID_FAILURE");
$response['message'] = $msg;
} else {
$response['success'] = G::LoadTranslation("ID_SUCCESS");
$response['message'] = G::LoadTranslation("ID_SAVED2");
$response['success'] = "success";
$response['message'] = G::LoadTranslation("ID_SAVED");
}
if ($notify) {

View File

@@ -1,5 +1,11 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
/**
* App controller
*
@@ -21,6 +27,13 @@ class AppProxy extends HttpProxyController
*/
function getNotesList ($httpData)
{
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
$appUid = null;
if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") {
@@ -116,6 +129,13 @@ class AppProxy extends HttpProxyController
//Send the response to client
@ini_set("implicit_flush", 1);
ob_start();
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
echo G::json_encode($response);
@ob_flush();
@flush();

View File

@@ -33,7 +33,19 @@
//require_once 'classes/model/AppDelay.php';
//require_once 'classes/model/Process.php';
//require_once 'classes/model/Task.php';
if(isset($_REQUEST['action']) && $_REQUEST['action'] == "verifySession" ) {
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
} else {
$response = new stdclass();
print G::json_encode( $response );
die();
}
}
class Ajax
{
@@ -73,6 +85,13 @@ class Ajax
public function steps()
{
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
G::LoadClass('applications');
$applications = new Applications();
@@ -296,6 +315,13 @@ class Ajax
public function getProcessInformation()
{
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
$process = new Process();
$processData = $process->load($_SESSION['PROCESS']);
require_once 'classes/model/Users.php';
@@ -314,6 +340,13 @@ class Ajax
public function getTaskInformation()
{
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
$task = new Task();
if ($_SESSION['TASK'] == '-1') {
$_SESSION['TASK'] = $_SESSION['CURRENT_TASK'];
@@ -364,6 +397,13 @@ class Ajax
public function uploadedDocuments()
{
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
global $G_PUBLISH;
G::loadClass('configuration');
@@ -457,6 +497,13 @@ class Ajax
public function getUsersToReassign()
{
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
$case = new Cases();
$result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED']);
@@ -594,6 +641,13 @@ class Ajax
public function changeLogTab()
{
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
try {
global $G_PUBLISH;
require_once 'classes/model/AppHistory.php';

View File

@@ -1,4 +1,11 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
/**
* casesList_Ajax.php
*

View File

@@ -1,4 +1,12 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$res = new stdclass();
$res->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$res->lostSession = true;
$res->success = true;
print G::json_encode( $res );
die();
}
if (! isset( $_REQUEST['action'] )) {
$res['success'] = 'failure';
$res['message'] = G::LoadTranslation( 'ID_REQUEST_ACTION' );

View File

@@ -1,4 +1,11 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
/**
* cases_Ajax.php
*

View File

@@ -21,7 +21,12 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (!isset($_SESSION['USER_LOGGED'])) {
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
die( '<script type="text/javascript">
parent.location = "../cases/casesListExtJs?action=selfservice";
</script>');
}
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:

View File

@@ -22,8 +22,12 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
//validate the data post
if (!isset($_SESSION['USER_LOGGED'])) {
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
die( '<script type="text/javascript">
parent.location = "../cases/casesStartPage?action=startCase";
</script>');
}
try {
if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) {
throw new Exception( G::LoadTranslation( 'ID_INVALID_APPLICATION_ID_MSG', array ('<a href=\'' . $_SERVER['HTTP_REFERER'] . '\'>{1}</a>',G::LoadTranslation( 'ID_REOPEN' ) ) ) );

View File

@@ -28,7 +28,19 @@
*/
require_once ("classes/model/AppDocumentPeer.php");
if(isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession" ) {
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
} else {
$response = new stdclass();
print G::json_encode( $response );
die();
}
}
//v = Version
//a = Case UID

View File

@@ -1,4 +1,11 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
/**
* cases_ShowOutputDocument.php
*

View File

@@ -1,4 +1,10 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
die( '<script type="text/javascript">
parent.location = "../cases/casesStartPage?action=startCase";
</script>');
}
/**
* cases_Step.php
*

View File

@@ -1,8 +1,11 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$result = new stdclass();
$result->error = G::LoadTranslation('ID_LOGIN_AGAIN');
die(G::json_encode($result));
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true;
$responseObject->lostSession = true;
print G::json_encode( $responseObject );
die();
}
//Getting the extJs parameters

View File

@@ -1,4 +1,11 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
die();
}
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';

View File

@@ -162,6 +162,14 @@ switch ($REQUEST) {
foreach ($aUserIuds as $key => $val) {
$sData['USR_UID'] = $val;
$sData['ROL_UID'] = $ROL_UID;
if ($sData['USR_UID'] == '00000000000000000000000000000001') {
if ($sData['ROL_UID'] != 'PROCESSMAKER_ADMIN') {
$response = new stdclass();
$response->userRole = true;
echo G::json_encode($response);
break;
}
}
$RBAC->assignUserToRole( $sData );
}

View File

@@ -42,7 +42,7 @@ function openCaseNotesWindow(appUid1, modalSw, appTitle, proUid, taskUid)
limit:startRecord+loadSize
},
listeners:{
load:function(){
load:function(response){
Ext.MessageBox.hide();
if ( typeof(storeNotes.reader.jsonData.noPerms != 'undefined') &&
(storeNotes.reader.jsonData.noPerms == '1') ) {
@@ -68,8 +68,23 @@ function openCaseNotesWindow(appUid1, modalSw, appTitle, proUid, taskUid)
caseNotesWindow.show();
newNoteAreaActive = false;
newNoteHandler();
},
exception: function(dp, type, action, options, response, arg) {
responseObject = Ext.util.JSON.decode(response.responseText);
if (responseObject.lostSession) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: responseObject.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
}
}
}
});
storeNotes.load();
@@ -350,8 +365,17 @@ function sendNote()
Ext.getCmp('addCancelBtn').setDisabled(false);
statusBarMessage( _('ID_CASES_NOTE_POST_SUCCESS'), false,true);
storeNotes.load();
}
else {
} else if (data.lostSession) {
Ext.Msg.show({
title : _('ID_CASES_NOTE_POST_ERROR'),
msg : data.message,
icon : Ext.MessageBox.ERROR,
buttons : Ext.Msg.OK,
fn : function(btn) {
location = location;
}
});
} else {
Ext.getCmp('caseNoteText').setDisabled(false);
Ext.getCmp('sendBtn').setDisabled(false);
Ext.getCmp('addCancelBtn').setDisabled(false);
@@ -476,8 +500,17 @@ var openSummaryWindow = function(appUid, delIndex, action)
summaryWindow.add(summaryTabs);
summaryWindow.doLayout();
summaryWindow.show();
}
else {
} else if (response.lostSession) {
Ext.Msg.show({
title : "ERROR",
msg : response.message,
icon : Ext.MessageBox.ERROR,
buttons : Ext.Msg.OK,
fn : function(btn) {
location = location;
}
});
} else {
PMExt.warning(_('ID_WARNING'), response.message);
}
summaryWindowOpened = false;

View File

@@ -453,33 +453,58 @@ function openActionDialog(caller, action, dataAux)
var urlDownload = ext_itemgrid.getSelectionModel().getSelected().get("downloadLink");
if (selectedRows.length == 1) {
if (ext_itemgrid.getSelectionModel().getSelected().get("appDocType") == "Output" && ext_itemgrid.getSelectionModel().getSelected().get("outDocGenerate") != "") {
dataAux = (dataAux != "")? dataAux : "pdf";
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
if (ext_itemgrid.getSelectionModel().getSelected().get("appDocType") == "Output" && ext_itemgrid.getSelectionModel().getSelected().get("outDocGenerate") != "") {
dataAux = (dataAux != "")? dataAux : "pdf";
urlDownload = stringReplace("&ext=.{3,}&", "&ext=" + dataAux + "&", urlDownload);
}
urlDownload = stringReplace("&ext=.{3,}&", "&ext=" + dataAux + "&", urlDownload);
}
if (ext_itemgrid.getSelectionModel().getSelected().get("appDocPlugin") != "") {
messageText = _("ID_DOWNLOADING_FILE") + " " + ext_itemgrid.getSelectionModel().getSelected().get("name");
statusBarMessage(messageText, true, true);
if (ext_itemgrid.getSelectionModel().getSelected().get("appDocPlugin") != "") {
messageText = _("ID_DOWNLOADING_FILE") + " " + ext_itemgrid.getSelectionModel().getSelected().get("name");
statusBarMessage(messageText, true, true);
try {
Ext.destroy(Ext.get("downloadIframe"));
} catch (e) {
try {
Ext.destroy(Ext.get("downloadIframe"));
} catch (e) {
}
Ext.DomHelper.append(document.body, {
tag: "iframe",
id: "downloadIframe",
frameBorder: 0,
width: 0,
height: 0,
css: "display: none; visibility: hidden; height: 0px;",
src: urlDownload
});
} else {
streamFilefromPM(urlDownload);
}
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
Ext.DomHelper.append(document.body, {
tag: "iframe",
id: "downloadIframe",
frameBorder: 0,
width: 0,
height: 0,
css: "display: none; visibility: hidden; height: 0px;",
src: urlDownload
});
} else {
streamFilefromPM(urlDownload);
}
});
}
/*

View File

@@ -348,19 +348,44 @@
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();
if( rowSelected ){
Ext.Ajax.request({
url : 'cases_ShowDocument' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
//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();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
else{
Ext.Msg.show({
@@ -389,19 +414,44 @@
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();
if( rowSelected ){
Ext.Ajax.request({
url : 'cases_ShowDocument' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
//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();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
else{
Ext.Msg.show({

View File

@@ -145,52 +145,77 @@ function jumpToCase(appNumber){
function deleteCase() {
var rows = grid.getSelectionModel().getSelections();
if( rows.length > 0 ) {
ids = Array();
for(i=0; i<rows.length; i++)
ids[i] = rows[i].get('APP_UID');
APP_UIDS = ids.join(',');
Ext.Msg.confirm(
_('ID_CONFIRM'),
(rows.length == 1) ? _('ID_MSG_CONFIRM_DELETE_CASE') : _('ID_MSG_CONFIRM_DELETE_CASES'),
function(btn, text){
if ( btn == 'yes' ) {
Ext.MessageBox.show({ msg: _('ID_DELETING_ELEMENTS'), wait:true,waitConfig: {interval:200} });
Ext.Ajax.request({
url: 'cases_Delete',
success: function(response) {
try {
parent.updateCasesView(true);
}
catch (e) {
// Nothing to do
}
Ext.MessageBox.hide();
try {
parent.updateCasesTree();
}
catch (e) {
// Nothing to do
}
},
params: {APP_UIDS:APP_UIDS}
});
Ext.Ajax.request({
url : 'casesList_Ajax' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
if( rows.length > 0 ) {
ids = Array();
for(i=0; i<rows.length; i++)
ids[i] = rows[i].get('APP_UID');
APP_UIDS = ids.join(',');
Ext.Msg.confirm(
_('ID_CONFIRM'),
(rows.length == 1) ? _('ID_MSG_CONFIRM_DELETE_CASE') : _('ID_MSG_CONFIRM_DELETE_CASES'),
function(btn, text){
if ( btn == 'yes' ) {
Ext.MessageBox.show({ msg: _('ID_DELETING_ELEMENTS'), wait:true,waitConfig: {interval:200} });
Ext.Ajax.request({
url: 'cases_Delete',
success: function(response) {
try {
parent.updateCasesView(true);
}
catch (e) {
// Nothing to do
}
Ext.MessageBox.hide();
try {
parent.updateCasesTree();
}
catch (e) {
// Nothing to do
}
},
params: {APP_UIDS:APP_UIDS}
});
}
}
);
} else {
Ext.Msg.show({
title:'',
msg: _('ID_NO_SELECTION_WARNING'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
);
} else {
Ext.Msg.show({
title:'',
msg: _('ID_NO_SELECTION_WARNING'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}
});
}
function pauseCase(date){
@@ -1280,10 +1305,34 @@ Ext.onReady ( function() {
menu: new Ext.menu.DateMenu({
//vtype: 'daterange',
handler: function(dp, date){
pauseCase(date);
Ext.Ajax.request({
url : 'casesList_Ajax' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
pauseCase(date);
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
})
});
var optionMenuSummary = new Ext.Action({
@@ -1351,100 +1400,124 @@ Ext.onReady ( function() {
text: _('ID_REASSIGN'),
iconCls: 'ICON_CASES_TO_REASSIGN',
handler: function() {
Ext.Ajax.request({
url : 'casesList_Ajax' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
var casesGrid_ = Ext.getCmp('casesGrid');
var rowSelected = casesGrid_.getSelectionModel().getSelected();
var rowAllJsonArray = casesGrid_.store.reader.jsonData.data;
var rowSelectedIndex = casesGrid_.getSelectionModel().lastActive;
var rowSelectedJsonArray = rowAllJsonArray[rowSelectedIndex];
var casesGrid_ = Ext.getCmp('casesGrid');
var rowSelected = casesGrid_.getSelectionModel().getSelected();
var rowAllJsonArray = casesGrid_.store.reader.jsonData.data;
var rowSelectedIndex = casesGrid_.getSelectionModel().lastActive;
var rowSelectedJsonArray = rowAllJsonArray[rowSelectedIndex];
var TAS_UID = rowSelectedJsonArray.TAS_UID;
var USR_UID = rowSelectedJsonArray.USR_UID;
var TAS_UID = rowSelectedJsonArray.TAS_UID;
var USR_UID = rowSelectedJsonArray.USR_UID;
var APP_UID = rowSelectedJsonArray.APP_UID;
var DEL_INDEX = rowSelectedJsonArray.DEL_INDEX;
var APP_UID = rowSelectedJsonArray.APP_UID;
var DEL_INDEX = rowSelectedJsonArray.DEL_INDEX;
optionMenuReassignGlobal.APP_UID = APP_UID;
optionMenuReassignGlobal.DEL_INDEX = DEL_INDEX;
if( rowSelected ){
var store = new Ext.data.Store( {
autoLoad: true,
proxy : new Ext.data.HttpProxy({
url: 'casesList_Ajax?actionAjax=getUsersToReassign&TAS_UID='+TAS_UID
}),
reader : new Ext.data.JsonReader( {
root: 'data',
fields : [
{name : 'USR_UID'},
{name : 'USR_USERNAME'},
{name : 'USR_FIRSTNAME'},
{name : 'USR_LASTNAME'}
]
})
});
optionMenuReassignGlobal.APP_UID = APP_UID;
optionMenuReassignGlobal.DEL_INDEX = DEL_INDEX;
if( rowSelected ){
var store = new Ext.data.Store( {
autoLoad: true,
proxy : new Ext.data.HttpProxy({
url: 'casesList_Ajax?actionAjax=getUsersToReassign&TAS_UID='+TAS_UID
}),
reader : new Ext.data.JsonReader( {
root: 'data',
fields : [
{name : 'USR_UID'},
{name : 'USR_USERNAME'},
{name : 'USR_FIRSTNAME'},
{name : 'USR_LASTNAME'}
]
})
});
var grid = new Ext.grid.GridPanel( {
id: 'reassignGrid',
height:300,
width:'300',
title : '',
stateful : true,
stateId : 'grid',
enableColumnResize: true,
enableHdMenu: true,
frame:false,
cls : 'grid_with_checkbox',
columnLines: true,
var grid = new Ext.grid.GridPanel( {
id: 'reassignGrid',
height:300,
width:'300',
title : '',
stateful : true,
stateId : 'grid',
enableColumnResize: true,
enableHdMenu: true,
frame:false,
cls : 'grid_with_checkbox',
columnLines: true,
viewConfig: {
forceFit:true
},
viewConfig: {
forceFit:true
},
cm: new Ext.grid.ColumnModel({
defaults: {
width: 200,
sortable: true
},
columns: [
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
{header: _('ID_FIRSTNAME'), dataIndex: 'USR_FIRSTNAME', width: 300},
{header: _('ID_LASTNAME'), dataIndex: 'USR_LASTNAME', width: 300}
]
}),
cm: new Ext.grid.ColumnModel({
defaults: {
width: 200,
sortable: true
store: store,
tbar:[
{
text:_('ID_REASSIGN'),
iconCls: 'ICON_CASES_TO_REASSIGN',
handler: function(){
//Actions.reassignCase
reassingCaseToUser();
}
}
],
listeners: {
//rowdblclick: openCase,
render: function(){
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
this.ownerCt.doLayout();
}
}
});
winReassignInCasesList = new Ext.Window({
title: '',
width: 450,
height: 280,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
items: [grid]
});
winReassignInCasesList.show();
}
}
},
columns: [
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
{header: _('ID_FIRSTNAME'), dataIndex: 'USR_FIRSTNAME', width: 300},
{header: _('ID_LASTNAME'), dataIndex: 'USR_LASTNAME', width: 300}
]
}),
store: store,
tbar:[
{
text:_('ID_REASSIGN'),
iconCls: 'ICON_CASES_TO_REASSIGN',
handler: function(){
//Actions.reassignCase
reassingCaseToUser();
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
],
listeners: {
//rowdblclick: openCase,
render: function(){
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
this.ownerCt.doLayout();
}
}
});
winReassignInCasesList = new Ext.Window({
title: '',
width: 450,
height: 280,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
items: [grid]
});
winReassignInCasesList.show();
}
});
}
});
optionMenuDelete = new Ext.Action({
@@ -2129,40 +2202,65 @@ function reassign(){
storeReassignCases.rejectChanges();
var tasks = [];
var sw = 0;
if( rows.length > 0 ) {
ids = '';
for(i=0; i<rows.length; i++) {
// filtering duplicate tasks
if( i != 0 ) ids += ',';
ids += rows[i].get('APP_UID') + "|" + rows[i].get('TAS_UID')+ "|" + rows[i].get('DEL_INDEX');
}
storeReassignCases.setBaseParam( 'APP_UIDS', ids);
//storeReassignCases.setBaseParam( 'action', 'to_reassign');
storeReassignCases.load();
newPopUp.show();
comboUsersToReassign.disable();
//grid = reassignGrid.store.data;
//Ext.Msg.alert ( grid );
/*
for( var i =0; i < grid.length; i++) {
grid[i].data.APP_UID = grid[i].data.USERS[0];
}
*/
}
else {
Ext.Msg.show({
title:'',
msg: _('ID_NO_SELECTION_WARNING'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}
Ext.Ajax.request({
url : 'proxyReassignCasesList' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
if( rows.length > 0 ) {
ids = '';
for(i=0; i<rows.length; i++) {
// filtering duplicate tasks
if( i != 0 ) ids += ',';
ids += rows[i].get('APP_UID') + "|" + rows[i].get('TAS_UID')+ "|" + rows[i].get('DEL_INDEX');
}
storeReassignCases.setBaseParam( 'APP_UIDS', ids);
//storeReassignCases.setBaseParam( 'action', 'to_reassign');
storeReassignCases.load();
newPopUp.show();
comboUsersToReassign.disable();
//grid = reassignGrid.store.data;
//Ext.Msg.alert ( grid );
/*
for( var i =0; i < grid.length; i++) {
grid[i].data.APP_UID = grid[i].data.USERS[0];
}
*/
}
else {
Ext.Msg.show({
title:'',
msg: _('ID_NO_SELECTION_WARNING'),
buttons: Ext.Msg.INFO,
fn: function(){},
animEl: 'elId',
icon: Ext.MessageBox.INFO,
buttons: Ext.MessageBox.OK
});
}
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
function inArray(arr, obj) {

View File

@@ -63,21 +63,96 @@ Ext.onReady(function() {
text : 'X',
ctCls : 'pm_search_x_button',
handler : function() {
Ext.getCmp('processesFilter').setValue('');
startCaseFilter.clear();
Ext.Ajax.request({
url : 'casesStartPage_Ajax' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Ext.getCmp('processesFilter').setValue('');
startCaseFilter.clear();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
}, ' ', ' ', {
iconCls : 'icon-expand-all',
tooltip : _('ID_EXPAND_ALL'),
handler : function() {
Ext.getCmp("startCaseTreePanel").root.expand(true);
Ext.Ajax.request({
url : 'casesStartPage_Ajax' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Ext.getCmp("startCaseTreePanel").root.expand(true);
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
},
scope : this
}, '-', {
iconCls : 'icon-collapse-all',
tooltip : _('ID_COLLAPSE_ALL'),
handler : function() {
Ext.getCmp("startCaseTreePanel").root.collapse(true);
Ext.Ajax.request({
url : 'casesStartPage_Ajax' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Ext.getCmp("startCaseTreePanel").root.collapse(true);
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
},
scope : this
}, ' ', ' ', {
@@ -86,8 +161,33 @@ Ext.onReady(function() {
icon : '/images/refresh.gif',
handler : function() {
tree = Ext.getCmp('startCaseTreePanel');
tree.getLoader().load(tree.root);
Ext.Ajax.request({
url : 'casesStartPage_Ajax' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
tree = Ext.getCmp('startCaseTreePanel');
tree.getLoader().load(tree.root);
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
}
],
@@ -96,7 +196,32 @@ Ext.onReady(function() {
openCaseA(n);
},
click : function(n) {
showDetailsA(n);
Ext.Ajax.request({
url : 'casesStartPage_Ajax' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
showDetailsA(n);
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
},
load: function(node){
if (node.childNodes.length == 0)
@@ -289,8 +414,17 @@ function openCaseA(n){
var res = Ext.util.JSON.decode(response.responseText);
if (res.openCase) {
window.location = res.openCase.PAGE;
}
else {
}else if (res.lostSession) {
Ext.Msg.show({
title : TRANSLATIONS.ID_ERROR_CREATING_NEW_CASE, // 'Error creating a new Case',
msg : res.message,
icon : Ext.MessageBox.ERROR,
buttons : Ext.Msg.OK,
fn : function(btn) {
location = location;
}
});
} else {
Ext.Msg.show({
title : TRANSLATIONS.ID_ERROR_CREATING_NEW_CASE, // 'Error creating a new Case',
msg : '<textarea cols="50" rows="10">'

View File

@@ -421,19 +421,43 @@
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{
if( rowSelected ){
Ext.Ajax.request({
url : 'cases_ShowDocument' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
top.location = '../login/login';
}
});
} else {
//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();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
} else{
Ext.Msg.show({
title:'',
msg: TRANSLATIONS.ID_NO_SELECTION_WARNING,

View File

@@ -345,149 +345,322 @@ Ext.onReady(function(){
Actions.processMap = function()
{
Actions.tabFrame('processMap');
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Actions.tabFrame('processMap');
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.processInformation = function()
{
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'getProcessInformation'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'getProcessInformation'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
fieldset = {
xtype : 'fieldset',
autoHeight : true,
defaults : {
width : 170,
xtype:'label',
labelStyle : 'padding: 0px;',
style: 'font-weight: bold'
},
items : [
{fieldLabel: _('ID_TITLE'), text: data.PRO_TITLE},
{fieldLabel: _('ID_DESCRIPTION'), text: data.PRO_DESCRIPTION},
{fieldLabel: _('ID_CATEGORY'), text: data.PRO_CATEGORY_LABEL},
{fieldLabel: _('ID_AUTHOR'), text: data.PRO_AUTHOR},
{fieldLabel: _('ID_CREATE_DATE'), text: data.PRO_CREATE_DATE}
]
}
fieldset = {
xtype : 'fieldset',
autoHeight : true,
defaults : {
width : 170,
xtype:'label',
labelStyle : 'padding: 0px;',
style: 'font-weight: bold'
},
items : [
{fieldLabel: _('ID_TITLE'), text: data.PRO_TITLE},
{fieldLabel: _('ID_DESCRIPTION'), text: data.PRO_DESCRIPTION},
{fieldLabel: _('ID_CATEGORY'), text: data.PRO_CATEGORY_LABEL},
{fieldLabel: _('ID_AUTHOR'), text: data.PRO_AUTHOR},
{fieldLabel: _('ID_CREATE_DATE'), text: data.PRO_CREATE_DATE}
]
}
var frm = new Ext.FormPanel( {
labelAlign : 'right',
bodyStyle : 'padding:5px 5px 0',
width : 400,
autoScroll:true,
items : [fieldset],
buttons : [{
text : 'OK',
handler : function() {
win.close();
}
}]
});
var frm = new Ext.FormPanel( {
labelAlign : 'right',
bodyStyle : 'padding:5px 5px 0',
width : 400,
autoScroll:true,
items : [fieldset],
buttons : [{
text : 'OK',
handler : function() {
win.close();
}
}]
});
var win = new Ext.Window({
title: '',
width: 450,
height: 280,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
items: [frm]
});
win.show();
},
failure: function ( result, request) {
Ext.MessageBox.alert( _('ID_FAILED') , result.responseText);
}
});
var win = new Ext.Window({
title: '',
width: 450,
height: 280,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
items: [frm]
});
win.show();
}},
failure: function ( result, request) {
Ext.MessageBox.alert('Failed', result.responseText);
}
});
}
Actions.taskInformation = function()
{
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'getTaskInformation'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
fieldset = {
xtype : 'fieldset',
autoHeight : true,
defaults : {
width : 170,
xtype:'label',
labelStyle : 'padding: 0px;',
style: 'font-weight: bold'
},
items : [
{fieldLabel: _('ID_TITLE'), text: data.TAS_TITLE},
{fieldLabel: _('ID_DESCRIPTION'), text: data.TAS_DESCRIPTION},
{fieldLabel: _('ID_INIT_DATE'), text: data.INIT_DATE},
{fieldLabel: _('ID_DUE_DATE'), text: data.DUE_DATE},
{fieldLabel: _('ID_FINISH_DATE'), text: data.FINISH},
{fieldLabel: _('ID_TASK_DURATION'), text: data.DURATION}
]
}
var frm = new Ext.FormPanel( {
labelAlign : 'right',
bodyStyle : 'padding:5px 5px 0',
width : 400,
autoScroll:true,
items : [fieldset],
buttons : [{
text : 'OK',
handler : function() {
win.close();
}
}]
});
var win = new Ext.Window({
title: '',
width: 450,
height: 280,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
items: [frm]
});
win.show();
},
failure: function ( result, request) {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
});
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'getTaskInformation'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
fieldset = {
xtype : 'fieldset',
autoHeight : true,
defaults : {
width : 170,
xtype:'label',
labelStyle : 'padding: 0px;',
style: 'font-weight: bold'
},
items : [
{fieldLabel: _('ID_TITLE'), text: data.TAS_TITLE},
{fieldLabel: _('ID_DESCRIPTION'), text: data.TAS_DESCRIPTION},
{fieldLabel: _('ID_INIT_DATE'), text: data.INIT_DATE},
{fieldLabel: _('ID_DUE_DATE'), text: data.DUE_DATE},
{fieldLabel: _('ID_FINISH_DATE'), text: data.FINISH},
{fieldLabel: _('ID_TASK_DURATION'), text: data.DURATION}
]
}
var frm = new Ext.FormPanel( {
labelAlign : 'right',
bodyStyle : 'padding:5px 5px 0',
width : 400,
autoScroll:true,
items : [fieldset],
buttons : [{
text : 'OK',
handler : function() {
win.close();
}
}]
});
var win = new Ext.Window({
title: '',
width: 450,
height: 280,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
items: [frm]
});
win.show();
}
},
failure: function ( result, request) {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
});
}
Actions.caseHistory = function()
{
Actions.tabFrame('caseHistory');
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Actions.tabFrame('caseHistory');
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.messageHistory = function()
{
Actions.tabFrame('messageHistory');
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Actions.tabFrame('messageHistory');
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.dynaformHistory = function()
{
Actions.tabFrame('dynaformHistory');
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Actions.tabFrame('dynaformHistory');
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.uploadedDocuments = function()
{
Actions.tabFrame('uploadedDocuments');
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Actions.tabFrame('uploadedDocuments');
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.generatedDocuments = function()
{
Actions.tabFrame('generatedDocuments');
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
Actions.tabFrame('generatedDocuments');
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.cancelCase = function()
@@ -641,7 +814,32 @@ Ext.onReady(function(){
maximizable: false,
items: [grid]
});
win.show();
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
win.show();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.reassignCase = function()
@@ -762,54 +960,102 @@ Ext.onReady(function(){
resizable: false,
items: [frm]
});
win.show();
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
win.show();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.pauseCase = function()
{
if (Ext.getCmp('noteReason').getValue() != '') {
var noteReasonTxt = _('ID_CASE_PAUSE_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
} else {
var noteReasonTxt = '';
}
var notifyReasonVal = Ext.getCmp('notifyReason').getValue() == true ? 1 : 0;
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
var vUnpauseTime = Ext.getCmp('unpauseTime').getValue();
if( unpauseDate == '') {
//Ext.getCmp('submitPauseCase').setDisabled(true);
return;
} else {
//Ext.getCmp('submitPauseCase').enable();
unpauseDate = unpauseDate.format('Y-m-d');
}
Ext.getCmp('unpauseFrm').getForm().submit({
url:'ajaxListener',
method : 'post',
params : {
action: 'pauseCase',
unpauseDate: unpauseDate,
unpauseTime: vUnpauseTime,
NOTE_REASON: noteReasonTxt,
NOTIFY_PAUSE: notifyReasonVal
},
waitMsg: _("ID_PAUSING_CASE") + stringReplace("\\: ", "", _APP_NUM) + "...",
timeout : 36000,
success : function(res, req) {
if(req.result.success) {
try {
parent.notify( _('ID_PAUSE_CASE') , req.result.msg);
}
catch (e) {
}
location.href = 'casesListExtJs';
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
PMExt.error( _('ID_ERROR'), req.result.msg);
}
}
});
if (Ext.getCmp('noteReason').getValue() != '') {
var noteReasonTxt = _('ID_CASE_PAUSE_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
} else {
var noteReasonTxt = '';
}
var notifyReasonVal = Ext.getCmp('notifyReason').getValue() == true ? 1 : 0;
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
if( unpauseDate == '') {
//Ext.getCmp('submitPauseCase').setDisabled(true);
return;
} else
//Ext.getCmp('submitPauseCase').enable();
unpauseDate = unpauseDate.format('Y-m-d');
Ext.getCmp('unpauseFrm').getForm().submit({
url:'ajaxListener',
method : 'post',
params : {
action: 'pauseCase',
unpauseDate:unpauseDate,
NOTE_REASON: noteReasonTxt,
NOTIFY_PAUSE: notifyReasonVal
},
waitMsg:'Pausing Case '+stringReplace("\\: ", "", _APP_NUM)+'...',
timeout : 36000,
success : function(res, req) {
if(req.result.success) {
try {
parent.notify('PAUSE CASE', req.result.msg);
}
catch (e) {
}
location.href = 'casesListExtJs';
} else {
PMExt.error(_('ID_ERROR'), req.result.msg);
}
}
});
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.unpauseCase = function()
@@ -844,30 +1090,50 @@ Ext.onReady(function(){
Actions.deleteCase = function()
{
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_DELETE_CASE'), function(){
var loadMask = new Ext.LoadMask(document.body, {msg: _('ID_DELETING_CASE') });
loadMask.show();
Ext.Ajax.request({
url : '../adhocUserProxy/deleteCase',
success: function ( result, request ) {
loadMask.hide();
var data = Ext.util.JSON.decode(result.responseText);
if( data.success ) {
try {
parent.PMExt.notify(_('ID_DELETE_ACTION'), data.msg);
}
catch (e) {
}
location.href = 'casesListExtJs';
} else {
PMExt.error(_('ID_ERROR'), data.msg);
}
},
failure: function ( result, request) {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
});
});
Ext.Ajax.request({
url : 'casesList_Ajax' ,
params : {actionAjax : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_DELETE_CASE'), function(){
var loadMask = new Ext.LoadMask(document.body, {msg:'Deleting case...'});
loadMask.show();
Ext.Ajax.request({
url : '../adhocUserProxy/deleteCase',
success: function ( result, request ) {
loadMask.hide();
var data = Ext.util.JSON.decode(result.responseText);
if( data.success ) {
try {
parent.PMExt.notify(_('ID_DELETE_ACTION'), data.msg);
}
catch (e) {
}
location.href = 'casesListExtJs';
} else {
PMExt.error(_('ID_ERROR'), data.msg);
}
},
failure: function ( result, request) {
Ext.MessageBox.alert('Failed', result.responseText);
}
});
});
}
}
});
}
Actions.reactivateCase = function()
@@ -902,143 +1168,168 @@ 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;
Ext.Ajax.request({
url : 'casesList_Ajax' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
location = location;
}
});
} else {
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');
//!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;
}
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;
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("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("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("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.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=="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("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("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.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 == "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 (name == "generatedDocuments") {
var uri = 'casesGenerateDocumentPage_Ajax.php?actionAjax=casesGenerateDocumentPage';
}
if( tab ) {
TabPanel.setActiveTab(tabId);
}
else {
TabPanel.add({
id: tabId,
title: menuSelectedTitle[name],
frameConfig:{name: name + 'Frame', id: name + 'Frame'},
defaultSrc : uri,
loadMask:{msg:_('ID_LOADING_GRID')},
autoWidth: true,
closable:true,
autoScroll: true,
bodyStyle:{height: (PMExt.getBrowser().screen.height-60) + 'px', overflow:'auto'}
}).show();
if( tab ) {
TabPanel.setActiveTab(tabId);
}
else {
TabPanel.add({
id: tabId,
title: menuSelectedTitle[name],
frameConfig:{name: name + 'Frame', id: name + 'Frame'},
defaultSrc : uri,
loadMask:{msg:_('ID_LOADING_GRID')+'...'},
autoWidth: true,
closable:true,
autoScroll: true,
bodyStyle:{height: (PMExt.getBrowser().screen.height-60) + 'px', overflow:'auto'}
}).show();
TabPanel.doLayout();
}
TabPanel.doLayout();
}
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
});

View File

@@ -753,7 +753,17 @@ SaveUsersRole = function(arr_usr, function_success, function_failure){
Ext.Ajax.request({
url: 'roles_Ajax',
params: {request: 'assignUserToRole', ROL_UID: ROLES.ROL_UID, aUsers: arr_usr.join(',')},
success: function(){
success: function( result, request ){
var data = Ext.util.JSON.decode(result.responseText);
if( data.userRole ) {
Ext.Msg.show({
title: _('ID_WARNING'),
msg: _('ID_ADMINISTRATOR_ROLE_CANT_CHANGED'),
animEl: 'elId',
icon: Ext.MessageBox.WARNING,
buttons: Ext.MessageBox.OK
});
}
viewport.getEl().unmask();
function_success();
},

View File

@@ -31,11 +31,11 @@
function transactionLog($transactionName){
if (extension_loaded('newrelic')) {
$baseName="ProcessMaker";
//Application base name
newrelic_set_appname ($baseName);
//Custom parameters
if(defined("SYS_SYS")){
newrelic_add_custom_parameter ("workspace", SYS_SYS);
@@ -61,10 +61,10 @@ function transactionLog($transactionName){
if(defined("PATH_DATA_SITE")){
newrelic_add_custom_parameter ("path_site", PATH_DATA_SITE);
}
//Show correct transaction name
if(defined("SYS_SYS")){
newrelic_set_appname ("PM-".SYS_SYS.";$baseName");
newrelic_set_appname ("PM-".SYS_SYS.";$baseName");
}
if(defined("PATH_CORE")){
$transactionName=str_replace(PATH_CORE,"",$transactionName);
@@ -374,8 +374,8 @@ if (Bootstrap::virtualURI( $_SERVER['REQUEST_URI'], $virtualURITable, $realPath
if (file_exists( $pluginFilename )) {
//NewRelic Snippet - By JHL
transactionLog($pluginFilename);
transactionLog($pluginFilename);
Bootstrap::streamFile( $pluginFilename );
}
die();
@@ -400,7 +400,7 @@ if (Bootstrap::virtualURI( $_SERVER['REQUEST_URI'], $virtualURITable, $realPath
if (file_exists( $fileToBeStreamed )) {
//NewRelic Snippet - By JHL
transactionLog($fileToBeStreamed);
Bootstrap::streamFile( $fileToBeStreamed );
}
die();
@@ -428,7 +428,7 @@ if (Bootstrap::virtualURI( $_SERVER['REQUEST_URI'], $virtualURITable, $realPath
$realPath[0] .= strpos( basename( $realPath[0] ), '.' ) === false ? '.php' : '';
//NewRelic Snippet - By JHL
transactionLog($realPath[0]);
Bootstrap::streamFile( $realPath[0] );
die();
}
@@ -531,7 +531,7 @@ if (! defined( 'PATH_DATA' ) || ! file_exists( PATH_DATA )) {
$installer->setHttpRequestData( $_REQUEST );
//NewRelic Snippet - By JHL
transactionLog($controllerAction);
$installer->call( $controllerAction );
} else {
$_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
@@ -870,6 +870,17 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
$noLoginFiles[] = 'appFolderAjax';
$noLoginFiles[] = 'steps_Ajax';
$noLoginFiles[] = 'proxyCasesList';
$noLoginFiles[] = 'casesStartPage_Ajax';
$noLoginFiles[] = 'appProxy';
$noLoginFiles[] = 'cases_Ajax';
$noLoginFiles[] = 'casesList_Ajax';
$noLoginFiles[] = 'proxyReassignCasesList';
$noLoginFiles[] = 'ajaxListener';
$noLoginFiles[] = 'cases_Step';
$noLoginFiles[] = 'cases_ShowOutputDocument';
$noLoginFiles[] = 'cases_ShowDocument';
$noLoginFiles[] = 'cases_CatchExecute';
$noLoginFiles[] = 'cases_SaveData';
$noLoginFolders[] = 'services';
$noLoginFolders[] = 'tracker';